# gitgunawardhana/issue-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/gitgunawardhana/issue-tracker
- Repository: https://github.com/gitgunawardhana/issue-tracker

## Overview

Issue Tracker is a full-stack collaborative issue-management app. Users register or log in, then use a protected dashboard to search and filter issues, create or update them, manage assignment and resolution, and export filtered results. The React client keeps auth and issue state, while Express routes handle authentication and issue operations; controllers validate requests and use Mongoose models backed by MongoDB. The README documents refresh-token authentication, URL-synced filters, PDF/JSON exports, and theming. Some frontend and route behavior is represented from the README and source index rather than sampled implementations.

Main entry points: [`frontend/src/pages/Dashboard.tsx`](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/pages/Dashboard.tsx) (Dashboard), [`frontend/src/App.tsx`](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/App.tsx) (App routing), [`backend/src/routes/issues.ts`](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/issues.ts) (Issue routes), [`backend/src/server.ts`](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/server.ts) (HTTP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["App routing<br/>[App.tsx]"]
  node_login["Login and register"]
  node_authstate["Auth state<br/>[authStore.ts]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_experience["Issue experience"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_issue_ui["Issue forms and views"]
  node_filtering["Search and filters<br/>[Dashboard.tsx]"]
  node_export_ui["Export controls<br/>[ExportMenu.tsx]"]
  node_issue_state["Issue state<br/>[issueStore.ts]"]
  node_theme["Theme state<br/>[themeStore.ts]"]
  node_toasts["Toast state and display<br/>[toastStore.ts]"]
end

subgraph group_api["Backend API"]
  node_auth_routes["Authentication<br/>[auth.ts]"]
  node_issue_routes["Issue routes<br/>[issues.ts]"]
  node_user_routes["User routes<br/>[users.ts]"]
  node_auth_middleware["JWT authorization<br/>[auth.ts]"]
  node_issue_controller["Issue operations<br/>[issueController.ts]"]
  node_export_controller["Filtered exports"]
  node_server["HTTP server<br/>[server.ts]"]
end

subgraph group_data["Persistence"]
  node_issue_model[("Issue records<br/>[Issue.ts]")]
  node_user_model[("User records<br/>[User.ts]")]
end

node_user(("Team member"))
node_mongodb[("MongoDB")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"protects and routes"| node_dashboard
node_login -->|"authenticates through"| node_api_client
node_login -->|"updates"| node_authstate
node_dashboard -->|"requests data"| node_api_client
node_dashboard -->|"updates"| node_issue_state
node_dashboard -->|"renders"| node_issue_ui
node_dashboard -->|"syncs filters"| node_filtering
node_dashboard -->|"handles exports"| node_export_ui
node_dashboard -->|"shows notifications"| node_toasts
node_app -->|"applies theme"| node_theme
node_api_client -->|"persists auth"| node_authstate
node_api_client -->|"calls API"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_issue_routes
node_server -->|"mounts"| node_user_routes
node_issue_routes -->|"authorizes"| node_auth_middleware
node_issue_routes -->|"dispatches to"| node_issue_controller
node_issue_routes -->|"dispatches export"| node_export_controller
node_user_routes -->|"authorizes"| node_auth_middleware
node_auth_routes -->|"reads and writes"| node_user_model
node_issue_controller -->|"queries and updates"| node_issue_model
node_export_controller -->|"queries filtered issues"| node_issue_model
node_issue_model -.->|"stores records"| node_mongodb
node_user_model -.->|"stores records"| node_mongodb

click node_app "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/App.tsx"
click node_login "https://github.com/gitgunawardhana/issue-tracker/tree/main/frontend/src/pages"
click node_authstate "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/authStore.ts"
click node_api_client "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/services/api.ts"
click node_dashboard "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/pages/Dashboard.tsx"
click node_issue_ui "https://github.com/gitgunawardhana/issue-tracker/tree/main/frontend/src/components"
click node_filtering "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/pages/Dashboard.tsx"
click node_export_ui "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/components/ExportMenu.tsx"
click node_issue_state "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/issueStore.ts"
click node_theme "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/themeStore.ts"
click node_toasts "https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/toastStore.ts"
click node_auth_routes "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/auth.ts"
click node_issue_routes "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/issues.ts"
click node_user_routes "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/users.ts"
click node_auth_middleware "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/middleware/auth.ts"
click node_issue_controller "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/controllers/issueController.ts"
click node_export_controller "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/controllers/exportController.ts"
click node_server "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/server.ts"
click node_issue_model "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/models/Issue.ts"
click node_user_model "https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/models/User.ts"

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_login,node_authstate,node_api_client toneBlue
class node_dashboard,node_issue_ui,node_filtering,node_export_ui,node_issue_state,node_theme,node_toasts,node_mongodb toneAmber
class node_auth_routes,node_issue_routes,node_user_routes,node_auth_middleware,node_issue_controller,node_export_controller,node_server toneMint
class node_issue_model,node_user_model toneRose
class node_user toneIndigo
```

## Components

### React client

- [App routing](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Login and register](https://github.com/gitgunawardhana/issue-tracker/tree/main/frontend/src/pages): `frontend/src/pages`
- [Auth state](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/authStore.ts): `frontend/src/store/authStore.ts`
- [API client](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Issue experience

- [Dashboard](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [Issue forms and views](https://github.com/gitgunawardhana/issue-tracker/tree/main/frontend/src/components): `frontend/src/components`
- [Search and filters](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [Export controls](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/components/ExportMenu.tsx): `frontend/src/components/ExportMenu.tsx`
- [Issue state](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/issueStore.ts): `frontend/src/store/issueStore.ts`
- [Theme state](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/themeStore.ts): `frontend/src/store/themeStore.ts`
- [Toast state and display](https://github.com/gitgunawardhana/issue-tracker/blob/main/frontend/src/store/toastStore.ts): `frontend/src/store/toastStore.ts`

### Backend API

- [Authentication](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/auth.ts): `backend/src/routes/auth.ts`
- [Issue routes](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/issues.ts): `backend/src/routes/issues.ts`
- [User routes](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/routes/users.ts): `backend/src/routes/users.ts`
- [JWT authorization](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/middleware/auth.ts): `backend/src/middleware/auth.ts`
- [Issue operations](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/controllers/issueController.ts): `backend/src/controllers/issueController.ts`
- [Filtered exports](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/controllers/exportController.ts): `backend/src/controllers/exportController.ts`
- [HTTP server](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/server.ts): `backend/src/server.ts`

### Persistence

- [Issue records](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/models/Issue.ts): `backend/src/models/Issue.ts`
- [User records](https://github.com/gitgunawardhana/issue-tracker/blob/main/backend/src/models/User.ts): `backend/src/models/User.ts`

### Other components

- **Team member**
- **MongoDB**

## Connections

- Team member → App routing: uses (evidence: `README.md`)
- App routing → Login and register: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Dashboard: protects and routes (evidence: `frontend/src/App.tsx`)
- Login and register → API client: authenticates through (evidence: `frontend/src/pages/Login.tsx`)
- Login and register → Auth state: updates (evidence: `frontend/src/pages/Login.tsx`)
- Dashboard → API client: requests data (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard → Issue state: updates (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard → Issue forms and views: renders (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard → Search and filters: syncs filters (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard → Export controls: handles exports (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard → Toast state and display: shows notifications (evidence: `frontend/src/pages/Dashboard.tsx`)
- App routing → Theme state: applies theme (evidence: `frontend/src/App.tsx`)
- API client → Auth state: persists auth (evidence: `frontend/src/services/api.ts`)
- API client → HTTP server: calls API (evidence: `README.md`)
- HTTP server → Authentication: mounts (evidence: `backend/src/server.ts`)
- HTTP server → Issue routes: mounts (evidence: `backend/src/server.ts`)
- HTTP server → User routes: mounts (evidence: `backend/src/server.ts`)
- Issue routes → JWT authorization: authorizes (evidence: `backend/src/routes/issues.ts`)
- Issue routes → Issue operations: dispatches to (evidence: `backend/src/routes/issues.ts`)
- Issue routes → Filtered exports: dispatches export (evidence: `backend/src/routes/issues.ts`)
- User routes → JWT authorization: authorizes (evidence: `backend/src/routes/users.ts`)
- Authentication → User records: reads and writes (evidence: `backend/src/routes/auth.ts`)
- Issue operations → Issue records: queries and updates (evidence: `backend/src/controllers/issueController.ts`)
- Filtered exports → Issue records: queries filtered issues (evidence: `backend/src/controllers/exportController.ts`)
- Issue records → MongoDB: stores records (evidence: `README.md`)
- User records → MongoDB: stores records (evidence: `README.md`)
