CMS Monorepo (Bun + Biome + Next.js)
Roadmap and progress are tracked in TODO.md (also visible in admin at /todo).
Branch model and promotion flow are documented in BRANCHING.md.
Commit schema and changelog workflow are documented in CONTRIBUTING.md.
A baseline monorepo with:
apps/web: public frontend appapps/admin: separated admin apppackages/ui: shared UI primitives (shadcn-ready)packages/content: shared Zod schemas/typespackages/db: Prisma + PostgreSQL data accesspackages/config: shared TypeScript config
Stack
- Bun workspaces
- Biome (lint + format)
- Next.js App Router + TypeScript +
src/ - Tailwind CSS
- Prisma + PostgreSQL
- Zod
- Zustand
- TanStack (Query, Table, Form)
Quick start
- Install dependencies:
bun install
- Copy env and set your database URL:
cp .env.example .env
- Generate Prisma client and run migrations:
bun run db:generate
bun run db:migrate
bun run db:seed
- Run both apps:
bun run dev
- Web: http://localhost:3000
- Admin: http://localhost:3001
Useful scripts
bun run devbun run dev:webbun run dev:adminbun run docs:devbun run docs:buildbun run docs:previewbun run testbun run test:watchbun run test:coveragebun run test:e2ebun run lintbun run typecheckbun run checkbun run formatbun run db:generatebun run db:migratebun run db:pushbun run db:studiobun run db:seed
Testing
- Unit/integration/component: Vitest + Testing Library + MSW
- E2E: Playwright (separate projects for
webandadmin) - Use
bun run testandbun run test:e2e(not plainbun test, which uses Bun's runner)
One-time Playwright browser install:
bunx playwright install
Delivery Scaffolding
The repo includes a theoretical CI/CD and deployment baseline:
- Gitea workflow:
.gitea/workflows/ci-cd-theoretical.yml - App images:
apps/web/Dockerfileapps/admin/Dockerfile
- Runtime stacks:
docker-compose.staging.ymldocker-compose.production.yml
Compose helper scripts:
bun run docker:staging:upbun run docker:staging:downbun run docker:production:upbun run docker:production:down
Environment examples:
.env.staging.example.env.production.example
Notes:
devremains your local non-docker Bun workflow.- Staging and production compose files are templates and still require real secrets, registry strategy, and deployment host wiring.
Changelog
- Changelog file:
CHANGELOG.md - Commit schema: Conventional Commits (see
CONTRIBUTING.md) - Generate/update changelog from git commits:
bun run changelog:release
- Preview generated output without writing file:
bun run changelog:preview
Docs Tool
- Docs tool: VitePress
- Docs source directory:
docs/
Run docs locally:
bun run docs:dev
Build static docs:
bun run docs:build
Recommended next packages
- Auth:
better-authornext-auth - Uploads:
uploadthing - Rich text:
@tiptap/react - Caching/queue:
bullmq,ioredis - Email:
resend - i18n:
next-intl - Observability:
@sentry/nextjs - Testing:
vitest,@testing-library/react,playwright
For TanStack specifically, this baseline already includes Query, Table, and Form. Add Virtual when you introduce very large lists:
@tanstack/react-virtual
Description