Full-stack React application template optimized for Cloudflare Workers deployment.
apps/web/- React 19 frontend (Vite, TanStack Router, Jotai, shadcn/ui, Tailwind CSS v4)apps/api/- tRPC API serverapps/edge/- Cloudflare Workers edge deploymentpackages/core/- Shared core utilities and WebSocket functionalitypackages/ui/- Shared UI components and shadcn/ui management scriptsdb/- Drizzle ORM schemas and migrationsinfra/- Terraform infrastructure configurationdocs/- VitePress documentation sitescripts/- Build and utility scripts
- Runtime: Bun (>=1.2.0), TypeScript 5.8
- Frontend: React 19, TanStack Router, Jotai, shadcn/ui, Tailwind CSS v4, Better Auth
- Backend: Hono framework, tRPC
- Database: Neon PostgreSQL, Drizzle ORM
- Testing: Vitest, Happy DOM
- Deployment: Cloudflare Workers, Wrangler
# Development
bun dev # Start web app dev server
bun dev:web # Start web app (shortcut)
bun dev:api # Start API server (shortcut)
bun dev:edge # Start edge server (shortcut)
# Building
bun build # Build all apps
bun build:web # Build web app (shortcut)
bun build:edge # Build edge app (shortcut)
bun --filter @repo/api build # Build API types
# Testing
bun test # Run all tests
bun test:web # Test web app (shortcut)
bun test:api # Test API (shortcut)
bun test:edge # Test edge (shortcut)
# UI Components
bun ui:add <component> # Add shadcn/ui component
bun ui:list # List installed components
bun ui:update # Update all components
bun ui:essentials # Install essential components
# Other
bun lint # Lint all code
bun --filter @repo/db push # Apply DB schema changes
# Database
bun --filter @repo/db generate # Generate migrations
bun --filter @repo/db studio # Open DB GUI
bun --filter @repo/db seed # Seed sample data
# Deployment
bun wrangler deploy --config apps/web/wrangler.jsonc --env=production
bun wrangler deploy --config apps/edge/wrangler.jsonc --env=production- Functional Programming: Prefer functional patterns over class-based code
- Modern TypeScript: Use latest TypeScript features, avoid legacy patterns like
_for private vars - Bun/Hono Idioms: Utilize Bun-specific features and Hono middleware patterns
- WebSocket: Use pub-sub pattern for WebSocket communication via
bun-ws-router