Skip to content

Asjas/scratchyjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

370 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scratchy

CI CodeQL Analysis Deploy Docs Cypress Docs E2E Publish

A full-stack TypeScript framework for building APIs and websites on hosted servers (not serverless). Built on Fastify, tRPC, Qwik, Drizzle ORM, and Piscina worker threads.

Benchmarks

Performance benchmarks for the framework's critical hot paths are in benchmarks/. Run them with:

pnpm bench        # interactive mode
pnpm bench:ci     # single run, writes benchmarks/results.json

Benchmarked subsystems: SharedRingBuffer (streaming SSR throughput), SharedBuffer (worker-thread payload round-trips), safeRedirect (input validation), promiseHash/timeout (promise utilities), and getClientIPAddress (proxy-header IP extraction). See the Benchmarks documentation for full details.

Packages

Package Description
@scratchyjs/auth Authentication via Better Auth — Fastify plugin, session hooks, preHandler guards
@scratchyjs/cli Code-generation CLI — scaffold models, routers, routes, pages, plugins, and more
@scratchyjs/core Core framework — Fastify server factory, config loader, error handler, security plugins
@scratchyjs/drizzle Database layer — Drizzle ORM helpers, connection pooling, schema helpers, Fastify plugin
@scratchyjs/renderer Worker-thread SSR/SSG — Piscina pool plugin, SSR handler, SSG pipeline, SharedArrayBuffer comm
@scratchyjs/trpc tRPC integration — router/procedure factories, auth middleware, Fastify plugin, typed client
@scratchyjs/utils Server utilities — safe redirect, promise helpers, response helpers, IP/locale/sec-fetch utils
@scratchyjs/vite-plugin Vite plugin — Qwik + Tailwind preset, build & server config helpers

Getting Started

pnpm add @scratchyjs/core @scratchyjs/drizzle @scratchyjs/trpc

See the documentation for a full setup guide.

Requirements

  • Node.js >= 24
  • pnpm >= 10

Turborepo Remote Cache

This repository is configured to use a self-hosted Turbo remote cache:

  • teamSlug: codewizard
  • apiUrl: https://turborepo.codewizard.training

To authenticate cache reads/writes, set TURBO_TOKEN:

export TURBO_TOKEN=your_token_here

In GitHub Actions, configure these repository secrets:

  • TURBO_TOKEN (for Turbo remote cache)
  • CLOUDFLARE_API_TOKEN (Cloudflare API token with Workers deploy permissions)
  • CLOUDFLARE_ACCOUNT_ID (your Cloudflare account ID)

Documentation

Full documentation is available at scratchyjs.com.

License

MIT

About

A Node.js + Qwik framework that uses Worker Threads to render SSR/SSG content with CSR builtin.

Resources

License

Security policy

Stars

Watchers

Forks

Contributors

Languages