# yashwanth-20/aiops-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/yashwanth-20/aiops-tracker
- Repository: https://github.com/yashwanth-20/aiops-tracker

## Overview

AIops-Tracker tracks employee snapshot postings against a roster calendar, with end-of-day and monthly reports. Users interact through the browser UI and API: employee and roster administration, snapshot posting, channel viewing, and compliance reporting are handled by the Express application. Roster logic resolves defaults and overrides; repository adapters persist records, and image storage supports local files or Vercel Blob. The excerpts establish server startup, domain logic, and storage calls; browser-to-API wiring and some deployment relationships are not shown, so uncertain links are marked dashed.

Main entry points: [`app.js`](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js) (HTTP API), [`repo.js`](https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.js) (Repository selector), [`storage.js`](https://github.com/yashwanth-20/aiops-tracker/blob/main/storage.js) (Image storage), [`retention.js`](https://github.com/yashwanth-20/aiops-tracker/blob/main/retention.js) (Monthly retention)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["User Interface"]
  node_browser["Tracker UI<br/>[app.js]"]
end

subgraph group_application["Application"]
  node_api_entry["Serverless entry<br/>[index.js]"]
  node_server["Server startup<br/>[server.js]"]
  node_app["HTTP API<br/>[app.js]"]
  node_employees["Employee management<br/>[app.js]"]
  node_snapshot_routes["Snapshot posting<br/>[app.js]"]
  node_channel["Channel feed<br/>[app.js]"]
  node_reports["Compliance reports<br/>[app.js]"]
  node_retention["Monthly retention<br/>[retention.js]"]
end

subgraph group_domain["Roster And Dates"]
  node_roster["Roster resolution<br/>[roster.js]"]
  node_dates["Date utilities<br/>[dates.js]"]
end

subgraph group_persistence["Persistence And Media"]
  node_repo_selector["Repository selector<br/>[repo.js]"]
  node_local_repo["Local repository<br/>[repo.local.js]"]
  node_postgres_repo["Postgres repository<br/>[repo.postgres.js]"]
  node_json_store[("JSON file store<br/>[store.js]")]
  node_image_storage["Image storage<br/>[storage.js]"]
end

node_user(("Tracker user"))
node_blob[("Vercel Blob")]
node_postgres[("Postgres database")]
node_filesystem[("Local filesystem")]

node_user -.->|"uses"| node_browser
node_browser -.->|"sends requests"| node_app
node_api_entry -->|"exports"| node_app
node_server -->|"starts"| node_app
node_server -->|"initializes"| node_repo_selector
node_app -->|"reads and writes"| node_repo_selector
node_app -->|"resolves roster"| node_roster
node_app -->|"validates dates"| node_dates
node_app -->|"manages images"| node_image_storage
node_roster -->|"loads records"| node_repo_selector
node_roster -->|"uses calendar"| node_dates
node_repo_selector -->|"selects"| node_postgres_repo
node_repo_selector -->|"selects"| node_local_repo
node_local_repo -->|"loads and saves"| node_json_store
node_local_repo -.->|"persists JSON"| node_filesystem
node_postgres_repo -->|"queries"| node_postgres
node_retention -->|"purges records"| node_repo_selector
node_retention -->|"gets current month"| node_dates
node_retention -->|"deletes images"| node_image_storage
node_image_storage -.->|"stores optionally"| node_blob
node_image_storage -->|"stores locally"| node_filesystem

click node_browser "https://github.com/yashwanth-20/aiops-tracker/blob/main/public/app.js"
click node_api_entry "https://github.com/yashwanth-20/aiops-tracker/blob/main/api/index.js"
click node_server "https://github.com/yashwanth-20/aiops-tracker/blob/main/server.js"
click node_app "https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js"
click node_employees "https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js"
click node_snapshot_routes "https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js"
click node_channel "https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js"
click node_reports "https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js"
click node_roster "https://github.com/yashwanth-20/aiops-tracker/blob/main/roster.js"
click node_dates "https://github.com/yashwanth-20/aiops-tracker/blob/main/dates.js"
click node_repo_selector "https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.js"
click node_local_repo "https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.local.js"
click node_postgres_repo "https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.postgres.js"
click node_json_store "https://github.com/yashwanth-20/aiops-tracker/blob/main/store.js"
click node_image_storage "https://github.com/yashwanth-20/aiops-tracker/blob/main/storage.js"
click node_retention "https://github.com/yashwanth-20/aiops-tracker/blob/main/retention.js"

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_browser,node_user toneBlue
class node_api_entry,node_server,node_app,node_employees,node_snapshot_routes,node_channel,node_reports,node_retention,node_blob,node_postgres,node_filesystem toneAmber
class node_roster,node_dates toneMint
class node_repo_selector,node_local_repo,node_postgres_repo,node_json_store,node_image_storage toneRose
```

## Components

### User Interface

- [Tracker UI](https://github.com/yashwanth-20/aiops-tracker/blob/main/public/app.js): `public/app.js`

### Application

- [Serverless entry](https://github.com/yashwanth-20/aiops-tracker/blob/main/api/index.js): `api/index.js`
- [Server startup](https://github.com/yashwanth-20/aiops-tracker/blob/main/server.js): `server.js`
- [HTTP API](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js): `app.js`
- [Employee management](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js): `app.js`
- [Snapshot posting](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js): `app.js`
- [Channel feed](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js): `app.js`
- [Compliance reports](https://github.com/yashwanth-20/aiops-tracker/blob/main/app.js): `app.js`
- [Monthly retention](https://github.com/yashwanth-20/aiops-tracker/blob/main/retention.js): `retention.js`

### Roster And Dates

- [Roster resolution](https://github.com/yashwanth-20/aiops-tracker/blob/main/roster.js): `roster.js`
- [Date utilities](https://github.com/yashwanth-20/aiops-tracker/blob/main/dates.js): `dates.js`

### Persistence And Media

- [Repository selector](https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.js): `repo.js`
- [Local repository](https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.local.js): `repo.local.js`
- [Postgres repository](https://github.com/yashwanth-20/aiops-tracker/blob/main/repo.postgres.js): `repo.postgres.js`
- [JSON file store](https://github.com/yashwanth-20/aiops-tracker/blob/main/store.js): `store.js`
- [Image storage](https://github.com/yashwanth-20/aiops-tracker/blob/main/storage.js): `storage.js`

### Other components

- **Tracker user**
- **Vercel Blob**
- **Postgres database**
- **Local filesystem**

## Connections

- Tracker user → Tracker UI: uses
- Tracker UI → HTTP API: sends requests
- Serverless entry → HTTP API: exports (evidence: `api/index.js`)
- Server startup → HTTP API: starts (evidence: `server.js`)
- Server startup → Repository selector: initializes (evidence: `server.js`)
- HTTP API → Repository selector: reads and writes (evidence: `app.js`)
- HTTP API → Roster resolution: resolves roster (evidence: `app.js`)
- HTTP API → Date utilities: validates dates (evidence: `app.js`)
- HTTP API → Image storage: manages images (evidence: `app.js`)
- Roster resolution → Repository selector: loads records (evidence: `roster.js`)
- Roster resolution → Date utilities: uses calendar (evidence: `roster.js`)
- Repository selector → Postgres repository: selects (evidence: `repo.js`)
- Repository selector → Local repository: selects (evidence: `repo.js`)
- Local repository → JSON file store: loads and saves (evidence: `repo.local.js`)
- Local repository → Local filesystem: persists JSON
- Postgres repository → Postgres database: queries (evidence: `repo.postgres.js`)
- Monthly retention → Repository selector: purges records (evidence: `retention.js`)
- Monthly retention → Date utilities: gets current month (evidence: `retention.js`)
- Monthly retention → Image storage: deletes images (evidence: `retention.js`)
- Image storage → Vercel Blob: stores optionally (evidence: `storage.js`)
- Image storage → Local filesystem: stores locally (evidence: `storage.js`)
