Book-summary platform starter — Headway-style experience for browsing summaries, onboarding, community discussions, and learning paths. Turborepo monorepo with Next.js frontend and Fastify API.
- System Design
- Features
- Technology Stack
- Getting Started
- Configuration
- Deployment
- Project Structure
- License
A pnpm + Turbo monorepo with a Next.js App Router frontend, Fastify REST API, and shared Zod schemas. PostgreSQL stores users, summaries, community threads, and learning-path data. JWT handles API authentication.
flowchart TB
Web[Next.js Web :3000]
API[Fastify API :4000]
Shared[@readrecap/shared]
DB[(PostgreSQL :5432)]
Web --> API
API --> Shared
Web --> Shared
API --> DB
| Package | Role |
|---|---|
| apps/web | Next.js 16 frontend — Today, Library, Paths, Community, Profile |
| apps/api | Fastify 5 API, Prisma ORM, JWT auth, seed data |
| packages/shared | Shared Zod types and validation schemas |
Note: README roadmap mentions mobile; no Expo/mobile app is in this repo yet — web + API only.
- Auth: register, login,
/me, preferences, onboarding - Summaries: list and detail with Quick/Detailed reading modes
- Community: threads and posts
- Learning paths and progress scaffolding (Prisma models)
- Shared type-safe schemas between web and API
- API seeds sample data on startup
| Component | Technology |
|---|---|
| Monorepo | pnpm workspaces, Turbo |
| Frontend | Next.js 16, React 19, TypeScript |
| API | Fastify 5, Prisma 6 |
| Database | PostgreSQL 16 |
| Auth | bcrypt + JWT (jose) |
| Validation | Zod (shared package) |
- Node.js 18+
- pnpm
- Docker (for local Postgres)
pnpm install
docker compose up -d # Postgres on :5432
# Set DATABASE_URL in apps/api/.env, then:
cd apps/api && pnpm prisma:migrate
pnpm dev # Turbo — web + api concurrently
# Web → http://localhost:3000
# API → http://localhost:4000| Variable | Where | Default / Notes |
|---|---|---|
DATABASE_URL |
API | PostgreSQL connection string |
JWT_SECRET |
API | Required, min 8 characters |
PORT |
API | 4000 |
CORS_ORIGIN |
API | http://localhost:3000 |
NEXT_PUBLIC_API_BASE_URL |
Web | http://localhost:4000 |
Docker Postgres (docker-compose.yml): user/pass/db = readrecap
| Component | Approach |
|---|---|
| Database | Hosted PostgreSQL (Supabase, Neon, RDS) |
| API | Node host (Railway, Fly.io, VPS) |
| Web | Vercel (Next.js native) |
Run Prisma migrations against production DATABASE_URL before deploying the API.
ReadRecap/
├── apps/web/ # Next.js frontend
├── apps/api/ # Fastify API + prisma/
├── packages/shared/ # Shared Zod schemas
├── docker-compose.yml
├── turbo.json
└── pnpm-workspace.yaml
See repository for license terms.