# aryan-svnit/hackathon-tracker architecture

> Architecture diagram of the GitHub repository aryan-svnit/hackathon-tracker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aryan-svnit/hackathon-tracker
- Repository: https://github.com/aryan-svnit/hackathon-tracker

## Overview

Hackathon Tracker gathers open-event listings from Devpost, MLH and Unstop, caches the combined results, and serves them to a browser-based board. The user flow is browser polling, backend refresh on cache expiry, platform scraping and normalization, then filtering, sorting, new-event tracking and detail viewing. The README also describes HackerEarth scraping, but the sampled API code only implements three platform scrapers; that capability is preserved as an unverified subsystem without an asserted implementation link.

Main entry points: [`web/app.js`](https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/app.js) (Polling and interactions), [`api.py`](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py) (In-memory cache), [`web/index.html`](https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/index.html) (Static board)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser board"]
  node_board["Static board<br/>[index.html]"]
  node_client["Polling and interactions<br/>[app.js]"]
  node_seen[("Seen-event state<br/>[app.js]")]
end

subgraph group_backend["API and cache"]
  node_api["Hackathon API<br/>[api.py]"]
  node_cache[("In-memory cache<br/>[api.py]")]
end

subgraph group_sources["Listing sources"]
  node_devpost["Devpost scraper<br/>[api.py]"]
  node_mlh["MLH scraper<br/>[api.py]"]
  node_unstop["Unstop scraper<br/>[api.py]"]
  node_hackerearth["HackerEarth scraper<br/>[api.py]"]
end

node_visitor(("Board visitor"))
node_platforms["Event listing platforms"]

node_visitor -->|"opens"| node_board
node_board -->|"loads"| node_client
node_client -->|"polls"| node_api
node_api -->|"reads or refreshes"| node_cache
node_cache -->|"refreshes via"| node_devpost
node_cache -->|"refreshes via"| node_mlh
node_cache -->|"refreshes via"| node_unstop
node_devpost -->|"fetches listings"| node_platforms
node_mlh -->|"fetches listings"| node_platforms
node_unstop -->|"fetches listings"| node_platforms
node_client -->|"reads and updates"| node_seen
node_client -->|"renders and filters"| node_board
node_hackerearth -.->|"scrapes listings"| node_platforms

click node_board "https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/index.html"
click node_client "https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/app.js"
click node_seen "https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/app.js"
click node_api "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py"
click node_cache "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py"
click node_devpost "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py"
click node_mlh "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py"
click node_unstop "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py"
click node_hackerearth "https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.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_board,node_client,node_seen toneBlue
class node_api,node_cache toneAmber
class node_devpost,node_mlh,node_unstop,node_hackerearth toneMint
class node_visitor,node_platforms toneIndigo
```

## Components

### Browser board

- [Static board](https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/index.html): `web/index.html`
- [Polling and interactions](https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/app.js): `web/app.js`
- [Seen-event state](https://github.com/aryan-svnit/hackathon-tracker/blob/main/web/app.js): `web/app.js`

### API and cache

- [Hackathon API](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`
- [In-memory cache](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`

### Listing sources

- [Devpost scraper](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`
- [MLH scraper](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`
- [Unstop scraper](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`
- [HackerEarth scraper](https://github.com/aryan-svnit/hackathon-tracker/blob/main/api.py): `api.py`

### Other components

- **Board visitor**
- **Event listing platforms**

## Connections

- Board visitor → Static board: opens (evidence: `README.md`)
- Static board → Polling and interactions: loads (evidence: `web/app.js`)
- Polling and interactions → Hackathon API: polls (evidence: `web/app.js`)
- Hackathon API → In-memory cache: reads or refreshes (evidence: `api.py`)
- In-memory cache → Devpost scraper: refreshes via (evidence: `api.py`)
- In-memory cache → MLH scraper: refreshes via (evidence: `api.py`)
- In-memory cache → Unstop scraper: refreshes via (evidence: `api.py`)
- Devpost scraper → Event listing platforms: fetches listings (evidence: `api.py`)
- MLH scraper → Event listing platforms: fetches listings (evidence: `api.py`)
- Unstop scraper → Event listing platforms: fetches listings (evidence: `api.py`)
- Polling and interactions → Seen-event state: reads and updates (evidence: `web/app.js`)
- Polling and interactions → Static board: renders and filters (evidence: `web/app.js`)
- HackerEarth scraper → Event listing platforms: scrapes listings
