How mjunhaochen/cswp-meal-delivery works
MealDeliveryApp is an Angular SPA backed by a NestJS API. Users authenticate, browse meals and products, and students add or remove meals from their order list; owners and admins manage catalog and student-house data. The API also supports user administration and meal-product associations. The README identifies MongoDB as the backend; sampled auth code additionally writes user nodes through Neo4j. Frontend service implementations and most API services were not sampled, so those links reflect the available controller wiring and documented endpoint surface rather than inspected service internals.
Main entry points: lib Shared data contracts · app.module.ts Application shell · meal Meals and orders · product Product management
Components 26
Angular client
- Application shell
apps/meal-delivery/src/app/app.module.ts - Authentication UI
apps/meal-delivery/src/app/auth - Auth client
apps/meal-delivery/src/app/auth/auth.service.ts - Meals and orders
apps/meal-delivery/src/app/pages/meal - Meal client
apps/meal-delivery/src/app/pages/meal/meal.service.ts - Product management
apps/meal-delivery/src/app/pages/product - Product client
apps/meal-delivery/src/app/pages/product/product.service.ts - House management
apps/meal-delivery/src/app/pages/studentHouse - House client
apps/meal-delivery/src/app/pages/studentHouse/studentHouse.service.ts - User management
apps/meal-delivery/src/app/pages/user - User client
apps/meal-delivery/src/app/pages/user/user.service.ts
NestJS API
- HTTP API
apps/meal-delivery-api/src/app/app.module.ts - Auth endpoints
apps/meal-delivery-api/src/app/auth/auth.controller.ts - Auth service
apps/meal-delivery-api/src/app/auth/auth.service.ts - Meal endpoints
apps/meal-delivery-api/src/app/meal/meal.controller.ts - Order endpoints
apps/meal-delivery-api/src/app/orderlist/orderlist.controller.ts - Product endpoints
apps/meal-delivery-api/src/app/product/product.controller.ts - Meal-product links
apps/meal-delivery-api/src/app/productlist/productlist.controller.ts - House endpoints
apps/meal-delivery-api/src/app/studentHouse/studentHouse.controller.ts - User endpoints
apps/meal-delivery-api/src/app/user/user.controller.ts - Mongo schemas
apps/meal-delivery-api/src/app/schema
Data stores
- MongoDB
- Neo4j adapter
apps/meal-delivery-api/src/app/neo4j/neo4j.service.ts - Neo4j
Shared contracts
- Shared data contracts
libs/data/src/lib
Other components
- User
Connections 35
- User → Application shell: uses
- Application shell → Authentication UI: renders
- Application shell → Meals and orders: renders
- Application shell → Product management: renders
- Application shell → House management: renders
- Application shell → User management: renders
- Authentication UI → Auth client: submits credentials
- Auth client → Auth endpoints: HTTP requests
- Meals and orders → Meal client: requests meals
- Meals and orders → Order endpoints: order actions
- Meal client → Meal endpoints: HTTP requests
- Product management → Product client: requests products
- Product client → Product endpoints: HTTP requests
- Product management → Meal-product links: associate products
- House management → House client: requests houses
- House client → House endpoints: HTTP requests
- User management → User client: requests users
- User client → User endpoints: HTTP requests
- Auth endpoints → Auth service: delegates
- Auth service → MongoDB: reads and writes
- Auth service → Neo4j adapter: writes user node
- Neo4j adapter → Neo4j: executes query
- Meal endpoints → MongoDB: meal operations
- Order endpoints → MongoDB: order operations
- Product endpoints → MongoDB: product operations
- Meal-product links → MongoDB: association operations
- House endpoints → MongoDB: house operations
- User endpoints → MongoDB: user operations
- Mongo schemas → MongoDB: defines documents
- Shared data contracts → Auth client: shared types
- Shared data contracts → Auth endpoints: shared types
- Shared data contracts → Meal endpoints: shared types
- Shared data contracts → Product endpoints: shared types
- Shared data contracts → House endpoints: shared types
- Shared data contracts → User endpoints: shared types