# londheshubham153/skillpulse architecture

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

- Interactive diagram: https://gitdiagram.com/londheshubham153/skillpulse
- Repository: https://github.com/londheshubham153/skillpulse

## Overview

SkillPulse is a learning tracker and a DevOps teaching project: users manage skills and learning sessions in a browser, while the API aggregates progress from MySQL. The repository also demonstrates provisioning and deploying the app to a single EC2 host. The API handlers and frontend behavior are excerpted; infrastructure and proxy relationships below follow the README’s architecture description, not an inspection of those implementation files.

Main entry points: [`backend/main.go`](https://github.com/londheshubham153/skillpulse/blob/main/backend/main.go) (API router), [`nginx/nginx.conf`](https://github.com/londheshubham153/skillpulse/blob/main/nginx/nginx.conf) (nginx proxy), [`docker-compose.yml`](https://github.com/londheshubham153/skillpulse/blob/main/docker-compose.yml) (Container services), [`backend/database/db.go`](https://github.com/londheshubham153/skillpulse/blob/main/backend/database/db.go) (Database connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_nginx["nginx proxy<br/>[nginx.conf]"]
  node_frontend["Static frontend<br/>[index.html]"]
  node_browserapp["Browser app<br/>[app.js]"]
end

subgraph group_api["Go API"]
  node_apientry["API router<br/>[main.go]"]
  node_skillhandlers["Skill handlers<br/>[skills.go]"]
  node_loghandler["Session handler<br/>[logs.go]"]
  node_dashboardhandler["Dashboard and health<br/>[dashboard.go]"]
  node_models["Request and response models<br/>[skill.go]"]
end

subgraph group_data["Learning data"]
  node_dbconn["Database connection<br/>[db.go]"]
  node_mysql[("MySQL")]
  node_schema["Schema and seed data<br/>[init.sql]"]
end

subgraph group_delivery["Infrastructure and delivery"]
  node_ci["Image build workflow<br/>[ci.yml]"]
  node_registry[("Docker Hub")]
  node_cd["Deploy workflow<br/>[cd.yml]"]
  node_terraform["AWS provisioning<br/>[main.tf]"]
  node_host["EC2 host"]
  node_compose["Container services<br/>[docker-compose.yml]"]
end

node_learner(("Learner"))
node_gitpush(("Git push"))

node_learner -->|"opens app"| node_nginx
node_nginx -->|"serves static files"| node_frontend
node_browserapp -->|"requests /api"| node_nginx
node_nginx -->|"proxies API"| node_apientry
node_apientry -->|"routes skills"| node_skillhandlers
node_apientry -->|"routes sessions"| node_loghandler
node_apientry -->|"routes dashboard and health"| node_dashboardhandler
node_skillhandlers -->|"queries and writes"| node_dbconn
node_loghandler -->|"checks and writes"| node_dbconn
node_dashboardhandler -->|"aggregates and pings"| node_dbconn
node_skillhandlers -->|"binds and returns"| node_models
node_loghandler -->|"binds and returns"| node_models
node_dashboardhandler -->|"returns stats"| node_models
node_dbconn -->|"connects"| node_mysql
node_schema -->|"initializes schema"| node_mysql
node_gitpush -->|"triggers build"| node_ci
node_ci -->|"publishes image"| node_registry
node_gitpush -->|"triggers deploy"| node_cd
node_cd -->|"deploys over SSH"| node_host
node_terraform -->|"provisions"| node_host
node_host -->|"runs services"| node_compose
node_compose -->|"runs proxy"| node_nginx
node_compose -->|"runs backend"| node_apientry
node_compose -->|"runs database"| node_mysql
node_cd -->|"pulls image"| node_registry

click node_nginx "https://github.com/londheshubham153/skillpulse/blob/main/nginx/nginx.conf"
click node_frontend "https://github.com/londheshubham153/skillpulse/blob/main/frontend/index.html"
click node_browserapp "https://github.com/londheshubham153/skillpulse/blob/main/frontend/js/app.js"
click node_apientry "https://github.com/londheshubham153/skillpulse/blob/main/backend/main.go"
click node_skillhandlers "https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/skills.go"
click node_loghandler "https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/logs.go"
click node_dashboardhandler "https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/dashboard.go"
click node_models "https://github.com/londheshubham153/skillpulse/blob/main/backend/models/skill.go"
click node_dbconn "https://github.com/londheshubham153/skillpulse/blob/main/backend/database/db.go"
click node_schema "https://github.com/londheshubham153/skillpulse/blob/main/mysql/init.sql"
click node_ci "https://github.com/londheshubham153/skillpulse/blob/main/.github/workflows/ci.yml"
click node_cd "https://github.com/londheshubham153/skillpulse/blob/main/.github/workflows/cd.yml"
click node_terraform "https://github.com/londheshubham153/skillpulse/blob/main/terraform/main.tf"
click node_compose "https://github.com/londheshubham153/skillpulse/blob/main/docker-compose.yml"

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_nginx,node_frontend,node_browserapp toneBlue
class node_apientry,node_skillhandlers,node_loghandler,node_dashboardhandler,node_models toneAmber
class node_dbconn,node_mysql,node_schema toneMint
class node_ci,node_registry,node_cd,node_terraform,node_host,node_compose toneRose
class node_learner,node_gitpush toneIndigo
```

## Components

### Web interface

- [nginx proxy](https://github.com/londheshubham153/skillpulse/blob/main/nginx/nginx.conf): `nginx/nginx.conf`
- [Static frontend](https://github.com/londheshubham153/skillpulse/blob/main/frontend/index.html): `frontend/index.html`
- [Browser app](https://github.com/londheshubham153/skillpulse/blob/main/frontend/js/app.js): `frontend/js/app.js`

### Go API

- [API router](https://github.com/londheshubham153/skillpulse/blob/main/backend/main.go): `backend/main.go`
- [Skill handlers](https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/skills.go): `backend/handlers/skills.go`
- [Session handler](https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/logs.go): `backend/handlers/logs.go`
- [Dashboard and health](https://github.com/londheshubham153/skillpulse/blob/main/backend/handlers/dashboard.go): `backend/handlers/dashboard.go`
- [Request and response models](https://github.com/londheshubham153/skillpulse/blob/main/backend/models/skill.go): `backend/models/skill.go`

### Learning data

- [Database connection](https://github.com/londheshubham153/skillpulse/blob/main/backend/database/db.go): `backend/database/db.go`
- **MySQL**
- [Schema and seed data](https://github.com/londheshubham153/skillpulse/blob/main/mysql/init.sql): `mysql/init.sql`

### Infrastructure and delivery

- [Image build workflow](https://github.com/londheshubham153/skillpulse/blob/main/.github/workflows/ci.yml): `.github/workflows/ci.yml`
- **Docker Hub**
- [Deploy workflow](https://github.com/londheshubham153/skillpulse/blob/main/.github/workflows/cd.yml): `.github/workflows/cd.yml`
- [AWS provisioning](https://github.com/londheshubham153/skillpulse/blob/main/terraform/main.tf): `terraform/main.tf`
- **EC2 host**
- [Container services](https://github.com/londheshubham153/skillpulse/blob/main/docker-compose.yml): `docker-compose.yml`

### Other components

- **Learner**
- **Git push**

## Connections

- Learner → nginx proxy: opens app (evidence: `README.md`)
- nginx proxy → Static frontend: serves static files (evidence: `README.md`)
- Browser app → nginx proxy: requests /api (evidence: `README.md`)
- nginx proxy → API router: proxies API (evidence: `README.md`)
- API router → Skill handlers: routes skills (evidence: `backend/main.go`)
- API router → Session handler: routes sessions (evidence: `backend/main.go`)
- API router → Dashboard and health: routes dashboard and health (evidence: `backend/main.go`)
- Skill handlers → Database connection: queries and writes (evidence: `backend/handlers/skills.go`)
- Session handler → Database connection: checks and writes (evidence: `backend/handlers/logs.go`)
- Dashboard and health → Database connection: aggregates and pings (evidence: `backend/handlers/dashboard.go`)
- Skill handlers → Request and response models: binds and returns (evidence: `backend/handlers/skills.go`)
- Session handler → Request and response models: binds and returns (evidence: `backend/handlers/logs.go`)
- Dashboard and health → Request and response models: returns stats (evidence: `backend/handlers/dashboard.go`)
- Database connection → MySQL: connects (evidence: `backend/database/db.go`)
- Schema and seed data → MySQL: initializes schema (evidence: `README.md`)
- Git push → Image build workflow: triggers build (evidence: `README.md`)
- Image build workflow → Docker Hub: publishes image (evidence: `README.md`)
- Git push → Deploy workflow: triggers deploy (evidence: `README.md`)
- Deploy workflow → EC2 host: deploys over SSH (evidence: `README.md`)
- AWS provisioning → EC2 host: provisions (evidence: `README.md`)
- EC2 host → Container services: runs services (evidence: `README.md`)
- Container services → nginx proxy: runs proxy (evidence: `README.md`)
- Container services → API router: runs backend (evidence: `README.md`)
- Container services → MySQL: runs database (evidence: `README.md`)
- Deploy workflow → Docker Hub: pulls image (evidence: `README.md`)
