CodeVetter · Repo Unpack · Feature catalog
blitz-js/blitz
Blitz exposes developer-facing commands and application-facing APIs rather than one standalone product UI. Its primary capabilities are application creation, CRUD scaffolding, imported-function RPC, React Query integration, and session-based authentication. Next.js wrappers add server prefetching, serialized props, redirects, and error handling. Sample applications demonstrate password and OAuth flows, with explicit fixture limitations.
- The CLI supports dev, build, start, export, new, generate, codegen, db, console, and routes, with short aliases for common commands and an environment-information mode.
- blitz new offers App Router full setup, Pages Router full setup, and minimal Pages Router setup, plus package-manager, form-library, language, dry-run, skip-install, and no-git options.
- blitz generate maps all, crud, model, pages, queries, query, mutations, mutation, resource, and custom-templates to generator classes; page generation selects RouteGenerator when src/app/layout.tsx exists.
- The routes command renders HTTP method, source file, route path, and route type; db seed imports a default seed function and disconnects the application database afterward.
- RPC browser exports include invoke-related client APIs, query and suspense hooks, infinite and paginated queries, mutations, query keys, invalidation, and cache access.
- resolver.pipe composes ordered stages, resolver.zod selects synchronous or asynchronous parsing, and resolver.authorize delegates access checks to the initialized session.
- gSSP and gSP provide resolver prefetch helpers, normalize redirects, dehydrate query state, and serialize props with SuperJSON.
- Client authentication exports useSession, useAuthorize, useAuthorizeIf, useRedirectAuthenticated, useAuthenticatedSession, and getAntiCSRFToken.
- SessionContextClass exposes authorization, session creation and revocation, public-data updates, and private-data reads/writes; simpleRolesIsAuthorized accepts one role or an array of roles.
- The sample password-recovery feature generates four-hour reset tokens, stores hashes, sends a mailer request, changes the password, deletes sessions, and logs the user in.
- passportAuth supports configured strategies and callback session creation; NextAuthAdapter exposes provider-based login/callback handling using NextAuth internals.
- Additional public utilities include bounded pagination, an ErrorBoundary that handles RedirectError and route resets, and codemod commands upgrade-legacy and secure-password.