MealFlow is a mobile-first meal planning system designed with a strong focus on clean architecture, separation of concerns, and security.
The system allows users to:
- manage recipes (own & inspired)
- plan weekly meals
- generate and manage shopping lists
- authenticate securely using JWT + refresh tokens
This repository contains the full system implementation, including backend services, mobile client, infrastructure, and technical documentation.
Quick start:
LOCAL_DEV.md(fastest way to run everything locally)
MealFlow is structured as a monorepo with clear service boundaries:
- Expo App – Mobile client (React Native + Expo)
- Identity Service – Authentication & token management
- App API – Domain logic (recipes, plans, shopping lists)
- MongoDB – Separate databases per service
- Docker – Local development infrastructure
Detailed architecture, OOAD, and UML diagrams can be found in:
-> /docs
-> docs/dev/project-structure.md
-> docs/dev/testing.md
-> docs/dev/docker.md
-> docs/system/mongodb-choice.md
-> docs/dev/environment-variables.md
apps/
expo-app/ # Mobile client (React Native + Expo)
services/
identity-service/ # Authentication service (Spring Boot)
app-api/ # Domain API (Spring Boot)
infra/
docker-compose.dev.yml # Local MongoDB setup
docs/
system/ # System overview & flows
ooad/ # OOAD narratives
diagrams/ # UML, sequence, activity diagrams
docker compose -f infra/docker-compose.dev.yml up -dRun each service in its own terminal:
SPRING_PROFILES_ACTIVE=dev SPRING_MONGODB_URI="mongodb://root:rootpass@localhost:27017/identity-db?authSource=admin" (cd services/identity-service && ./mvnw spring-boot:run)SPRING_PROFILES_ACTIVE=dev SPRING_MONGODB_URI="mongodb://root:rootpass@localhost:27018/app-db?authSource=admin" (cd services/app-api && ./mvnw spring-boot:run)Ports:
- Identity Service: 8081
- App API: 8082
Builds and runs both backend services and MongoDB containers:
npm run dev:backend:dockercd apps/expo-app
npm install
npx expo startExpo Web runs on http://localhost:8083 (see apps/expo-app/package.json).
For web, ensure EXPO_PUBLIC_IDENTITY_BASE_URL and EXPO_PUBLIC_APP_API_BASE_URL
in apps/expo-app/.env.local point to your backend (e.g. http://localhost:8081
and http://localhost:8082 when running locally), and allow the web origin via CORS.
Rate limiting details, Cloudflare recommendations, and trusted proxy header setup
live in docs/dev/dev-setup.md.
SPRING_PROFILES_ACTIVE=test SPRING_MONGODB_URI="mongodb://root:rootpass@localhost:27017/identity-db?authSource=admin" ./mvnw test(App API uses port 27018.)
All design decisions, OOAD artifacts, and UML diagrams are documented under:
-> /docs
This includes:
- system overview
- requirements traceability
- authentication design
- sequence, activity, class, and use-case diagrams
- testing approach and current coverage
- Docker + Compose setup notes
- MongoDB rationale
- environment variables for deployment