# mrpee309/deallakay architecture

> Architecture diagram of the GitHub repository mrpee309/deallakay, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrpee309/deallakay
- Repository: https://github.com/mrpee309/deallakay

## Overview

DealLakay is a Haitian marketplace for buying and selling technology products, with related seller, supplier, technician, request, social, alert, and transport features. Users interact through a React frontend and FastAPI backend, whose routers handle domain operations against shared MongoDB-backed state. The excerpts confirm authentication utilities, shared authorization, server router registration, admin operations, and driver workflows; frontend-to-backend wiring and several router internals were not shown, so those relationships are left unverified.

Main entry points: [`backend/server.py`](https://github.com/mrpee309/deallakay/blob/main/backend/server.py) (FastAPI server), [`frontend/src/App.js`](https://github.com/mrpee309/deallakay/blob/main/frontend/src/App.js) (Web application), [`backend/routers/auth.py`](https://github.com/mrpee309/deallakay/blob/main/backend/routers/auth.py) (Authentication endpoints), [`backend/routers/requests.py`](https://github.com/mrpee309/deallakay/blob/main/backend/routers/requests.py) (Buyer requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Marketplace frontend"]
  node_app["Web application<br/>[App.js]"]
  node_home["Marketplace discovery<br/>[Home.jsx]"]
  node_browse["Product browsing<br/>[Browse.jsx]"]
  node_product["Product details<br/>[ProductPage.jsx]"]
  node_requests_ui["Requests interface<br/>[Requests.jsx]"]
  node_seller_ui["Seller workspace"]
  node_tech_ui["Technician workspace"]
  node_admin_ui["Admin workspace<br/>[AdminDashboard.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_server["FastAPI server<br/>[server.py]"]
  node_products["Product listings<br/>[products.py]"]
  node_requests["Buyer requests<br/>[requests.py]"]
  node_sellers["Seller profiles<br/>[sellers.py]"]
  node_businesses["Business profiles<br/>[businesses.py]"]
  node_suppliers["Supplier profiles<br/>[suppliers.py]"]
  node_technicians["Technician services<br/>[technicians.py]"]
  node_transport["Transport services<br/>[transport.py]"]
  node_social["Social features<br/>[social.py]"]
  node_alerts["User alerts<br/>[alerts.py]"]
  node_admin["Administration<br/>[admin.py]"]
end

subgraph group_identity["Identity and security"]
  node_auth_routes["Authentication endpoints<br/>[auth.py]"]
  node_auth_lib["Token and password tools<br/>[auth.py]"]
  node_shared["Shared auth and database<br/>[shared.py]"]
  node_security["Request protections<br/>[security.py]"]
  node_email["Email delivery<br/>[email_service.py]"]
end

subgraph group_operations["Marketplace operations"]
  node_mongo[("MongoDB")]
  node_seed["Category and site defaults<br/>[seed_data.py]"]
end

node_users(("Marketplace users"))
node_brevo["Brevo email service"]

node_users -.->|"use"| node_app
node_app -.->|"renders"| node_home
node_app -.->|"routes to"| node_browse
node_app -.->|"routes to"| node_product
node_app -.->|"routes to"| node_requests_ui
node_app -.->|"routes to"| node_seller_ui
node_app -.->|"routes to"| node_tech_ui
node_app -.->|"routes to"| node_admin_ui
node_app -.->|"uses"| node_api_client
node_api_client -.->|"HTTP requests"| node_server
node_server -->|"registers"| node_auth_routes
node_server -->|"registers"| node_alerts
node_server -->|"registers"| node_suppliers
node_server -->|"registers"| node_transport
node_server -.->|"routes to"| node_products
node_server -.->|"routes to"| node_requests
node_server -.->|"routes to"| node_sellers
node_server -.->|"routes to"| node_businesses
node_server -.->|"routes to"| node_technicians
node_server -.->|"routes to"| node_social
node_server -.->|"routes to"| node_admin
node_auth_routes -->|"creates tokens"| node_auth_lib
node_shared -->|"decodes tokens"| node_auth_lib
node_auth_routes -->|"sends verification"| node_email
node_requests -->|"uses email"| node_email
node_auth_routes -->|"rate limits"| node_security
node_shared -->|"reads users"| node_mongo
node_products -.->|"reads and writes"| node_mongo
node_requests -.->|"reads and writes"| node_mongo
node_sellers -.->|"reads and writes"| node_mongo
node_businesses -.->|"reads and writes"| node_mongo
node_suppliers -.->|"reads and writes"| node_mongo
node_technicians -.->|"reads and writes"| node_mongo
node_transport -.->|"reads and writes"| node_mongo
node_social -.->|"reads and writes"| node_mongo
node_alerts -.->|"reads and writes"| node_mongo
node_admin -->|"reads and writes"| node_mongo
node_server -.->|"loads defaults"| node_seed
node_email -->|"sends email"| node_brevo

click node_app "https://github.com/mrpee309/deallakay/blob/main/frontend/src/App.js"
click node_home "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Home.jsx"
click node_browse "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Browse.jsx"
click node_product "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/ProductPage.jsx"
click node_requests_ui "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Requests.jsx"
click node_seller_ui "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/SellerDashboard.jsx"
click node_tech_ui "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/TechnicianDashboard.jsx"
click node_admin_ui "https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_api_client "https://github.com/mrpee309/deallakay/blob/main/frontend/src/lib/api.js"
click node_server "https://github.com/mrpee309/deallakay/blob/main/backend/server.py"
click node_products "https://github.com/mrpee309/deallakay/blob/main/backend/routers/products.py"
click node_requests "https://github.com/mrpee309/deallakay/blob/main/backend/routers/requests.py"
click node_sellers "https://github.com/mrpee309/deallakay/blob/main/backend/routers/sellers.py"
click node_businesses "https://github.com/mrpee309/deallakay/blob/main/backend/routers/businesses.py"
click node_suppliers "https://github.com/mrpee309/deallakay/blob/main/backend/routers/suppliers.py"
click node_technicians "https://github.com/mrpee309/deallakay/blob/main/backend/routers/technicians.py"
click node_transport "https://github.com/mrpee309/deallakay/blob/main/backend/routers/transport.py"
click node_social "https://github.com/mrpee309/deallakay/blob/main/backend/routers/social.py"
click node_alerts "https://github.com/mrpee309/deallakay/blob/main/backend/routers/alerts.py"
click node_admin "https://github.com/mrpee309/deallakay/blob/main/backend/routers/admin.py"
click node_auth_routes "https://github.com/mrpee309/deallakay/blob/main/backend/routers/auth.py"
click node_auth_lib "https://github.com/mrpee309/deallakay/blob/main/backend/auth.py"
click node_shared "https://github.com/mrpee309/deallakay/blob/main/backend/shared.py"
click node_security "https://github.com/mrpee309/deallakay/blob/main/backend/security.py"
click node_email "https://github.com/mrpee309/deallakay/blob/main/backend/email_service.py"
click node_seed "https://github.com/mrpee309/deallakay/blob/main/backend/seed_data.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_browse,node_product,node_requests_ui,node_seller_ui,node_tech_ui,node_admin_ui,node_api_client,node_users toneBlue
class node_server,node_products,node_requests,node_sellers,node_businesses,node_suppliers,node_technicians,node_transport,node_social,node_alerts,node_admin toneAmber
class node_auth_routes,node_auth_lib,node_shared,node_security,node_email toneMint
class node_mongo,node_seed toneRose
class node_brevo toneIndigo
```

## Components

### Marketplace frontend

- [Web application](https://github.com/mrpee309/deallakay/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Marketplace discovery](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Product browsing](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Browse.jsx): `frontend/src/pages/Browse.jsx`
- [Product details](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/ProductPage.jsx): `frontend/src/pages/ProductPage.jsx`
- [Requests interface](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/Requests.jsx): `frontend/src/pages/Requests.jsx`
- [Seller workspace](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/SellerDashboard.jsx): `frontend/src/pages/SellerDashboard.jsx`
- [Technician workspace](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/TechnicianDashboard.jsx): `frontend/src/pages/TechnicianDashboard.jsx`
- [Admin workspace](https://github.com/mrpee309/deallakay/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [API client](https://github.com/mrpee309/deallakay/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### Backend API

- [FastAPI server](https://github.com/mrpee309/deallakay/blob/main/backend/server.py): `backend/server.py`
- [Product listings](https://github.com/mrpee309/deallakay/blob/main/backend/routers/products.py): `backend/routers/products.py`
- [Buyer requests](https://github.com/mrpee309/deallakay/blob/main/backend/routers/requests.py): `backend/routers/requests.py`
- [Seller profiles](https://github.com/mrpee309/deallakay/blob/main/backend/routers/sellers.py): `backend/routers/sellers.py`
- [Business profiles](https://github.com/mrpee309/deallakay/blob/main/backend/routers/businesses.py): `backend/routers/businesses.py`
- [Supplier profiles](https://github.com/mrpee309/deallakay/blob/main/backend/routers/suppliers.py): `backend/routers/suppliers.py`
- [Technician services](https://github.com/mrpee309/deallakay/blob/main/backend/routers/technicians.py): `backend/routers/technicians.py`
- [Transport services](https://github.com/mrpee309/deallakay/blob/main/backend/routers/transport.py): `backend/routers/transport.py`
- [Social features](https://github.com/mrpee309/deallakay/blob/main/backend/routers/social.py): `backend/routers/social.py`
- [User alerts](https://github.com/mrpee309/deallakay/blob/main/backend/routers/alerts.py): `backend/routers/alerts.py`
- [Administration](https://github.com/mrpee309/deallakay/blob/main/backend/routers/admin.py): `backend/routers/admin.py`

### Identity and security

- [Authentication endpoints](https://github.com/mrpee309/deallakay/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Token and password tools](https://github.com/mrpee309/deallakay/blob/main/backend/auth.py): `backend/auth.py`
- [Shared auth and database](https://github.com/mrpee309/deallakay/blob/main/backend/shared.py): `backend/shared.py`
- [Request protections](https://github.com/mrpee309/deallakay/blob/main/backend/security.py): `backend/security.py`
- [Email delivery](https://github.com/mrpee309/deallakay/blob/main/backend/email_service.py): `backend/email_service.py`

### Marketplace operations

- **MongoDB**
- [Category and site defaults](https://github.com/mrpee309/deallakay/blob/main/backend/seed_data.py): `backend/seed_data.py`

### Other components

- **Marketplace users**
- **Brevo email service**

## Connections

- Marketplace users → Web application: use
- Web application → Marketplace discovery: renders
- Web application → Product browsing: routes to
- Web application → Product details: routes to
- Web application → Requests interface: routes to
- Web application → Seller workspace: routes to
- Web application → Technician workspace: routes to
- Web application → Admin workspace: routes to
- Web application → API client: uses
- API client → FastAPI server: HTTP requests
- FastAPI server → Authentication endpoints: registers (evidence: `backend/server.py`)
- FastAPI server → User alerts: registers (evidence: `backend/server.py`)
- FastAPI server → Supplier profiles: registers (evidence: `backend/server.py`)
- FastAPI server → Transport services: registers (evidence: `backend/server.py`)
- FastAPI server → Product listings: routes to (evidence: `backend/server.py`)
- FastAPI server → Buyer requests: routes to (evidence: `backend/server.py`)
- FastAPI server → Seller profiles: routes to (evidence: `backend/server.py`)
- FastAPI server → Business profiles: routes to (evidence: `backend/server.py`)
- FastAPI server → Technician services: routes to (evidence: `backend/server.py`)
- FastAPI server → Social features: routes to (evidence: `backend/server.py`)
- FastAPI server → Administration: routes to (evidence: `backend/server.py`)
- Authentication endpoints → Token and password tools: creates tokens (evidence: `backend/routers/auth.py`)
- Shared auth and database → Token and password tools: decodes tokens (evidence: `backend/shared.py`)
- Authentication endpoints → Email delivery: sends verification (evidence: `backend/routers/auth.py`)
- Buyer requests → Email delivery: uses email (evidence: `backend/email_service.py`)
- Authentication endpoints → Request protections: rate limits (evidence: `backend/routers/auth.py`)
- Shared auth and database → MongoDB: reads users (evidence: `backend/shared.py`)
- Product listings → MongoDB: reads and writes
- Buyer requests → MongoDB: reads and writes
- Seller profiles → MongoDB: reads and writes
- Business profiles → MongoDB: reads and writes
- Supplier profiles → MongoDB: reads and writes
- Technician services → MongoDB: reads and writes
- Transport services → MongoDB: reads and writes
- Social features → MongoDB: reads and writes
- User alerts → MongoDB: reads and writes
- Administration → MongoDB: reads and writes (evidence: `backend/routers/admin.py`)
- FastAPI server → Category and site defaults: loads defaults (evidence: `backend/server.py`)
- Email delivery → Brevo email service: sends email (evidence: `backend/email_service.py`)
