For Developers
Platform Overview & Architecture
This section captures scope and how the parts fit together. Code is the source of truth.
Product scope
- Food rescue operations: partners, locations, rescues, transfers, users
- Public and internal impact metrics/endpoints
- Admin and partner workflows
High-level architecture
- Monorepo with Bun workspaces and Turbo tasks
- Apps/Services:
apps/client
— React 18 + Vite + Chakra UI + Clerkapps/server
— Hono on Bun, Drizzle ORM, Clerk, Sentryapps/docs
— Next.js + Fumadocscrons/backup
— DB backup to S3 storagecrons/cleanup
— S3 cleanup and maintenanceapps/storage
— S3 file host proxy and admin interface
- Shared packages:
packages/db
— Drizzle schema, generator, connection utilspackages/types
— Zod schemas and TypeScript enums/types
Data & integrations
- Neon PostgreSQL via Drizzle ORM
- S3 storage for files (paths in DB; base URL per env via STORAGE_BASE_URL)
- Clerk for auth; permission stored in DB
- Sentry for error monitoring; Apitally for API metrics
Environments
- Local: Bun dev or docker-compose
- Staging/Production: Railway services built from Dockerfiles
Source-of-truth pointers
- DB schema:
packages/db/src/db.schema.ts
- Server routes:
apps/server/src/routes/**
- Shared types/schemas:
packages/types/src/**