# snelat05/projet_7030_api architecture

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

- Interactive diagram: https://gitdiagram.com/snelat05/projet_7030_api
- Repository: https://github.com/snelat05/projet_7030_api

## Overview

Ananda Marga is a Flask website for presenting the organization and its events, with volunteer enrollment and administration. Visitors browse public pages or submit volunteer details; administrators manage volunteer records and accounts, with login and password-recovery flows. The sampled code shows Flask routes coordinating validation, database operations, templates, and email delivery. The README documents the presentation and event capabilities; some route and template wiring is only partially excerpted, so those connections are limited to visible references.

Main entry points: [`app.py`](https://github.com/snelat05/projet_7030_api/blob/main/app.py) (Flask routes), [`database.py`](https://github.com/snelat05/projet_7030_api/blob/main/database.py) (Database access), [`templates/html/pages/formbenevol.html`](https://github.com/snelat05/projet_7030_api/blob/main/templates/html/pages/formbenevol.html) (Volunteer form), [`static/bootstrap/script.js`](https://github.com/snelat05/projet_7030_api/blob/main/static/bootstrap/script.js) (Volunteer search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_flask["Flask routes<br/>[app.py]"]
  node_public_pages["Public pages"]
  node_documentation["API documentation<br/>[document.html]"]
end

subgraph group_volunteers["Volunteer management"]
  node_volunteer_form["Volunteer form<br/>[formbenevol.html]"]
  node_volunteer_api["Volunteer API<br/>[app.py]"]
  node_search_ui["Volunteer search<br/>[script.js]"]
  node_volunteer_record["Volunteer model<br/>[benevol.py]"]
end

subgraph group_admin["Administration"]
  node_admin_flows["Admin account flows<br/>[app.py]"]
  node_admin_pages["Admin pages"]
  node_email["SMTP service"]
end

subgraph group_data["Data and validation"]
  node_validation["Volunteer schemas<br/>[schema.py]"]
  node_database["Database access<br/>[database.py]"]
  node_sqlite[("SQLite database<br/>[db.db]")]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"requests pages"| node_flask
node_flask -->|"renders pages"| node_public_pages
node_flask -->|"renders docs"| node_documentation
node_visitor -.->|"submits details"| node_volunteer_form
node_volunteer_form -.->|"posts details"| node_flask
node_flask -->|"routes requests"| node_volunteer_api
node_volunteer_api -->|"validates payload"| node_validation
node_volunteer_api -->|"searches records"| node_database
node_database -->|"creates records"| node_volunteer_record
node_database -->|"reads and writes"| node_sqlite
node_search_ui -->|"fetches results"| node_volunteer_api
node_admin_user -.->|"manages accounts"| node_admin_flows
node_flask -->|"routes admin flows"| node_admin_flows
node_admin_flows -->|"manages accounts"| node_database
node_admin_flows -->|"renders forms"| node_admin_pages
node_admin_flows -->|"sends recovery email"| node_email

click node_flask "https://github.com/snelat05/projet_7030_api/blob/main/app.py"
click node_public_pages "https://github.com/snelat05/projet_7030_api/tree/main/templates/html/pages"
click node_documentation "https://github.com/snelat05/projet_7030_api/blob/main/templates/document.html"
click node_volunteer_form "https://github.com/snelat05/projet_7030_api/blob/main/templates/html/pages/formbenevol.html"
click node_volunteer_api "https://github.com/snelat05/projet_7030_api/blob/main/app.py"
click node_search_ui "https://github.com/snelat05/projet_7030_api/blob/main/static/bootstrap/script.js"
click node_volunteer_record "https://github.com/snelat05/projet_7030_api/blob/main/benevol.py"
click node_admin_flows "https://github.com/snelat05/projet_7030_api/blob/main/app.py"
click node_admin_pages "https://github.com/snelat05/projet_7030_api/tree/main/templates/html/pages"
click node_validation "https://github.com/snelat05/projet_7030_api/blob/main/schema.py"
click node_database "https://github.com/snelat05/projet_7030_api/blob/main/database.py"
click node_sqlite "https://github.com/snelat05/projet_7030_api/blob/main/db/db.db"

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_flask,node_public_pages,node_documentation toneBlue
class node_volunteer_form,node_volunteer_api,node_search_ui,node_volunteer_record toneAmber
class node_admin_flows,node_admin_pages,node_email toneMint
class node_validation,node_database,node_sqlite toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### Web experience

- [Flask routes](https://github.com/snelat05/projet_7030_api/blob/main/app.py): `app.py`
- [Public pages](https://github.com/snelat05/projet_7030_api/tree/main/templates/html/pages): `templates/html/pages`
- [API documentation](https://github.com/snelat05/projet_7030_api/blob/main/templates/document.html): `templates/document.html`

### Volunteer management

- [Volunteer form](https://github.com/snelat05/projet_7030_api/blob/main/templates/html/pages/formbenevol.html): `templates/html/pages/formbenevol.html`
- [Volunteer API](https://github.com/snelat05/projet_7030_api/blob/main/app.py): `app.py`
- [Volunteer search](https://github.com/snelat05/projet_7030_api/blob/main/static/bootstrap/script.js): `static/bootstrap/script.js`
- [Volunteer model](https://github.com/snelat05/projet_7030_api/blob/main/benevol.py): `benevol.py`

### Administration

- [Admin account flows](https://github.com/snelat05/projet_7030_api/blob/main/app.py): `app.py`
- [Admin pages](https://github.com/snelat05/projet_7030_api/tree/main/templates/html/pages): `templates/html/pages`
- **SMTP service**

### Data and validation

- [Volunteer schemas](https://github.com/snelat05/projet_7030_api/blob/main/schema.py): `schema.py`
- [Database access](https://github.com/snelat05/projet_7030_api/blob/main/database.py): `database.py`
- [SQLite database](https://github.com/snelat05/projet_7030_api/blob/main/db/db.db): `db/db.db`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Flask routes: requests pages (evidence: `app.py`)
- Flask routes → Public pages: renders pages (evidence: `app.py`)
- Flask routes → API documentation: renders docs (evidence: `app.py`)
- Visitor → Volunteer form: submits details
- Volunteer form → Flask routes: posts details
- Flask routes → Volunteer API: routes requests (evidence: `app.py`)
- Volunteer API → Volunteer schemas: validates payload (evidence: `app.py`)
- Volunteer API → Database access: searches records (evidence: `app.py`)
- Database access → Volunteer model: creates records (evidence: `database.py`)
- Database access → SQLite database: reads and writes (evidence: `database.py`)
- Volunteer search → Volunteer API: fetches results (evidence: `static/bootstrap/script.js`)
- Administrator → Admin account flows: manages accounts
- Flask routes → Admin account flows: routes admin flows (evidence: `app.py`)
- Admin account flows → Database access: manages accounts (evidence: `database.py`)
- Admin account flows → Admin pages: renders forms (evidence: `app.py`)
- Admin account flows → SMTP service: sends recovery email (evidence: `app.py`)
