# stevy64/wayize architecture

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

- Interactive diagram: https://gitdiagram.com/stevy64/wayize
- Repository: https://github.com/stevy64/wayize

## Overview

Wayizé is a mobile-first Libreville traffic map: drivers browse reports and can submit incidents, support reports, or add comments; accounts optionally save places, and Premium enables route and alert features without payment processing. The browser’s PWA communicates with a Django frontend, which proxies API requests to a separate Django API; API domains share a database. The map, reporting, account, administration, place-catalogue, and push-notification branches are represented. Some routes and service calls were not sampled, so their connections are omitted or marked unverified.

Main entry points: [`backend/apps/signalements/models.py`](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/models.py) (Report models), [`backend/wayize_api/urls.py`](https://github.com/stevy64/wayize/blob/main/backend/wayize_api/urls.py) (API routes), [`backend/apps/signalements/views.py`](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/views.py) (Traffic reports), [`frontend/web/amont.py`](https://github.com/stevy64/wayize/blob/main/frontend/web/amont.py) (API proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Map client"]
  node_pwa["Map PWA<br/>[app.js]"]
  node_web["Web pages<br/>[views.py]"]
  node_proxy["API proxy<br/>[amont.py]"]
  node_adminui["Admin console<br/>[admin_vues.py]"]
end

subgraph group_api["API services"]
  node_apiroot["API routes<br/>[urls.py]"]
  node_pushapi["Push endpoints<br/>[notif_views.py]"]
  node_pushdelivery["Push delivery<br/>[push.py]"]
end

subgraph group_domain["Traffic domains"]
  node_reports["Traffic reports<br/>[views.py]"]
  node_reportdata["Report models<br/>[models.py]"]
  node_geography["City geography<br/>[geo.py]"]
  node_presentation["Report formatting<br/>[present.py]"]
  node_support["Report support<br/>[views.py]"]
  node_comments["Report comments<br/>[views.py]"]
  node_places[("Place catalogue<br/>[models.py]")]
end

subgraph group_account["Accounts and admin"]
  node_accounts["Accounts and lists<br/>[views.py]"]
  node_accountdata[("Account models<br/>[models.py]")]
  node_settingsadmin["Map administration<br/>[views.py]"]
end

subgraph group_ops["Shared services"]
  node_database[("Shared database<br/>[reglages.py]")]
  node_logging["Request logging<br/>[journal.py]"]
end

node_driver(("Driver"))

node_driver -->|"uses map"| node_pwa
node_pwa -.->|"requests API"| node_proxy
node_web -.->|"serves pages"| node_proxy
node_proxy -->|"proxies HTTP"| node_apiroot
node_adminui -.->|"uses API"| node_proxy
node_apiroot -.->|"routes reports"| node_reports
node_apiroot -->|"routes notifications"| node_pushapi
node_apiroot -->|"routes admin"| node_settingsadmin
node_reports -.->|"reads and writes"| node_reportdata
node_reports -.->|"validates locations"| node_geography
node_reports -.->|"formats reports"| node_presentation
node_support -.->|"supports reports"| node_reportdata
node_comments -.->|"comments on reports"| node_reportdata
node_accounts -->|"reads and writes"| node_accountdata
node_pushapi -->|"dispatches push"| node_pushdelivery
node_pushdelivery -->|"stores subscriptions"| node_reportdata
node_reportdata -->|"persists reports"| node_database
node_accountdata -->|"persists accounts"| node_database

click node_pwa "https://github.com/stevy64/wayize/blob/main/frontend/web/static/trafic/js/app.js"
click node_web "https://github.com/stevy64/wayize/blob/main/frontend/web/views.py"
click node_proxy "https://github.com/stevy64/wayize/blob/main/frontend/web/amont.py"
click node_adminui "https://github.com/stevy64/wayize/blob/main/frontend/web/admin_vues.py"
click node_apiroot "https://github.com/stevy64/wayize/blob/main/backend/wayize_api/urls.py"
click node_reports "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/views.py"
click node_reportdata "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/models.py"
click node_geography "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/geo.py"
click node_presentation "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/present.py"
click node_support "https://github.com/stevy64/wayize/blob/main/backend/apps/appuis/views.py"
click node_comments "https://github.com/stevy64/wayize/blob/main/backend/apps/commentaires/views.py"
click node_places "https://github.com/stevy64/wayize/blob/main/backend/apps/lieux/models.py"
click node_accounts "https://github.com/stevy64/wayize/blob/main/backend/apps/comptes/views.py"
click node_accountdata "https://github.com/stevy64/wayize/blob/main/backend/apps/comptes/models.py"
click node_settingsadmin "https://github.com/stevy64/wayize/blob/main/backend/apps/pilotage/views.py"
click node_pushapi "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/notif_views.py"
click node_pushdelivery "https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/push.py"
click node_database "https://github.com/stevy64/wayize/blob/main/backend/wayize_api/reglages.py"
click node_logging "https://github.com/stevy64/wayize/blob/main/backend/apps/journal.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_pwa,node_web,node_proxy,node_adminui toneBlue
class node_apiroot,node_pushapi,node_pushdelivery toneAmber
class node_reports,node_reportdata,node_geography,node_presentation,node_support,node_comments,node_places toneMint
class node_accounts,node_accountdata,node_settingsadmin toneRose
class node_database,node_logging,node_driver toneIndigo
```

## Components

### Map client

- [Map PWA](https://github.com/stevy64/wayize/blob/main/frontend/web/static/trafic/js/app.js): `frontend/web/static/trafic/js/app.js`
- [Web pages](https://github.com/stevy64/wayize/blob/main/frontend/web/views.py): `frontend/web/views.py`
- [API proxy](https://github.com/stevy64/wayize/blob/main/frontend/web/amont.py): `frontend/web/amont.py`
- [Admin console](https://github.com/stevy64/wayize/blob/main/frontend/web/admin_vues.py): `frontend/web/admin_vues.py`

### API services

- [API routes](https://github.com/stevy64/wayize/blob/main/backend/wayize_api/urls.py): `backend/wayize_api/urls.py`
- [Push endpoints](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/notif_views.py): `backend/apps/signalements/notif_views.py`
- [Push delivery](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/push.py): `backend/apps/signalements/push.py`

### Traffic domains

- [Traffic reports](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/views.py): `backend/apps/signalements/views.py`
- [Report models](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/models.py): `backend/apps/signalements/models.py`
- [City geography](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/geo.py): `backend/apps/signalements/geo.py`
- [Report formatting](https://github.com/stevy64/wayize/blob/main/backend/apps/signalements/present.py): `backend/apps/signalements/present.py`
- [Report support](https://github.com/stevy64/wayize/blob/main/backend/apps/appuis/views.py): `backend/apps/appuis/views.py`
- [Report comments](https://github.com/stevy64/wayize/blob/main/backend/apps/commentaires/views.py): `backend/apps/commentaires/views.py`
- [Place catalogue](https://github.com/stevy64/wayize/blob/main/backend/apps/lieux/models.py): `backend/apps/lieux/models.py`

### Accounts and admin

- [Accounts and lists](https://github.com/stevy64/wayize/blob/main/backend/apps/comptes/views.py): `backend/apps/comptes/views.py`
- [Account models](https://github.com/stevy64/wayize/blob/main/backend/apps/comptes/models.py): `backend/apps/comptes/models.py`
- [Map administration](https://github.com/stevy64/wayize/blob/main/backend/apps/pilotage/views.py): `backend/apps/pilotage/views.py`

### Shared services

- [Shared database](https://github.com/stevy64/wayize/blob/main/backend/wayize_api/reglages.py): `backend/wayize_api/reglages.py`
- [Request logging](https://github.com/stevy64/wayize/blob/main/backend/apps/journal.py): `backend/apps/journal.py`

### Other components

- **Driver**

## Connections

- Driver → Map PWA: uses map (evidence: `README.md`)
- Map PWA → API proxy: requests API
- Web pages → API proxy: serves pages
- API proxy → API routes: proxies HTTP (evidence: `README.md`)
- Admin console → API proxy: uses API (evidence: `frontend/web/admin_vues.py`)
- API routes → Traffic reports: routes reports
- API routes → Push endpoints: routes notifications (evidence: `backend/wayize_api/urls.py`)
- API routes → Map administration: routes admin (evidence: `backend/wayize_api/urls.py`)
- Traffic reports → Report models: reads and writes
- Traffic reports → City geography: validates locations
- Traffic reports → Report formatting: formats reports
- Report support → Report models: supports reports
- Report comments → Report models: comments on reports
- Accounts and lists → Account models: reads and writes (evidence: `backend/apps/comptes/views.py`)
- Push endpoints → Push delivery: dispatches push
- Push delivery → Report models: stores subscriptions (evidence: `backend/apps/signalements/push.py`)
- Report models → Shared database: persists reports (evidence: `README.md`)
- Account models → Shared database: persists accounts (evidence: `README.md`)
