A full-stack React framework β like Next.js, but powered by PledgePack (Rust+Zig bundler) for maximum build performance.
npm install pledgestack
# or
pnpm add pledgestackThe CLI command is pledge (not pledgestack). After installing, use:
npx pledge dev # Start dev server
npx pledge build # Build for production
npx pledge start # Start production serverPledgeStack aims to be a production-grade full-stack React framework that uses PledgePack (a Rust+Zig bundler published on npm) for dramatically faster builds, HMR, and dev server. It follows familiar Next.js conventions (app directory, file-based routing, RSC, SSR/SSG/ISR) while being faster, leaner, and more opinionated.
- File-based routing β App directory with
page.tsx,layout.tsx,route.ts,loading.tsx,error.tsx,not-found.tsx - Server-Side Rendering (SSR) β Server-rendered pages with layout chains, error boundaries, and Suspense loading states
- Static Site Generation (SSG) β Pre-render pages at build time with
generateStaticParams - React Server Components (RSC) β
react-server-dom-webpackintegration with streaming and client manifests - API Routes β File-based API handlers with
GET,POST,PUT,DELETE,PATCH - Middleware β
middleware.tsconvention with redirect, rewrite, headers, and short-circuit - Edge Runtime β Edge handler for Cloudflare Workers, Vercel Edge, Deno Deploy
- HMR β Dev server file watching with cache invalidation and module reloading
- Tailwind CSS β Built-in Tailwind v4 + PostCSS pipeline
- Server Utilities β
cookies(),headers(),searchParams(),params(),redirect(),notFound(),after(),connection(),draftMode() - Data Fetching β
cachedFetch()withforce-cache,no-store,isrmodes, tag-based revalidation - Metadata API β
generateMetadata()export with OpenGraph, Twitter cards, canonical, icons - Client Routing β
useRouter(),Linkwith hover prefetch, scroll restoration,replace/scrolloptions - TypeScript β First-class TypeScript with project references and end-to-end type safety
- PledgePack β Rust+Zig bundler with dev server, HMR, Oxc transforms, JS plugins (Boa engine), and built-in test runner (npm: pledgepack) β used to build user apps, not the framework itself
- Rust Native Addons β 8 NAPI addon crates (
rust-html,rust-ssr,rust-rsc,rust-html-transformer,rust-dom-renderer,rust-rsc-deserializer,rust-ssr-profiler,rust-hydration) compiled via Cargo workspace, with automatic JS fallback when not compiled - PSX Integrations with JS Fallbacks β 15 Rust crate wrappers (SQLx, Redis, Auth, Image, PDF, Jobs, Cron, Email, HTTP, WebSocket, File Processing, Tracing, Crypto, ML) that gracefully degrade to Node.js packages when native addons are unavailable
- PSX Audit Logging β
PsxAuditLoggerwraps Rust calls with sanitized args, execution time, route tagging via AsyncLocalStorage, file rotation, and sample rate support - PSX CI/CD Pipeline β GitHub Actions workflow with
cargo audit,cargo clippy,cargo fmt, cross-compile for 6 targets, bundle analysis, and Vitest - PSX Production Checklist β
pledge doctor --productionchecks Rust toolchain, Cargo.lock, LTO, debug symbols, stripped addons, env vars - PSX Bundle Analysis β
pledge analyzeCLI with per-module.nodesize breakdown, crate alternative suggestions, and build-to-build size tracking - Test Suite β 100+ tests covering all render modules, PSX integrations, audit logging, and bundle analysis using Vitest
pledgestack/
βββ packages/
β βββ shared/ # Shared types, config, constants (private β bundled into CLI)
β βββ core/ # Framework core β routing, rendering, FS scanner (private)
β βββ server/ # Node.js + Edge server runtime (private)
β βββ client/ # Client-side hydration + routing (private)
β βββ auth/ # Authentication & security helpers (private)
β βββ state/ # State management (private)
β βββ api/ # API route utilities (private)
β βββ a11y/ # Accessibility audit tools (private)
β βββ overlay/ # Error overlay & DevTools (private)
β βββ seo/ # SEO & structured data (private)
β βββ sitemap/ # Sitemap generation (private)
β βββ image/ # Image optimization (private)
β βββ font/ # Font optimization (private)
β βββ mdx/ # MDX support (private)
β βββ og/ # OpenGraph image generation (private)
β βββ rss/ # RSS feed generation (private)
β βββ ws/ # WebSocket support (private)
β βββ adapters/ # Cloudflare, Vercel, Deno, AWS, Netlify adapters (private)
β βββ privacy/ # GDPR/CCPA compliance, PII redaction, encryption, consent (private)
β βββ bundler-pledgepack/ # PledgePack bundler adapter (private)
β βββ bundler-vite/ # Vite bundler adapter (private)
β βββ bundler-rollup/ # Rollup bundler adapter (private)
β βββ bundler-turbopack/ # Turbopack bundler adapter (private)
β βββ bundler-rsbuild/ # Rsbuild bundler adapter (private)
β βββ bundler-webpack/ # Webpack bundler adapter (private)
β βββ cli/ # CLI tool β published as `pledgestack` on npm
β βββ vscode-extension/ # VS Code extension β highlighting, IntelliSense
β βββ create-pledge-app/ # Scaffolding CLI for new PledgeStack apps
βββ apps/
β βββ playground/ # Example app for development
βββ examples/ # Starter templates (blog, tailwindcss, auth, api-routes)
βββ test/ # Test suites (unit, integration, e2e)
βββ scripts/ # Release, benchmark, workspace check scripts
βββ docs/ # Numbered documentation directories
βββ pledge.config.ts # Framework config (defineConfig from 'pledgestack')
βββ pnpm-workspace.yaml
PledgePack is installed from npm (
pledgepack@^0.1.8), not as a workspace package. CLI command:pledge.Only the
pledgestackpackage (CLI) is published to npm. All sub-packages are bundled into it via esbuild and marked as private. The framework itself uses esbuild to bundle the CLI package for npm publish β PledgePack is used to bundle user apps (the projects created withpledge create).
# Create a new project
npx pledge create my-app
cd my-app
npm install
# Start dev server
npx pledge dev
# Build for production
npx pledge build
# Start production server
npx pledge startapp/
βββ layout.tsx # Root layout (wraps all pages)
βββ page.tsx # Home page (/)
βββ about/
β βββ page.tsx # About page (/about)
βββ blog/
β βββ layout.tsx # Blog section layout
β βββ page.tsx # Blog listing (/blog)
β βββ [slug]/
β βββ page.tsx # Blog post (/blog/:slug)
βββ api/
β βββ hello/
β βββ route.ts # API endpoint (/api/hello)
βββ loading.tsx # Loading UI (Suspense fallback)
βββ error.tsx # Error boundary (per-segment)
βββ not-found.tsx # 404 page
Full roadmap with progress tracking: docs/05-community/roadmap.md
Install, dev server, SSR, API routes, middleware, 404, HMR, server utilities β complete.
head.tsx, template.tsx, Pledge System, Server Actions, RSC streaming, parallel/intercepting routes, route groups, selective hydration, page transitions β complete.
Request context, revalidation, generateStaticParams, route config, ISR, RSC data fetching, cookie variants, fetch cache β complete.
Fast Refresh, error overlay, create/info/doctor commands, env vars, ESLint plugin, CI, VS Code extension, dev toolbar β complete.
loading.tsx, error.tsx, middleware API, streaming responses, static export, custom error pages, i18n, route prefetching β complete.
Docker, standalone output, health checks, graceful shutdown, redirect(), notFound(), global-error.tsx, instrumentation.ts, after(), connection(), viewport export, middleware matcher β complete.
useActionState, server-only/client-only markers, per-route runtime config, Link prefetch strategies, revalidateTag/revalidatePath top-level, unstable_cache expose, route handler methods, headers()/cookies() mutation β complete.
Unit tests, integration tests, E2E (Playwright), snapshot tests, benchmarks, bundle size budget, type safety audit, lint rule coverage β complete.
Plugin system, auth, database adapters, image/font optimization, MDX, OG images, sitemaps, RSS, WebSocket β complete.
Cloudflare, Vercel Edge, Deno Deploy, AWS Lambda, Netlify, edge bundles β complete.
Structured logging, OpenTelemetry, dev profiler, cache inspector, route inspector β complete.
Interactive tutorial, API reference auto-generation (TypeDoc), migration guide, example gallery (20+ examples) β complete.
CSP, security headers, XSS, CSRF, path traversal, clickjacking, MIME, DNS rebinding, ReDoS, Trusted Types, cross-origin isolation, CORP/COEP, referrer policy, permissions policy β complete.
OAuth 2.1, session management, JWT, TOTP/2FA, WebAuthn, RBAC, ABAC, API keys, SAML SSO, audit log β complete.
Concurrent rendering, streaming SSR, edge cache, lazy loading, resource hints, ETag, connection pooling, query memo, image/font optimization, bundle budgets, Web Vitals β complete.
Dependency audit CI, SBOM, license compliance, pinned deps, provenance attestation, Sigstore signing, dependency allowlist, secret scanning β complete.
GDPR, CCPA, PII redaction, encryption, consent, data retention, compliance docs β complete.
Structured JSON logging, distributed tracing, metrics export, error tracking (Sentry/Bugsnag), health check, graceful shutdown, request ID, slow request detection, cache logging, real-time dev profiler β complete.
Input validation, output serialization, rate limiting, bot detection, brute force protection, secure defaults, security lint rules, env types, error boundary telemetry, dev security warnings β complete.
Edge secrets, rate limiting, auth validation, CSP generation, geo-restriction, bot mitigation, cold start optimization, timeout enforcement β complete.
Schema validation, response typing, SQL/NoSQL injection prevention, SSRF, body limits, file uploads, GraphQL security, WS auth, API key rotation β complete.
Rust workspace management, crate auto-detection, batch API, binary protocol (PSXB), Rust SSR, fallback support β complete.
Source maps β
, HMR β
, error mapping β
, println! bridge β
, cargo profiles β
, test runner β
, crate pinning β
, lint rules β
, cross-compilation β
, dead code elimination β
, fmt integration β
. Remaining: syn-based parser (#206), VS Code extension (#209), PSX debugger (#212), incremental compilation cache (#214).
Route types, type-safe navigation, path aliases, env-aware config, route conflict detection, storybook, playground, codemods, plugin docs, dev overlay, upgrade command, streaming metadata, pledge clean, pledge init, pledge why β complete.
Rust SSR for dynamic pages, RSC payload generation in Rust, HTML template engine, streaming HTML transformer, React DOM string renderer in Rust, hybrid SSR orchestration, RSC client deserializer in Rust, PPR via Rust SSR, SSR profiling with flamegraphs, native hydration script generator β complete.
useInfiniteQuery, usePaginatedQuery, optimistic updates, server-side prefetching, mutation queue, offline-first data layer, real-time useSubscription(), selective cache invalidation, cross-tab sync, Rust-backed useRustQuery() β complete.
SQLx compile-time queries, Sea-ORM integration, Redis integration, Rust auth helpers (Argon2/JWT), Rust image processing, Rust PDF generation, Rust background jobs (apalis), Rust cron scheduler, Rust email sending (lettre), Rust HTTP client (reqwest), Rust WebSocket server, Rust file processing (Excel/CSV), Rust observability (tracing/OpenTelemetry), Rust crypto helpers (AES-GCM/SHA-256), Rust ML inference (candle-core/ort) β complete.
MIT Β© 2025 PledgeStack Contributors