# daniel-c-silva/plume architecture

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

- Interactive diagram: https://gitdiagram.com/daniel-c-silva/plume
- Repository: https://github.com/daniel-c-silva/plume

## Overview

Plume currently implements a basic account-registration flow: a user submits username and password in the React registration form, which posts to Flask; Flask hashes the password and stores the account in PostgreSQL, then returns feedback for display. The database initializer also defines an answers table and a per-user question counter, but no answer-handling workflow is shown. `App.jsx` is a separate Vite/React starter screen, not imported by the sampled entry point. The map reflects shown code; no broader product capabilities are documented in the provided README.

Main entry points: [`backend/app.py`](https://github.com/daniel-c-silva/plume/blob/main/backend/app.py) (Registration API), [`frontend/Plume/src/main.jsx`](https://github.com/daniel-c-silva/plume/blob/main/frontend/Plume/src/main.jsx) (Registration form), [`backend/db.py`](https://github.com/daniel-c-silva/plume/blob/main/backend/db.py) (DB initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_registration["Registration form<br/>[main.jsx]"]
  node_starter["Starter screen<br/>[App.jsx]"]
end

subgraph group_server["Registration backend"]
  node_api["Registration API<br/>[app.py]"]
end

subgraph group_persistence["Persistence"]
  node_dbhelpers["DB initializer<br/>[db.py]"]
end

node_user(("User"))
node_postgres[("PostgreSQL")]

node_user -->|"submits credentials"| node_registration
node_registration -->|"posts registration"| node_api
node_api -->|"initializes and connects"| node_dbhelpers
node_dbhelpers -->|"creates tables"| node_postgres
node_api -->|"inserts account"| node_postgres
node_api -->|"returns feedback"| node_registration

click node_registration "https://github.com/daniel-c-silva/plume/blob/main/frontend/Plume/src/main.jsx"
click node_starter "https://github.com/daniel-c-silva/plume/blob/main/frontend/Plume/src/App.jsx"
click node_api "https://github.com/daniel-c-silva/plume/blob/main/backend/app.py"
click node_dbhelpers "https://github.com/daniel-c-silva/plume/blob/main/backend/db.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_registration,node_starter,node_user toneBlue
class node_api,node_postgres toneAmber
class node_dbhelpers toneMint
```

## Components

### Client

- [Registration form](https://github.com/daniel-c-silva/plume/blob/main/frontend/Plume/src/main.jsx): `frontend/Plume/src/main.jsx`
- [Starter screen](https://github.com/daniel-c-silva/plume/blob/main/frontend/Plume/src/App.jsx): `frontend/Plume/src/App.jsx`

### Registration backend

- [Registration API](https://github.com/daniel-c-silva/plume/blob/main/backend/app.py): `backend/app.py`

### Persistence

- [DB initializer](https://github.com/daniel-c-silva/plume/blob/main/backend/db.py): `backend/db.py`

### Other components

- **User**
- **PostgreSQL**

## Connections

- User → Registration form: submits credentials (evidence: `frontend/Plume/src/main.jsx`)
- Registration form → Registration API: posts registration (evidence: `frontend/Plume/src/main.jsx`)
- Registration API → DB initializer: initializes and connects (evidence: `backend/app.py`)
- DB initializer → PostgreSQL: creates tables (evidence: `backend/db.py`)
- Registration API → PostgreSQL: inserts account (evidence: `backend/app.py`)
- Registration API → Registration form: returns feedback (evidence: `frontend/Plume/src/main.jsx`)
