# ajazahmed18/jobtracker architecture

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

- Interactive diagram: https://gitdiagram.com/ajazahmed18/jobtracker
- Repository: https://github.com/ajazahmed18/jobtracker

## Overview

JobTrack is a MongoDB-backed job-tracking API. Clients register or log in, then use a JWT to access their profile and create, list, retrieve, or delete their own job records. The Express server mounts the user and job routers and connects to MongoDB; the route handlers perform the domain operations through Mongoose models. The excerpts show these responsibilities and links, but do not expose the database’s internal deployment or detailed request/response flow.

Main entry points: [`server.js`](https://github.com/ajazahmed18/jobtracker/blob/main/server.js) (Express server), [`APIs/jobApis.js`](https://github.com/ajazahmed18/jobtracker/blob/main/APIs/jobApis.js) (Job operations), [`APIs/userApi.js`](https://github.com/ajazahmed18/jobtracker/blob/main/APIs/userApi.js) (Profile access), [`middleware/authMiddleware.js`](https://github.com/ajazahmed18/jobtracker/blob/main/middleware/authMiddleware.js) (JWT verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_server["Express server<br/>[server.js]"]
  node_mongo[("MongoDB")]
end

subgraph group_identity["Identity"]
  node_users["Registration and login<br/>[userApi.js]"]
  node_profile["Profile access<br/>[userApi.js]"]
  node_auth["JWT verification<br/>[authMiddleware.js]"]
  node_user_model[("User model<br/>[UserModel.js]")]
end

subgraph group_jobs["Job tracking"]
  node_job_routes["Job operations<br/>[jobApis.js]"]
  node_job_model[("Job model<br/>[JobModel.js]")]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"mounts /users"| node_users
node_server -->|"mounts /jobs"| node_job_routes
node_server -->|"connects to"| node_mongo
node_users -->|"queries and saves"| node_user_model
node_profile -->|"guards profile"| node_auth
node_profile -->|"queries profile"| node_user_model
node_job_routes -->|"guards operations"| node_auth
node_job_routes -->|"queries and saves"| node_job_model

click node_server "https://github.com/ajazahmed18/jobtracker/blob/main/server.js"
click node_users "https://github.com/ajazahmed18/jobtracker/blob/main/APIs/userApi.js"
click node_profile "https://github.com/ajazahmed18/jobtracker/blob/main/APIs/userApi.js"
click node_auth "https://github.com/ajazahmed18/jobtracker/blob/main/middleware/authMiddleware.js"
click node_user_model "https://github.com/ajazahmed18/jobtracker/blob/main/models/UserModel.js"
click node_job_routes "https://github.com/ajazahmed18/jobtracker/blob/main/APIs/jobApis.js"
click node_job_model "https://github.com/ajazahmed18/jobtracker/blob/main/models/JobModel.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_server,node_mongo,node_client toneBlue
class node_users,node_profile,node_auth,node_user_model toneAmber
class node_job_routes,node_job_model toneMint
```

## Components

### API runtime

- [Express server](https://github.com/ajazahmed18/jobtracker/blob/main/server.js): `server.js`
- **MongoDB**

### Identity

- [Registration and login](https://github.com/ajazahmed18/jobtracker/blob/main/APIs/userApi.js): `APIs/userApi.js`
- [Profile access](https://github.com/ajazahmed18/jobtracker/blob/main/APIs/userApi.js): `APIs/userApi.js`
- [JWT verification](https://github.com/ajazahmed18/jobtracker/blob/main/middleware/authMiddleware.js): `middleware/authMiddleware.js`
- [User model](https://github.com/ajazahmed18/jobtracker/blob/main/models/UserModel.js): `models/UserModel.js`

### Job tracking

- [Job operations](https://github.com/ajazahmed18/jobtracker/blob/main/APIs/jobApis.js): `APIs/jobApis.js`
- [Job model](https://github.com/ajazahmed18/jobtracker/blob/main/models/JobModel.js): `models/JobModel.js`

### Other components

- **API client**

## Connections

- API client → Express server: sends requests
- Express server → Registration and login: mounts /users (evidence: `server.js`)
- Express server → Job operations: mounts /jobs (evidence: `server.js`)
- Express server → MongoDB: connects to (evidence: `server.js`)
- Registration and login → User model: queries and saves (evidence: `APIs/userApi.js`)
- Profile access → JWT verification: guards profile (evidence: `APIs/userApi.js`)
- Profile access → User model: queries profile (evidence: `APIs/userApi.js`)
- Job operations → JWT verification: guards operations (evidence: `APIs/jobApis.js`)
- Job operations → Job model: queries and saves (evidence: `APIs/jobApis.js`)
