Monorepo Structure
Apps
Packages
Packages are shared code that both apps can import. They live inpackages/ and are referenced by their package names.
Why a monorepo?
A few reasons:- Shared types stay in sync. When you change a type in
@folksbase/types, both the frontend and backend see the change immediately. No version mismatches, no publishing packages. - One PR, one review. A feature that touches the API, the UI, and the types can be reviewed as a single pull request.
- Turborepo caches builds. If you only change
apps/web, Turborepo skips rebuildingapps/apiand all packages. This keeps CI fast.
Why pnpm?
pnpm’s strict dependency resolution prevents phantom dependencies — you can’t accidentally import a package that isn’t in yourpackage.json. It also uses a content-addressable store, so shared dependencies across the monorepo are stored once on disk.
Tech Stack
Here’s what folksbase uses and, more importantly, why.Frontend
Backend
Infrastructure
Developer Experience
What’s Next?
Backend Architecture
How the API is structured in layers and why.
Frontend Architecture
RSC-first approach, component structure, and data fetching.
Database Schema
Tables, relationships, and multi-tenancy model.
Streaming Architecture
How large CSV files are handled without running out of memory.