# santhoshrajkg/to-do-list architecture

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

- Interactive diagram: https://gitdiagram.com/santhoshrajkg/to-do-list
- Repository: https://github.com/santhoshrajkg/to-do-list

## Overview

This is a small Express to-do list. A user requests the default or work list; the app selects in-memory items, obtains the displayed date for the default list, and renders the shared EJS list view. Submitted items are added to the selected in-memory array, then the app redirects to that list. The source shows no persistent storage. The view templates beyond list.ejs and the stylesheet were not sampled, so they are omitted.

Main entry points: [`app.js`](https://github.com/santhoshrajkg/to-do-list/blob/main/app.js) (Express app), [`date.js`](https://github.com/santhoshrajkg/to-do-list/blob/main/date.js) (Date formatter), [`views/list.ejs`](https://github.com/santhoshrajkg/to-do-list/blob/main/views/list.ejs) (List view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["Express app<br/>[app.js]"]
  node_items["In-memory lists<br/>[app.js]"]
  node_date["Date formatter<br/>[date.js]"]
end

subgraph group_presentation["Presentation"]
  node_list_view["List view<br/>[list.ejs]"]
end

node_user(("User"))

node_user -->|"requests lists"| node_app
node_user -->|"submits items"| node_app
node_app -->|"gets date"| node_date
node_date -->|"returns date"| node_app
node_app -->|"reads lists"| node_items
node_app -->|"adds items"| node_items
node_app -->|"renders"| node_list_view
node_app -->|"responds or redirects"| node_user

click node_app "https://github.com/santhoshrajkg/to-do-list/blob/main/app.js"
click node_items "https://github.com/santhoshrajkg/to-do-list/blob/main/app.js"
click node_date "https://github.com/santhoshrajkg/to-do-list/blob/main/date.js"
click node_list_view "https://github.com/santhoshrajkg/to-do-list/blob/main/views/list.ejs"

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_app,node_items,node_date,node_user toneBlue
class node_list_view toneAmber
```

## Components

### Application runtime

- [Express app](https://github.com/santhoshrajkg/to-do-list/blob/main/app.js): `app.js`
- [In-memory lists](https://github.com/santhoshrajkg/to-do-list/blob/main/app.js): `app.js`
- [Date formatter](https://github.com/santhoshrajkg/to-do-list/blob/main/date.js): `date.js`

### Presentation

- [List view](https://github.com/santhoshrajkg/to-do-list/blob/main/views/list.ejs): `views/list.ejs`

### Other components

- **User**

## Connections

- User → Express app: requests lists (evidence: `app.js`)
- User → Express app: submits items (evidence: `app.js`)
- Express app → Date formatter: gets date (evidence: `app.js`)
- Date formatter → Express app: returns date (evidence: `app.js`)
- Express app → In-memory lists: reads lists (evidence: `app.js`)
- Express app → In-memory lists: adds items (evidence: `app.js`)
- Express app → List view: renders (evidence: `app.js`)
- Express app → User: responds or redirects (evidence: `app.js`)
