# ttsudarshan/sudarshan architecture

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

- Interactive diagram: https://gitdiagram.com/ttsudarshan/sudarshan
- Repository: https://github.com/ttsudarshan/sudarshan

## Overview

This is a Flask-served Windows 95-style portfolio. A visitor explores portfolio windows and can use an in-browser terminal to navigate a virtual portfolio filesystem; the frontend sends terminal requests to the Python backend. Separate interactive branches provide a music player, camera/gallery, and a shared guestbook with photo uploads and polling. The graph preserves these documented capabilities; unsampled routes and template wiring are represented only where the README or excerpts establish them.

Main entry points: [`app.py`](https://github.com/ttsudarshan/sudarshan/blob/main/app.py) (Guestbook API), [`templates/index.html`](https://github.com/ttsudarshan/sudarshan/blob/main/templates/index.html) (Portfolio Page), [`static/script.js`](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js) (Terminal UI), [`static/guestbook-polling.js`](https://github.com/ttsudarshan/sudarshan/blob/main/static/guestbook-polling.js) (Guestbook Polling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Desktop Experience"]
  node_page["Portfolio Page<br/>[index.html]"]
  node_window_ui["Window UI<br/>[script.js]"]
  node_visual_style["Windows 95 Styling<br/>[style.css]"]
  node_media_player["Music Player<br/>[script.js]"]
end

subgraph group_terminal["Portfolio Terminal"]
  node_terminal_ui["Terminal UI<br/>[script.js]"]
  node_shell["Virtual Shell<br/>[app.py]"]
  node_virtual_fs["Virtual Filesystem<br/>[app.py]"]
end

subgraph group_guestbook["Guestbook"]
  node_camera["Camera Capture<br/>[script.js]"]
  node_gallery["Photo Gallery<br/>[script.js]"]
  node_polling["Guestbook Polling"]
end

subgraph group_backend["Flask Backend"]
  node_guestbook_api["Guestbook API<br/>[app.py]"]
  node_message_store[("Message File Store<br/>[app.py]")]
  node_flask_app["Flask App<br/>[app.py]"]
  node_wsgi["WSGI Entry<br/>[wsgi.py]"]
end

node_visitor(("Visitor"))
node_supabase[("Supabase Storage")]

node_visitor -->|"opens"| node_page
node_page -->|"hosts"| node_window_ui
node_page -->|"uses"| node_visual_style
node_visitor -->|"uses"| node_terminal_ui
node_terminal_ui -->|"sends commands"| node_shell
node_shell -->|"navigates"| node_virtual_fs
node_visitor -->|"plays music"| node_media_player
node_visitor -->|"captures photos"| node_camera
node_camera -->|"uploads photo"| node_guestbook_api
node_visitor -->|"views photos"| node_gallery
node_polling -->|"fetches photos"| node_guestbook_api
node_guestbook_api -->|"reads and writes"| node_supabase
node_guestbook_api -->|"reads and writes"| node_message_store
node_wsgi -->|"imports app"| node_flask_app

click node_page "https://github.com/ttsudarshan/sudarshan/blob/main/templates/index.html"
click node_window_ui "https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js"
click node_visual_style "https://github.com/ttsudarshan/sudarshan/blob/main/static/style.css"
click node_media_player "https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js"
click node_camera "https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js"
click node_gallery "https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js"
click node_polling "https://github.com/ttsudarshan/sudarshan/blob/main/static/guestbook-polling.js"
click node_terminal_ui "https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js"
click node_shell "https://github.com/ttsudarshan/sudarshan/blob/main/app.py"
click node_virtual_fs "https://github.com/ttsudarshan/sudarshan/blob/main/app.py"
click node_guestbook_api "https://github.com/ttsudarshan/sudarshan/blob/main/app.py"
click node_message_store "https://github.com/ttsudarshan/sudarshan/blob/main/app.py"
click node_flask_app "https://github.com/ttsudarshan/sudarshan/blob/main/app.py"
click node_wsgi "https://github.com/ttsudarshan/sudarshan/blob/main/wsgi.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_page,node_window_ui,node_visual_style,node_media_player toneBlue
class node_terminal_ui,node_shell,node_virtual_fs,node_supabase toneAmber
class node_camera,node_gallery,node_polling toneMint
class node_guestbook_api,node_message_store,node_flask_app,node_wsgi toneRose
class node_visitor toneIndigo
```

## Components

### Desktop Experience

- [Portfolio Page](https://github.com/ttsudarshan/sudarshan/blob/main/templates/index.html): `templates/index.html`
- [Window UI](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js): `static/script.js`
- [Windows 95 Styling](https://github.com/ttsudarshan/sudarshan/blob/main/static/style.css): `static/style.css`
- [Music Player](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js): `static/script.js`

### Portfolio Terminal

- [Terminal UI](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js): `static/script.js`
- [Virtual Shell](https://github.com/ttsudarshan/sudarshan/blob/main/app.py): `app.py`
- [Virtual Filesystem](https://github.com/ttsudarshan/sudarshan/blob/main/app.py): `app.py`

### Guestbook

- [Camera Capture](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js): `static/script.js`
- [Photo Gallery](https://github.com/ttsudarshan/sudarshan/blob/main/static/script.js): `static/script.js`
- [Guestbook Polling](https://github.com/ttsudarshan/sudarshan/blob/main/static/guestbook-polling.js): `static/guestbook-polling.js`

### Flask Backend

- [Guestbook API](https://github.com/ttsudarshan/sudarshan/blob/main/app.py): `app.py`
- [Message File Store](https://github.com/ttsudarshan/sudarshan/blob/main/app.py): `app.py`
- [Flask App](https://github.com/ttsudarshan/sudarshan/blob/main/app.py): `app.py`
- [WSGI Entry](https://github.com/ttsudarshan/sudarshan/blob/main/wsgi.py): `wsgi.py`

### Other components

- **Visitor**
- **Supabase Storage**

## Connections

- Visitor → Portfolio Page: opens (evidence: `README.md`)
- Portfolio Page → Window UI: hosts (evidence: `README.md`)
- Portfolio Page → Windows 95 Styling: uses (evidence: `README.md`)
- Visitor → Terminal UI: uses (evidence: `README.md`)
- Terminal UI → Virtual Shell: sends commands (evidence: `README.md`)
- Virtual Shell → Virtual Filesystem: navigates (evidence: `app.py`)
- Visitor → Music Player: plays music (evidence: `README.md`)
- Visitor → Camera Capture: captures photos (evidence: `static/script.js`)
- Camera Capture → Guestbook API: uploads photo (evidence: `static/script.js`)
- Visitor → Photo Gallery: views photos (evidence: `README.md`)
- Guestbook Polling → Guestbook API: fetches photos (evidence: `static/guestbook-polling.js`)
- Guestbook API → Supabase Storage: reads and writes (evidence: `app.py`)
- Guestbook API → Message File Store: reads and writes (evidence: `app.py`)
- WSGI Entry → Flask App: imports app (evidence: `wsgi.py`)
