# geektoberfest/geektoberfest-trackhack architecture

> Architecture diagram of the GitHub repository geektoberfest/geektoberfest-trackhack, 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/geektoberfest/geektoberfest-trackhack
- Repository: https://github.com/geektoberfest/geektoberfest-trackhack

## Overview

TrackHack is a web application for managing hackathon listings and personal progress. Users register or log in, browse or create hackathons, then maintain a separate stage tracker for each event; authenticated users can also look up GitHub profiles and repositories. The graph shows the documented frontend-to-API workflow, backend route/controller/model responsibilities, and authentication and GitHub integration. Backend route files and several frontend pages are represented from the source index or README; their detailed behavior was not sampled, so only documented or indexed relationships are shown.

Main entry points: [`FRONTEND/src/api.js`](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/api.js) (API client), [`FRONTEND/src/App.jsx`](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/App.jsx) (Routes and shell), [`BACKEND/server.js`](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/server.js) (Express server), [`FRONTEND/src/pages`](https://github.com/geektoberfest/geektoberfest-trackhack/tree/main/FRONTEND/src/pages) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Routes and shell<br/>[App.jsx]"]
  node_authui["Login and registration"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_hackui["Hackathon browsing<br/>[Hackathons.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_hackdetails["Hackathon details"]
  node_hackform["Create and edit<br/>[HackathonForm.jsx]"]
  node_trackerui["Progress tracker<br/>[TrackerPage.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_backend["API services"]
  node_server["Express server<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Auth controller<br/>[authController.js]"]
  node_authmw["JWT middleware<br/>[auth.middleware.js]"]
  node_hackroutes["Hackathon routes<br/>[hackathonRoutes.js]"]
  node_hackcontroller["Hackathon controller"]
  node_trackroutes["Tracker routes<br/>[trackerRoutes.js]"]
  node_trackcontroller["Tracker controller"]
  node_gitroutes["GitHub routes<br/>[githubRoutes.js]"]
  node_gitcontroller["GitHub controller"]
  node_gitservice["GitHub service<br/>[githubService.js]"]
end

subgraph group_domain["Hackathon data"]
  node_users[("User records<br/>[User.js]")]
  node_hackathons[("Hackathon records<br/>[Hackathon.js]")]
  node_trackers[("Tracker records<br/>[Tracker.js]")]
end

subgraph group_integrations["External services"]
  node_mongodb[("MongoDB")]
  node_github["GitHub API"]
end

node_user(("Student"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_authui
node_app -->|"routes to"| node_hackui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_hackdetails
node_app -->|"routes to"| node_trackerui
node_authui -->|"requests"| node_api
node_authui -->|"saves session"| node_authstate
node_dashboard -->|"requests"| node_api
node_hackui -->|"requests"| node_api
node_hackdetails -->|"requests"| node_api
node_hackform -->|"submits via"| node_api
node_trackerui -->|"requests"| node_api
node_api -.->|"HTTP API"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_hackroutes
node_server -->|"mounts"| node_trackroutes
node_server -->|"mounts"| node_gitroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_hackroutes -->|"guards"| node_authmw
node_hackroutes -->|"dispatches"| node_hackcontroller
node_trackroutes -->|"guards"| node_authmw
node_trackroutes -->|"dispatches"| node_trackcontroller
node_gitroutes -->|"guards"| node_authmw
node_gitroutes -->|"dispatches"| node_gitcontroller
node_authcontroller -->|"reads and writes"| node_users
node_hackcontroller -->|"reads and writes"| node_hackathons
node_trackcontroller -->|"reads and writes"| node_trackers
node_trackcontroller -->|"checks event"| node_hackathons
node_gitcontroller -->|"delegates"| node_gitservice
node_gitservice -.->|"fetches profile and repos"| node_github
node_server -.->|"connects"| node_mongodb

click node_app "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/App.jsx"
click node_authui "https://github.com/geektoberfest/geektoberfest-trackhack/tree/main/FRONTEND/src/pages"
click node_authstate "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/context/AuthContext.jsx"
click node_hackui "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/Hackathons.jsx"
click node_dashboard "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/Dashboard.jsx"
click node_hackdetails "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/HackathonDetails.jsx"
click node_hackform "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/components/HackathonForm.jsx"
click node_trackerui "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/TrackerPage.jsx"
click node_api "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/api.js"
click node_server "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/server.js"
click node_authroutes "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/authRoutes.js"
click node_authcontroller "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/authController.js"
click node_authmw "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/middleware/auth.middleware.js"
click node_hackroutes "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/hackathonRoutes.js"
click node_hackcontroller "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/hackathonController.js"
click node_trackroutes "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/trackerRoutes.js"
click node_trackcontroller "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/trackerController.js"
click node_gitroutes "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/githubRoutes.js"
click node_gitcontroller "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/githubController.js"
click node_gitservice "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/services/githubService.js"
click node_users "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/User.js"
click node_hackathons "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/Hackathon.js"
click node_trackers "https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/Tracker.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_app,node_authui,node_authstate,node_hackui,node_dashboard,node_hackdetails,node_hackform,node_trackerui,node_api toneBlue
class node_server,node_authroutes,node_authcontroller,node_authmw,node_hackroutes,node_hackcontroller,node_trackroutes,node_trackcontroller,node_gitroutes,node_gitcontroller,node_gitservice toneAmber
class node_users,node_hackathons,node_trackers toneMint
class node_mongodb,node_github toneRose
class node_user toneIndigo
```

## Components

### Web application

- [Routes and shell](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/App.jsx): `FRONTEND/src/App.jsx`
- [Login and registration](https://github.com/geektoberfest/geektoberfest-trackhack/tree/main/FRONTEND/src/pages): `FRONTEND/src/pages`
- [Auth state](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/context/AuthContext.jsx): `FRONTEND/src/context/AuthContext.jsx`
- [Hackathon browsing](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/Hackathons.jsx): `FRONTEND/src/pages/Hackathons.jsx`
- [Dashboard](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/Dashboard.jsx): `FRONTEND/src/pages/Dashboard.jsx`
- [Hackathon details](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/HackathonDetails.jsx): `FRONTEND/src/pages/HackathonDetails.jsx`
- [Create and edit](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/components/HackathonForm.jsx): `FRONTEND/src/components/HackathonForm.jsx`
- [Progress tracker](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/pages/TrackerPage.jsx): `FRONTEND/src/pages/TrackerPage.jsx`
- [API client](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/FRONTEND/src/api.js): `FRONTEND/src/api.js`

### API services

- [Express server](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/server.js): `BACKEND/server.js`
- [Auth routes](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/authRoutes.js): `BACKEND/src/routes/authRoutes.js`
- [Auth controller](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/authController.js): `BACKEND/src/controllers/authController.js`
- [JWT middleware](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/middleware/auth.middleware.js): `BACKEND/src/middleware/auth.middleware.js`
- [Hackathon routes](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/hackathonRoutes.js): `BACKEND/src/routes/hackathonRoutes.js`
- [Hackathon controller](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/hackathonController.js): `BACKEND/src/controllers/hackathonController.js`
- [Tracker routes](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/trackerRoutes.js): `BACKEND/src/routes/trackerRoutes.js`
- [Tracker controller](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/trackerController.js): `BACKEND/src/controllers/trackerController.js`
- [GitHub routes](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/routes/githubRoutes.js): `BACKEND/src/routes/githubRoutes.js`
- [GitHub controller](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/controllers/githubController.js): `BACKEND/src/controllers/githubController.js`
- [GitHub service](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/services/githubService.js): `BACKEND/src/services/githubService.js`

### Hackathon data

- [User records](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/User.js): `BACKEND/src/models/User.js`
- [Hackathon records](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/Hackathon.js): `BACKEND/src/models/Hackathon.js`
- [Tracker records](https://github.com/geektoberfest/geektoberfest-trackhack/blob/main/BACKEND/src/models/Tracker.js): `BACKEND/src/models/Tracker.js`

### External services

- **MongoDB**
- **GitHub API**

### Other components

- **Student**

## Connections

- Student → Routes and shell: uses (evidence: `FRONTEND/src/App.jsx`)
- Routes and shell → Login and registration: routes to (evidence: `FRONTEND/src/App.jsx`)
- Routes and shell → Hackathon browsing: routes to (evidence: `FRONTEND/src/App.jsx`)
- Routes and shell → Dashboard: routes to (evidence: `FRONTEND/src/App.jsx`)
- Routes and shell → Hackathon details: routes to (evidence: `FRONTEND/src/App.jsx`)
- Routes and shell → Progress tracker: routes to (evidence: `FRONTEND/src/App.jsx`)
- Login and registration → API client: requests (evidence: `FRONTEND/src/pages/Register.jsx`)
- Login and registration → Auth state: saves session (evidence: `FRONTEND/src/pages/Register.jsx`)
- Dashboard → API client: requests (evidence: `FRONTEND/src/pages/Dashboard.jsx`)
- Hackathon browsing → API client: requests (evidence: `FRONTEND/src/pages/Hackathons.jsx`)
- Hackathon details → API client: requests (evidence: `FRONTEND/src/pages/HackathonDetails.jsx`)
- Create and edit → API client: submits via (evidence: `FRONTEND/src/pages/CreateHackathon.jsx`)
- Progress tracker → API client: requests (evidence: `FRONTEND/src/pages/TrackerPage.jsx`)
- API client → Express server: HTTP API (evidence: `README.md`)
- Express server → Auth routes: mounts (evidence: `BACKEND/server.js`)
- Express server → Hackathon routes: mounts (evidence: `BACKEND/server.js`)
- Express server → Tracker routes: mounts (evidence: `BACKEND/server.js`)
- Express server → GitHub routes: mounts (evidence: `BACKEND/server.js`)
- Auth routes → Auth controller: dispatches (evidence: `BACKEND/src/routes/authRoutes.js`)
- Hackathon routes → JWT middleware: guards (evidence: `BACKEND/src/routes/hackathonRoutes.js`)
- Hackathon routes → Hackathon controller: dispatches (evidence: `BACKEND/src/routes/hackathonRoutes.js`)
- Tracker routes → JWT middleware: guards (evidence: `BACKEND/src/routes/trackerRoutes.js`)
- Tracker routes → Tracker controller: dispatches (evidence: `BACKEND/src/routes/trackerRoutes.js`)
- GitHub routes → JWT middleware: guards (evidence: `BACKEND/src/routes/githubRoutes.js`)
- GitHub routes → GitHub controller: dispatches (evidence: `BACKEND/src/routes/githubRoutes.js`)
- Auth controller → User records: reads and writes (evidence: `BACKEND/src/controllers/authController.js`)
- Hackathon controller → Hackathon records: reads and writes (evidence: `BACKEND/src/controllers/hackathonController.js`)
- Tracker controller → Tracker records: reads and writes (evidence: `BACKEND/src/controllers/trackerController.js`)
- Tracker controller → Hackathon records: checks event (evidence: `BACKEND/src/controllers/trackerController.js`)
- GitHub controller → GitHub service: delegates (evidence: `BACKEND/src/controllers/githubController.js`)
- GitHub service → GitHub API: fetches profile and repos (evidence: `README.md`)
- Express server → MongoDB: connects (evidence: `README.md`)
