blitz-js/blitz

⚡️ The Missing Fullstack Toolkit for Next.js

14,137 stars TypeScript 10 components 3 connections

Full-stack React framework toolkit built on Next.js

Blitz applications use RPC for client-server communication, with authentication state synchronized across browser tabs via localStorage events

Under the hood, the system uses 3 feedback loops, 3 data pools, 3 control points to manage its runtime behavior.

Structural Verdict

A 10-component nextjs app with 3 connections. 669 files analyzed. Loosely coupled — components are relatively independent.

How Data Flows Through the System

Blitz applications use RPC for client-server communication, with authentication state synchronized across browser tabs via localStorage events

  1. CLI Command — User runs blitz command, routed through command mapping to implementation
  2. Code Generation — Generators create models, queries, mutations from templates
  3. Authentication — Client manages auth state with token parsing and cross-tab synchronization
  4. RPC Invocation — Client calls server resolvers through RPC layer with React Query caching
  5. Error Handling — Error boundaries catch and handle RedirectError and other exceptions

System Behavior

How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.

Data Pools

localStorage (state-store)
Stores authentication tokens and public user data
React Query Cache (cache)
Caches RPC query results and mutations
Prisma Client (database)
Database connection pool and query interface

Feedback Loops

Delays & Async Processing

Control Points

Package Structure

This monorepo contains 12 packages:

next-blitz-auth (app)
Example Next.js 13 app demonstrating Blitz authentication with Prisma
toolkit-app (app)
Full-featured demo app showcasing complete Blitz toolkit with auth and database
toolkit-app-passport (app)
Demo app using PassportJS authentication strategy
web (app)
Simple web app example with basic routing
blitz (library)
Core Blitz CLI and framework utilities
auth (library)
Authentication system with session management and CSRF protection
next (library)
Next.js integration layer with Jest configuration and error boundaries
rpc (library)
RPC system with React Query integration for client-server communication
codemod (tooling)
Code transformation utilities for upgrading and migrating Blitz apps
config (config)
Shared ESLint configuration for Blitz projects
generator (tooling)
Code generation system for creating models, queries, mutations, and pages
template (config)
Template package for creating new Blitz packages

Technology Stack

Next.js (framework)
Core React framework for SSR and routing
React Query (library)
Client-side data fetching and caching
Prisma (database)
Database ORM and client
Jest (testing)
Testing framework with custom configuration
jscodeshift (build)
AST manipulation for codemods
Turbo (build)
Monorepo build orchestration
TypeScript (language)
Type safety across all packages

Key Components

Configuration

pnpm-workspace.yaml (yaml)

turbo.json (json)

Explore the interactive analysis

See the full architecture map, data flow, and code patterns visualization.

Analyze on CodeSea

Related Nextjs App Repositories

Frequently Asked Questions

What is blitz used for?

Full-stack React framework toolkit built on Next.js blitz-js/blitz is a 10-component nextjs app written in TypeScript. Loosely coupled — components are relatively independent. The codebase contains 669 files.

How is blitz architected?

blitz is organized into 4 architecture layers: Core Framework, CLI & Tooling, Example Applications, Integration Tests. Loosely coupled — components are relatively independent. This layered structure keeps concerns separated and modules independent.

How does data flow through blitz?

Data moves through 5 stages: CLI Command → Code Generation → Authentication → RPC Invocation → Error Handling. Blitz applications use RPC for client-server communication, with authentication state synchronized across browser tabs via localStorage events This pipeline design reflects a complex multi-stage processing system.

What technologies does blitz use?

The core stack includes Next.js (Core React framework for SSR and routing), React Query (Client-side data fetching and caching), Prisma (Database ORM and client), Jest (Testing framework with custom configuration), jscodeshift (AST manipulation for codemods), Turbo (Monorepo build orchestration), and 1 more. A focused set of dependencies that keeps the build manageable.

What system dynamics does blitz have?

blitz exhibits 3 data pools (localStorage, React Query Cache), 3 feedback loops, 3 control points, 2 delays. The feedback loops handle polling and retry. These runtime behaviors shape how the system responds to load, failures, and configuration changes.

What design patterns does blitz use?

5 design patterns detected: Plugin Architecture, Command Pattern, Code Generation, AST Transformation, Multi-Environment Testing.

Analyzed on March 31, 2026 by CodeSea. Written by .