# chandu4203/quantum_website architecture

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

- Interactive diagram: https://gitdiagram.com/chandu4203/quantum_website
- Repository: https://github.com/chandu4203/quantum_website

## Overview

Project Pulse is a team knowledge-check web app: members sign in, explore course lessons, take a timed project-practices quiz, and save their score. The configured start command runs the FastAPI backend alongside Vite; the browser code calls the login and result APIs, and FastAPI reads and writes PostgreSQL. The tree also contains a Node API implementation in server.js, but the configured start command does not launch it. Lesson details are only partly visible in the sampled client source, so their internal wiring is not expanded.

Main entry points: [`fastapi_app.py`](https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py) (FastAPI routes), [`script.js`](https://github.com/chandu4203/quantum_website/blob/main/script.js) (Course and quiz), [`index.html`](https://github.com/chandu4203/quantum_website/blob/main/index.html) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_web["Web interface<br/>[index.html]"]
  node_client_logic["Course and quiz<br/>[script.js]"]
  node_auth_panel["Sign-in<br/>[script.js]"]
  node_course["Lessons and video<br/>[script.js]"]
  node_quiz["Timed quiz<br/>[script.js]"]
  node_results["Score feedback<br/>[script.js]"]
end

subgraph group_api["API and identity"]
  node_fastapi["FastAPI routes<br/>[fastapi_app.py]"]
  node_identity["Session identity<br/>[fastapi_app.py]"]
  node_result_save["Result validation<br/>[fastapi_app.py]"]
end

subgraph group_data["Persistent data"]
  node_postgres[("PostgreSQL")]
  node_schema["Table definitions<br/>[schema.sql]"]
end

node_member(("Team member"))

node_member -->|"opens"| node_web
node_web -->|"loads"| node_client_logic
node_client_logic -->|"shows"| node_auth_panel
node_client_logic -->|"selects lessons"| node_course
node_client_logic -->|"starts quiz"| node_quiz
node_quiz -->|"computes score"| node_results
node_auth_panel -->|"POST login"| node_fastapi
node_fastapi -->|"checks credentials"| node_identity
node_identity -->|"reads users"| node_postgres
node_fastapi -->|"initializes tables"| node_postgres
node_quiz -->|"POST result"| node_fastapi
node_fastapi -->|"validates result"| node_result_save
node_result_save -->|"inserts attempt"| node_postgres
node_fastapi -->|"returns user"| node_auth_panel
node_fastapi -->|"returns save status"| node_results

click node_web "https://github.com/chandu4203/quantum_website/blob/main/index.html"
click node_client_logic "https://github.com/chandu4203/quantum_website/blob/main/script.js"
click node_auth_panel "https://github.com/chandu4203/quantum_website/blob/main/script.js"
click node_course "https://github.com/chandu4203/quantum_website/blob/main/script.js"
click node_quiz "https://github.com/chandu4203/quantum_website/blob/main/script.js"
click node_results "https://github.com/chandu4203/quantum_website/blob/main/script.js"
click node_fastapi "https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py"
click node_identity "https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py"
click node_result_save "https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py"
click node_schema "https://github.com/chandu4203/quantum_website/blob/main/schema.sql"

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_web,node_client_logic,node_auth_panel,node_course,node_quiz,node_results toneBlue
class node_fastapi,node_identity,node_result_save toneAmber
class node_postgres,node_schema toneMint
class node_member toneIndigo
```

## Components

### Browser experience

- [Web interface](https://github.com/chandu4203/quantum_website/blob/main/index.html): `index.html`
- [Course and quiz](https://github.com/chandu4203/quantum_website/blob/main/script.js): `script.js`
- [Sign-in](https://github.com/chandu4203/quantum_website/blob/main/script.js): `script.js`
- [Lessons and video](https://github.com/chandu4203/quantum_website/blob/main/script.js): `script.js`
- [Timed quiz](https://github.com/chandu4203/quantum_website/blob/main/script.js): `script.js`
- [Score feedback](https://github.com/chandu4203/quantum_website/blob/main/script.js): `script.js`

### API and identity

- [FastAPI routes](https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py): `fastapi_app.py`
- [Session identity](https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py): `fastapi_app.py`
- [Result validation](https://github.com/chandu4203/quantum_website/blob/main/fastapi_app.py): `fastapi_app.py`

### Persistent data

- **PostgreSQL**
- [Table definitions](https://github.com/chandu4203/quantum_website/blob/main/schema.sql): `schema.sql`

### Other components

- **Team member**

## Connections

- Team member → Web interface: opens
- Web interface → Course and quiz: loads
- Course and quiz → Sign-in: shows
- Course and quiz → Lessons and video: selects lessons
- Course and quiz → Timed quiz: starts quiz
- Timed quiz → Score feedback: computes score
- Sign-in → FastAPI routes: POST login
- FastAPI routes → Session identity: checks credentials
- Session identity → PostgreSQL: reads users
- FastAPI routes → PostgreSQL: initializes tables
- Timed quiz → FastAPI routes: POST result
- FastAPI routes → Result validation: validates result
- Result validation → PostgreSQL: inserts attempt
- FastAPI routes → Sign-in: returns user
- FastAPI routes → Score feedback: returns save status
