# sahilshaikh00067/latestchatway architecture

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

- Interactive diagram: https://gitdiagram.com/sahilshaikh00067/latestchatway
- Repository: https://github.com/sahilshaikh00067/latestchatway

## Overview

The repository is a WhatsApp campaign-management web application: users authenticate, enter a role-gated dashboard, manage users and credits, create campaigns, and review campaign or credit reports. The React app routes to these screens and the Django API implements the backend domain and persistence. The excerpts show route ownership, API URL routing, campaign/user models, and a Supabase upload path; most frontend-to-API calls are not excerpted, so those links are marked unverified.

Main entry points: [`src/App.jsx`](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/App.jsx) (Route application), [`backend/api/urls.py`](https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/urls.py) (API routes), [`backend/api/views.py`](https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/views.py) (API operations), [`src/components/Dashboard.jsx`](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Dashboard.jsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Route application<br/>[App.jsx]"]
  node_header["Navigation shell<br/>[Header.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_notfound["Not found<br/>[PageNotFound.jsx]"]
end

subgraph group_access["Access and administration"]
  node_login["Login<br/>[Login.jsx]"]
  node_logout["Logout<br/>[Logout.jsx]"]
  node_adminroute["Role gate<br/>[AdminRoute.jsx]"]
  node_adduser["Add user<br/>[AddUser.jsx]"]
  node_manageuser["Manage users<br/>[ManageUser.jsx]"]
  node_credithistory["Credit history<br/>[CreditHistory.jsx]"]
end

subgraph group_campaigns["Campaign operations"]
  node_campaign["WhatsApp campaign<br/>[WappCampaign.jsx]"]
  node_dpcampaign["DP campaign<br/>[WappDpCampaign.jsx]"]
  node_reports["Campaign reports<br/>[WappReports.jsx]"]
end

subgraph group_backend["Backend and persistence"]
  node_apiurls["API routes<br/>[urls.py]"]
  node_apiviews["API operations<br/>[views.py]"]
  node_domainmodels["User and campaign models<br/>[models.py]"]
  node_database[("Django database")]
end

node_visitor(("User"))
node_supabase[("Supabase storage")]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"guards routes"| node_adminroute
node_app -->|"wraps screens"| node_header
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_campaign
node_app -->|"routes to"| node_dpcampaign
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_adduser
node_app -->|"routes to"| node_manageuser
node_app -->|"routes to"| node_credithistory
node_app -->|"routes to"| node_logout
node_app -->|"routes to"| node_notfound
node_header -->|"renders outlet"| node_dashboard
node_apiurls -->|"routes requests"| node_apiviews
node_apiviews -->|"uses models"| node_domainmodels
node_domainmodels -.->|"persists records"| node_database
node_login -.->|"submits credentials"| node_apiurls
node_dashboard -.->|"fetches campaigns"| node_apiurls
node_adduser -.->|"creates users"| node_apiurls
node_manageuser -.->|"manages accounts"| node_apiurls
node_credithistory -.->|"fetches history"| node_apiurls
node_campaign -.->|"submits campaign"| node_apiurls
node_dpcampaign -.->|"submits campaign"| node_apiurls
node_reports -.->|"fetches reports"| node_apiurls
node_apiviews -->|"uploads media"| node_supabase

click node_app "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/App.jsx"
click node_header "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Header.jsx"
click node_dashboard "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Dashboard.jsx"
click node_login "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Login.jsx"
click node_logout "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Logout.jsx"
click node_adminroute "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/AdminRoute.jsx"
click node_adduser "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/AddUser.jsx"
click node_manageuser "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/ManageUser.jsx"
click node_credithistory "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/CreditHistory.jsx"
click node_notfound "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/PageNotFound.jsx"
click node_campaign "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappCampaign.jsx"
click node_dpcampaign "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappDpCampaign.jsx"
click node_reports "https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappReports.jsx"
click node_apiurls "https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/urls.py"
click node_apiviews "https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/views.py"
click node_domainmodels "https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/models.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_header,node_dashboard,node_notfound,node_visitor toneBlue
class node_login,node_logout,node_adminroute,node_adduser,node_manageuser,node_credithistory,node_supabase toneAmber
class node_campaign,node_dpcampaign,node_reports toneMint
class node_apiurls,node_apiviews,node_domainmodels,node_database toneRose
```

## Components

### Web application

- [Route application](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation shell](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Dashboard](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Not found](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/PageNotFound.jsx): `src/components/PageNotFound.jsx`

### Access and administration

- [Login](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Login.jsx): `src/components/Login.jsx`
- [Logout](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/Logout.jsx): `src/components/Logout.jsx`
- [Role gate](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/AdminRoute.jsx): `src/components/category/AdminRoute.jsx`
- [Add user](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/AddUser.jsx): `src/components/AddUser.jsx`
- [Manage users](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/ManageUser.jsx): `src/components/ManageUser.jsx`
- [Credit history](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/CreditHistory.jsx): `src/components/category/CreditHistory.jsx`

### Campaign operations

- [WhatsApp campaign](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappCampaign.jsx): `src/components/category/WappCampaign.jsx`
- [DP campaign](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappDpCampaign.jsx): `src/components/category/WappDpCampaign.jsx`
- [Campaign reports](https://github.com/sahilshaikh00067/latestchatway/blob/main/src/components/category/WappReports.jsx): `src/components/category/WappReports.jsx`

### Backend and persistence

- [API routes](https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/urls.py): `backend/api/urls.py`
- [API operations](https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/views.py): `backend/api/views.py`
- [User and campaign models](https://github.com/sahilshaikh00067/latestchatway/blob/main/backend/api/models.py): `backend/api/models.py`
- **Django database**

### Other components

- **User**
- **Supabase storage**

## Connections

- User → Route application: uses
- Route application → Login: routes to (evidence: `src/App.jsx`)
- Route application → Role gate: guards routes (evidence: `src/App.jsx`)
- Route application → Navigation shell: wraps screens (evidence: `src/App.jsx`)
- Route application → Dashboard: routes to (evidence: `src/App.jsx`)
- Route application → WhatsApp campaign: routes to (evidence: `src/App.jsx`)
- Route application → DP campaign: routes to (evidence: `src/App.jsx`)
- Route application → Campaign reports: routes to (evidence: `src/App.jsx`)
- Route application → Add user: routes to (evidence: `src/App.jsx`)
- Route application → Manage users: routes to (evidence: `src/App.jsx`)
- Route application → Credit history: routes to (evidence: `src/App.jsx`)
- Route application → Logout: routes to (evidence: `src/App.jsx`)
- Route application → Not found: routes to (evidence: `src/App.jsx`)
- Navigation shell → Dashboard: renders outlet (evidence: `src/components/Header.jsx`)
- API routes → API operations: routes requests (evidence: `backend/api/urls.py`)
- API operations → User and campaign models: uses models (evidence: `backend/api/views.py`)
- User and campaign models → Django database: persists records
- Login → API routes: submits credentials
- Dashboard → API routes: fetches campaigns
- Add user → API routes: creates users
- Manage users → API routes: manages accounts
- Credit history → API routes: fetches history
- WhatsApp campaign → API routes: submits campaign
- DP campaign → API routes: submits campaign
- Campaign reports → API routes: fetches reports
- API operations → Supabase storage: uploads media (evidence: `backend/api/views.py`)
