How azizdlissiesprit/bninfinal works
Bnin is a restaurant and delivery platform whose documented client app consumes the Node.js API in backend/. The main server workflow is an HTTP request routed to a domain endpoint, which performs account, restaurant, order, claim, reservation, history, or location work against PostgreSQL and returns serialized JSON. The README also describes role-based user-management and restaurant-browsing experiences, but the Flutter source tree is not included here, so those client screens are not represented as source nodes. Routes are mounted in app.ts; unsampled route internals limit detail on their specific calls.
Main entry points: app.ts HTTP API · auth.ts Authentication · reservations.ts Reservations · accounts.ts Account Services
Components 22
API Runtime
- HTTP API
backend/src/app.ts
Identity and Accounts
- Authentication
backend/src/routes/auth.ts - My Account
backend/src/routes/me.ts - User Management
backend/src/routes/users.ts - Admin Operations
backend/src/routes/admin.ts
Restaurant and Orders
- Restaurants and Dishes
backend/src/routes/restaurants.ts - Orders
backend/src/routes/orders.ts - Claims and Credits
backend/src/routes/claims.ts
Delivery and Reservations
- History and Agents
backend/src/routes/history.ts - Reservations
backend/src/routes/reservations.ts - Location and Routing
backend/src/routes/geo.ts - File Uploads
backend/src/routes/uploads.ts
Shared Services
- Account Services
backend/src/services/accounts.ts - Floor Planning
backend/src/services/floorPlan.ts - Road Routing
backend/src/services/routing.ts - Weather Lookup
backend/src/services/weather.ts - JSON Serializers
backend/src/serializers.ts
Other components
- Client App
- Admin Console
backend/public/console/console.js - PostgreSQL
- OSRM
- Open-Meteo
Connections 26
- Client App → HTTP API: calls API
- Admin Console → HTTP API: uses console route
backend/src/app.ts - HTTP API → Authentication: mounts
backend/src/app.ts - HTTP API → My Account: mounts
backend/src/app.ts - HTTP API → User Management: mounts
backend/src/app.ts - HTTP API → Admin Operations: mounts
backend/src/app.ts - HTTP API → Restaurants and Dishes: mounts
backend/src/app.ts - HTTP API → Orders: mounts
backend/src/app.ts - HTTP API → Claims and Credits: mounts
backend/src/app.ts - HTTP API → History and Agents: mounts
backend/src/app.ts - HTTP API → Reservations: mounts
backend/src/app.ts - HTTP API → Location and Routing: mounts
backend/src/app.ts - HTTP API → File Uploads: mounts
backend/src/app.ts - Authentication → Account Services: uses
backend/src/routes/auth.ts - My Account → Account Services: uses
backend/src/routes/me.ts - User Management → Account Services: uses
backend/src/routes/users.ts - Reservations → Floor Planning: uses
backend/src/routes/reservations.ts - Location and Routing → Road Routing: uses
backend/src/routes/geo.ts - Road Routing → OSRM: requests routes
backend/src/services/routing.ts - Weather Lookup → Open-Meteo: fetches weather
backend/src/services/weather.ts - Authentication → PostgreSQL: reads and writes
backend/src/routes/auth.ts - Restaurants and Dishes → PostgreSQL: reads and writes
backend/src/routes/restaurants.ts - Orders → PostgreSQL: reads and writes
backend/src/routes/orders.ts - Reservations → PostgreSQL: reads and writes
backend/src/routes/reservations.ts - History and Agents → PostgreSQL: reads
backend/src/routes/history.ts - Claims and Credits → JSON Serializers: serializes results
backend/src/routes/claims.ts