# prateekp3108/liveboard architecture

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

- Interactive diagram: https://gitdiagram.com/prateekp3108/liveboard
- Repository: https://github.com/prateekp3108/liveboard

## Overview

LiveBoard is a real-time Kanban board: users load the board, create/move/delete cards through the React UI, and receive changes over WebSockets. The Express API validates requests, persists cards, and publishes events for connected clients; PostgreSQL stores board state and Redis shares events across API replicas. The repository also documents GitOps deployment and metrics/log observability. Those operational links follow the README; the corresponding monitoring manifests are not present in the supplied tree, so their implementation details are not inferred.

Main entry points: [`server/src/app.js`](https://github.com/prateekp3108/liveboard/blob/main/server/src/app.js) (REST API), [`server/src/ws.js`](https://github.com/prateekp3108/liveboard/blob/main/server/src/ws.js) (WebSocket stream), [`helm/liveboard/templates/ingress.yaml`](https://github.com/prateekp3108/liveboard/blob/main/helm/liveboard/templates/ingress.yaml) (Ingress controller), [`client/src/App.jsx`](https://github.com/prateekp3108/liveboard/blob/main/client/src/App.jsx) (Kanban UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Board experience"]
  node_ui["Kanban UI<br/>[App.jsx]"]
end

subgraph group_runtime["API runtime"]
  node_api["REST API<br/>[app.js]"]
  node_entry["HTTP server startup<br/>[index.js]"]
  node_ws["WebSocket stream<br/>[ws.js]"]
  node_metrics["Prometheus metrics<br/>[metrics.js]"]
end

subgraph group_state["Shared state"]
  node_dbaccess["Card persistence<br/>[db.js]"]
  node_postgres[("PostgreSQL")]
  node_redisclient["Event pub/sub<br/>[redis.js]"]
  node_redis[("Redis")]
end

subgraph group_ops["Deployment and observability"]
  node_ingress["Ingress controller<br/>[ingress.yaml]"]
  node_chart["Kubernetes workloads<br/>[values.yaml]"]
  node_argocd["Argo CD application<br/>[application.yaml]"]
  node_cluster["Kubernetes cluster"]
  node_prometheus["Prometheus<br/>[namespace.yaml]"]
  node_grafana["Grafana dashboards<br/>[namespace.yaml]"]
  node_promtail["Promtail logs<br/>[namespace.yaml]"]
  node_loki[("Loki log store<br/>[namespace.yaml]")]
end

node_browser(("Board user"))

node_browser -->|"uses HTTP and WebSocket"| node_ingress
node_ingress -->|"routes board"| node_ui
node_ingress -->|"routes API and socket"| node_api
node_ui -->|"fetches and mutates cards"| node_api
node_ui -->|"receives card events"| node_ws
node_entry -->|"creates app"| node_api
node_entry -->|"sets up socket"| node_ws
node_api -->|"reads and writes cards"| node_dbaccess
node_dbaccess -->|"queries"| node_postgres
node_api -->|"publishes card events"| node_redisclient
node_ws -->|"subscribes to events"| node_redisclient
node_redisclient -->|"publishes and subscribes"| node_redis
node_api -->|"records requests and card events"| node_metrics
node_ws -->|"tracks connections"| node_metrics
node_prometheus -->|"scrapes metrics"| node_api
node_grafana -->|"reads metrics"| node_prometheus
node_promtail -->|"ships container logs"| node_loki
node_grafana -->|"queries logs"| node_loki
node_argocd -->|"syncs chart"| node_chart
node_argocd -->|"deploys workloads"| node_cluster
node_chart -->|"defines workloads"| node_cluster
node_chart -->|"configures ingress"| node_ingress

click node_ui "https://github.com/prateekp3108/liveboard/blob/main/client/src/App.jsx"
click node_api "https://github.com/prateekp3108/liveboard/blob/main/server/src/app.js"
click node_entry "https://github.com/prateekp3108/liveboard/blob/main/server/src/index.js"
click node_ws "https://github.com/prateekp3108/liveboard/blob/main/server/src/ws.js"
click node_metrics "https://github.com/prateekp3108/liveboard/blob/main/server/src/metrics.js"
click node_dbaccess "https://github.com/prateekp3108/liveboard/blob/main/server/src/db.js"
click node_redisclient "https://github.com/prateekp3108/liveboard/blob/main/server/src/redis.js"
click node_ingress "https://github.com/prateekp3108/liveboard/blob/main/helm/liveboard/templates/ingress.yaml"
click node_chart "https://github.com/prateekp3108/liveboard/blob/main/helm/liveboard/values.yaml"
click node_argocd "https://github.com/prateekp3108/liveboard/blob/main/argocd/application.yaml"
click node_prometheus "https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml"
click node_grafana "https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml"
click node_promtail "https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml"
click node_loki "https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml"

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_browser toneBlue
class node_api,node_entry,node_ws,node_metrics toneAmber
class node_dbaccess,node_postgres,node_redisclient,node_redis toneMint
class node_ingress,node_chart,node_argocd,node_cluster,node_prometheus,node_grafana,node_promtail,node_loki toneRose
```

## Components

### Board experience

- [Kanban UI](https://github.com/prateekp3108/liveboard/blob/main/client/src/App.jsx): `client/src/App.jsx`

### API runtime

- [REST API](https://github.com/prateekp3108/liveboard/blob/main/server/src/app.js): `server/src/app.js`
- [HTTP server startup](https://github.com/prateekp3108/liveboard/blob/main/server/src/index.js): `server/src/index.js`
- [WebSocket stream](https://github.com/prateekp3108/liveboard/blob/main/server/src/ws.js): `server/src/ws.js`
- [Prometheus metrics](https://github.com/prateekp3108/liveboard/blob/main/server/src/metrics.js): `server/src/metrics.js`

### Shared state

- [Card persistence](https://github.com/prateekp3108/liveboard/blob/main/server/src/db.js): `server/src/db.js`
- **PostgreSQL**
- [Event pub/sub](https://github.com/prateekp3108/liveboard/blob/main/server/src/redis.js): `server/src/redis.js`
- **Redis**

### Deployment and observability

- [Ingress controller](https://github.com/prateekp3108/liveboard/blob/main/helm/liveboard/templates/ingress.yaml): `helm/liveboard/templates/ingress.yaml`
- [Kubernetes workloads](https://github.com/prateekp3108/liveboard/blob/main/helm/liveboard/values.yaml): `helm/liveboard/values.yaml`
- [Argo CD application](https://github.com/prateekp3108/liveboard/blob/main/argocd/application.yaml): `argocd/application.yaml`
- **Kubernetes cluster**
- [Prometheus](https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml): `observability/namespace.yaml`
- [Grafana dashboards](https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml): `observability/namespace.yaml`
- [Promtail logs](https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml): `observability/namespace.yaml`
- [Loki log store](https://github.com/prateekp3108/liveboard/blob/main/observability/namespace.yaml): `observability/namespace.yaml`

### Other components

- **Board user**

## Connections

- Board user → Ingress controller: uses HTTP and WebSocket (evidence: `README.md`)
- Ingress controller → Kanban UI: routes board (evidence: `README.md`)
- Ingress controller → REST API: routes API and socket (evidence: `README.md`)
- Kanban UI → REST API: fetches and mutates cards (evidence: `client/src/App.jsx`)
- Kanban UI → WebSocket stream: receives card events (evidence: `client/src/App.jsx`)
- HTTP server startup → REST API: creates app (evidence: `server/src/index.js`)
- HTTP server startup → WebSocket stream: sets up socket (evidence: `server/src/index.js`)
- REST API → Card persistence: reads and writes cards (evidence: `server/src/app.js`)
- Card persistence → PostgreSQL: queries (evidence: `README.md`)
- REST API → Event pub/sub: publishes card events (evidence: `server/src/app.js`)
- WebSocket stream → Event pub/sub: subscribes to events (evidence: `server/src/ws.js`)
- Event pub/sub → Redis: publishes and subscribes (evidence: `README.md`)
- REST API → Prometheus metrics: records requests and card events (evidence: `server/src/app.js`)
- WebSocket stream → Prometheus metrics: tracks connections (evidence: `server/src/ws.js`)
- Prometheus → REST API: scrapes metrics (evidence: `README.md`)
- Grafana dashboards → Prometheus: reads metrics (evidence: `README.md`)
- Promtail logs → Loki log store: ships container logs (evidence: `README.md`)
- Grafana dashboards → Loki log store: queries logs (evidence: `README.md`)
- Argo CD application → Kubernetes workloads: syncs chart (evidence: `README.md`)
- Argo CD application → Kubernetes cluster: deploys workloads (evidence: `README.md`)
- Kubernetes workloads → Kubernetes cluster: defines workloads (evidence: `README.md`)
- Kubernetes workloads → Ingress controller: configures ingress (evidence: `README.md`)
