Skip to content

iamroidev/ReadRecap

Repository files navigation

ReadRecap

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.


Table of Contents


System Design

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
Loading
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.


Features

  • 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

Technology Stack

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)

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm
  • Docker (for local Postgres)

Install and run

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

Configuration

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


Deployment

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.


Project Structure

ReadRecap/
├── apps/web/          # Next.js frontend
├── apps/api/          # Fastify API + prisma/
├── packages/shared/   # Shared Zod schemas
├── docker-compose.yml
├── turbo.json
└── pnpm-workspace.yaml

License

See repository for license terms.

About

Cross-platform Headway-like book summary starter app using Next.js, Fastify, and Expo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors