# salsabeelquraan/todo-app architecture

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

- Interactive diagram: https://gitdiagram.com/salsabeelquraan/todo-app
- Repository: https://github.com/salsabeelquraan/todo-app

## Overview

My Tasks is a browser-based to-do app backed by an Express REST API and PostgreSQL. The user works in the browser UI; the client loads tasks, applies task edits and ordering through the API, and updates its rendered view. The API validates requests and persists task data. The README documents additional client capabilities, including search, filters, due-date indicators, themes, counters, and undo. Client source is excerpted only in part, so those capabilities are represented at the client level rather than as separately verified modules.

Main entry points: [`server.js`](https://github.com/salsabeelquraan/todo-app/blob/main/server.js) (REST routes), [`public/index.html`](https://github.com/salsabeelquraan/todo-app/blob/main/public/index.html) (Task interface), [`public/script.js`](https://github.com/salsabeelquraan/todo-app/blob/main/public/script.js) (Task interactions), [`schema.sql`](https://github.com/salsabeelquraan/todo-app/blob/main/schema.sql) (Task schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser app"]
  node_ui["Task interface<br/>[index.html]"]
  node_client["Task interactions<br/>[script.js]"]
end

subgraph group_backend["API"]
  node_api["REST routes<br/>[server.js]"]
  node_validation["Request validation<br/>[server.js]"]
end

subgraph group_data["Task storage"]
  node_schema["Task schema<br/>[schema.sql]"]
  node_postgres[("PostgreSQL")]
end

node_user(("Task user"))

node_user -->|"uses"| node_ui
node_ui -->|"hosts"| node_client
node_client -->|"fetches tasks"| node_api
node_api -->|"validates input"| node_validation
node_api -->|"queries"| node_postgres
node_schema -->|"defines tables"| node_postgres

click node_ui "https://github.com/salsabeelquraan/todo-app/blob/main/public/index.html"
click node_client "https://github.com/salsabeelquraan/todo-app/blob/main/public/script.js"
click node_api "https://github.com/salsabeelquraan/todo-app/blob/main/server.js"
click node_validation "https://github.com/salsabeelquraan/todo-app/blob/main/server.js"
click node_schema "https://github.com/salsabeelquraan/todo-app/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_ui,node_client toneBlue
class node_api,node_validation toneAmber
class node_schema,node_postgres toneMint
class node_user toneRose
```

## Components

### Browser app

- [Task interface](https://github.com/salsabeelquraan/todo-app/blob/main/public/index.html): `public/index.html`
- [Task interactions](https://github.com/salsabeelquraan/todo-app/blob/main/public/script.js): `public/script.js`

### API

- [REST routes](https://github.com/salsabeelquraan/todo-app/blob/main/server.js): `server.js`
- [Request validation](https://github.com/salsabeelquraan/todo-app/blob/main/server.js): `server.js`

### Task storage

- [Task schema](https://github.com/salsabeelquraan/todo-app/blob/main/schema.sql): `schema.sql`
- **PostgreSQL**

### Other components

- **Task user**

## Connections

- Task user → Task interface: uses (evidence: `README.md`)
- Task interface → Task interactions: hosts (evidence: `README.md`)
- Task interactions → REST routes: fetches tasks (evidence: `public/script.js`)
- REST routes → Request validation: validates input (evidence: `server.js`)
- REST routes → PostgreSQL: queries (evidence: `server.js`)
- Task schema → PostgreSQL: defines tables (evidence: `README.md`)
