How les-saucisses-qui-piquent/crafted-to-go works
Project type and purpose
• This is a full-stack, click-and-collect “Crafted to Go” web & mobile app in a single monorepo.
• It comprises three coordinated services (web client, API server, database) orchestrated via Docker Compose.
• Purpose: allow customers to browse artisanal beers, place orders, and enable breweries to manage inventory.
File structure
• Top level:
• docker-compose.yaml – ties together three Docker services
• “api” folder – Node.js/TypeScript Fastify server with Prisma and MVC-style controllers & repositories
• “database” folder – Postgres setup, Prisma migrations, seeding/faker scripts
• “web” folder – React/Expo (web & native) using file-based routing, contexts, hooks, Tailwind CSS
• Patterns & conventions:
• api/src/controllers → business logic endpoints
• api/src/repository → data-access layer following Repository pattern
• prisma/schema.prisma & migrations → source of truth for relational model
• web/app → file-based routing (Next-style or Expo router) separating customer vs brewery flows
• shared contexts & utils in “web/contexts” and “web/utils”
README for additional insights
• Mono-repo npm scripts to start/stop/reset all or specific services
• E2E testing configured via Maestro/EAS for Android/web
• Standard dev workflow: Docker Compose up/stop, Prisma migrations, Expo builds
Diagramming recommendations
• Blue rectangles for containers (Web, API, DB)
• UI → HTTP request → API Route
• Controller → Repository → Prisma Client → DB
• If needed, show CI/CD: GitHub Actions CI → Docker image builds → Maestro E2E tests.
Detail without overthinking
• Every logical component (e.g., auth.middleware, token util, faker scripts) where it impacts data flow or responsibilities.