# enatega/food-delivery-singlevendor architecture

> Architecture diagram of the GitHub repository enatega/food-delivery-singlevendor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enatega/food-delivery-singlevendor
- Repository: https://github.com/enatega/food-delivery-singlevendor

## Overview

##### Project type and purpose
- This is a full-stack, multi-module white-label food-delivery solution with three distinct client applications (Admin Dashboard, Customer App, Rider App) and a proprietary backend/API (Node.js + Apollo GraphQL) that connects to MongoDB and various external services.
- The Admin Dashboard (ReactJS) lets restaurant owners manage orders and riders. The Customer App (Expo/React Native) is for placing and tracking orders. The Rider App (Expo/React Native) is for drivers to accept and deliver orders.

##### File structure
- Top-level modules:
- Admin Dashboard/… (ReactJS + Reactstrap + Apollo client)
- CustomerApp/… (Expo/React Native + Apollo client)
- RiderApp/… (Expo/React Native + Apollo client)
- Each module has its own src folder with components, screens/views, Apollo setup, assets, i18n, config, and environment files.
- Root-level assets/, contributingGuides/, README.md, LICENSE, etc.
- No public source code for the backend; it’s closed/proprietary.

##### README for additional insights
- High-level architecture image: three clients all communicate with a single GraphQL API.
- Dependencies: Expo, React Native, ReactJS, Apollo GraphQL, ExpressJS, NodeJS, MongoDB, Firebase, Stripe, PayPal, Google Maps, Amplitude Analytics, email provider, OAuth (Facebook/Google).

##### Detail is key
- Four tiers: presentation (three clients), API, data, external.
- How localization, theme/context, and authentication plug into each client.
- Don’t omit push notifications, payment flows, or analytics events—they are critical to the solution.
- Review the high-level architecture image in the README as a starting reference and expand it with the internal folder structure and service integrations listed above.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Tier
    subgraph "Client Tier"
        direction LR
        AD["Admin Dashboard<br/>(ReactJS)"]:::client
        CA["Customer App<br/>(Expo/React Native)"]:::client
        RA["Rider App<br/>(Expo/React Native)"]:::client
    end

    %% API Layer
    AG["Apollo GraphQL Server<br/>(Node.js/Express)"]:::api

    %% Data Tier
    subgraph "Data Tier"
        MG["MongoDB"]:::data
        FB["Firebase Realtime DB/Firestore"]:::data
    end

    %% External Services
    subgraph "External Services"
        PM["Payments<br>(Stripe/PayPal)"]:::external
        OA["OAuth<br>(Facebook/Google)"]:::external
        GM["Google Maps API"]:::external
        EM["Email Service"]:::external
        AN["Amplitude Analytics"]:::external
    end

    %% Connections
    AD -->|"GraphQL queries & mutations over HTTPS/WSS"| AG
    CA -->|"GraphQL queries & mutations over HTTPS/WSS"| AG
    RA -->|"GraphQL queries & mutations over HTTPS/WSS"| AG

    AG -->|"Read/write orders, users, menus, settings"| MG
    AG -->|"Push notifications"| FB

    AG -->|"Process payments"| PM
    AG -->|"Authenticate users"| OA
    AG -->|"Geocode addresses"| GM
    AG -->|"Send order confirmations"| EM
    AG -->|"Event tracking"| AN

    %% Click Events - Admin Dashboard
    click AD "https://github.com/enatega/food-delivery-singlevendor/tree/main/Admin Dashboard/"
    click AD "https://github.com/enatega/food-delivery-singlevendor/blob/main/Admin Dashboard/src/apollo/server.js"
    click AD "https://github.com/enatega/food-delivery-singlevendor/blob/main/Admin Dashboard/.env.development"
    click AD "https://github.com/enatega/food-delivery-singlevendor/blob/main/Admin Dashboard/.env.staging"
    click AD "https://github.com/enatega/food-delivery-singlevendor/blob/main/Admin Dashboard/.env.production"
    click AD "https://github.com/enatega/food-delivery-singlevendor/blob/main/Admin Dashboard/.env.example"
    click AD "https://github.com/enatega/food-delivery-singlevendor/tree/main/Admin Dashboard/src/translations/"

    %% Click Events - Customer App
    click CA "https://github.com/enatega/food-delivery-singlevendor/tree/main/CustomerApp/"
    click CA "https://github.com/enatega/food-delivery-singlevendor/blob/main/CustomerApp/src/apollo/index.js"
    click CA "https://github.com/enatega/food-delivery-singlevendor/blob/main/CustomerApp/src/apollo/server.js"
    click CA "https://github.com/enatega/food-delivery-singlevendor/blob/main/CustomerApp/environment.js"
    click CA "https://github.com/enatega/food-delivery-singlevendor/blob/main/CustomerApp/environment.js.example"
    click CA "https://github.com/enatega/food-delivery-singlevendor/blob/main/CustomerApp/google-services.json"
    click CA "https://github.com/enatega/food-delivery-singlevendor/tree/main/CustomerApp/src/Theme/"
    click CA "https://github.com/enatega/food-delivery-singlevendor/tree/main/CustomerApp/src/context/"
    click CA "https://github.com/enatega/food-delivery-singlevendor/tree/main/CustomerApp/translations/"

    %% Click Events - Rider App
    click RA "https://github.com/enatega/food-delivery-singlevendor/tree/main/RiderApp/"
    click RA "https://github.com/enatega/food-delivery-singlevendor/tree/main/RiderApp/src/apollo/"
    click RA "https://github.com/enatega/food-delivery-singlevendor/blob/main/RiderApp/environment.js"
    click RA "https://github.com/enatega/food-delivery-singlevendor/tree/main/RiderApp/languages/"
    click RA "https://github.com/enatega/food-delivery-singlevendor/tree/main/RiderApp/src/context/"

    %% Click Events - Shared Docs & Assets
    click README.md "https://github.com/enatega/food-delivery-singlevendor/blob/main/README.md"
    click LICENSE "https://github.com/enatega/food-delivery-singlevendor/tree/main/LICENSE"
    click CODE_OF_CONDUCT.md "https://github.com/enatega/food-delivery-singlevendor/blob/main/CODE_OF_CONDUCT.md"
    click CONTRIBUTING.md "https://github.com/enatega/food-delivery-singlevendor/blob/main/CONTRIBUTING.md"
    click contributingGuides/ "https://github.com/enatega/food-delivery-singlevendor/tree/main/contributingGuides/"
    click assets/ "https://github.com/enatega/food-delivery-singlevendor/tree/main/assets/"

    %% Styles
    classDef client fill:#D0E6FF,stroke:#3399FF,color:#000
    classDef api fill:#DFF5D0,stroke:#33AA00,color:#000
    classDef data fill:#FFE5B4,stroke:#FF9900,color:#000
    classDef external fill:#E0E0E0,stroke:#888,color:#000
```
