# dasrohit15/fixxmate architecture

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

- Interactive diagram: https://gitdiagram.com/dasrohit15/fixxmate
- Repository: https://github.com/dasrohit15/fixxmate

## Overview

FixxMate presents vehicle-service discovery and repair requests for vehicle owners and mechanics. The visible request workflow starts in the web UI, submits a service request through the API client, and uses backend request handling and Mongo models; mechanics can review requests and users can track theirs. Authentication, OTP, and map assistance are separate capabilities. The README also advertises scheduling, inventory, repair history, and analytics, but the provided excerpts do not establish implementations for those features, so they are not expanded into speculative components. Evidence is limited to the README and indexed or excerpted sources.

Main entry points: [`frontend/src/AppRoutes.tsx`](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/AppRoutes.tsx) (Page routing), [`backend/server.js`](https://github.com/dasrohit15/fixxmate/blob/main/backend/server.js) (HTTP API server), [`frontend/src/services/api.ts`](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/services/api.ts) (API client), [`frontend/src/pages/RequestService.tsx`](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/RequestService.tsx) (Request service form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Application shell<br/>[App.tsx]"]
  node_routes["Page routing<br/>[AppRoutes.tsx]"]
  node_landing["Landing experience<br/>[Landing.tsx]"]
  node_navbar["Account navigation<br/>[Navbar.tsx]"]
end

subgraph group_identity["Identity and accounts"]
  node_authpages["Login and signup<br/>[Signup.tsx]"]
  node_authstate["Session state<br/>[AuthContext.tsx]"]
  node_guard["Protected routes<br/>[ProtectedRoute.tsx]"]
  node_otpstore[("OTP records<br/>[Otp.js]")]
  node_mail["SMTP email service"]
end

subgraph group_repair["Service requests"]
  node_api["API client<br/>[api.ts]"]
  node_requestform["Request service form<br/>[RequestService.tsx]"]
  node_available["Available requests<br/>[Requests.tsx]"]
  node_myrequests["My requests<br/>[MyRequests.tsx]"]
end

subgraph group_maps["Location services"]
  node_maproutes["Map endpoints<br/>[map.routes.js]"]
  node_mapcontroller["Map controller<br/>[map.controller.js]"]
  node_mapservice["Geocoding and routing<br/>[map.services.js]"]
  node_googlemaps["Google Maps APIs"]
end

subgraph group_backend["Backend and persistence"]
  node_backend["HTTP API server<br/>[server.js]"]
  node_requestmodel[("Repair request records<br/>[Request.js]")]
  node_userstore[("User records<br/>[User.js]")]
  node_mechanicstore[("Mechanic records<br/>[Mechanic.js]")]
end

node_visitor(("Vehicle owner / mechanic"))

node_visitor -->|"opens app"| node_routes
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_landing
node_routes -->|"routes to"| node_authpages
node_routes -->|"routes to"| node_requestform
node_routes -->|"routes to"| node_available
node_routes -->|"routes to"| node_myrequests
node_routes -->|"protects pages"| node_guard
node_authpages -->|"calls"| node_api
node_authstate -->|"stores session"| node_visitor
node_guard -->|"checks session"| node_authstate
node_requestform -->|"submits request"| node_api
node_available -->|"loads requests"| node_api
node_myrequests -->|"loads own requests"| node_api
node_navbar -->|"reads session"| node_authstate
node_api -->|"HTTP requests"| node_backend
node_backend -->|"queries requests"| node_requestmodel
node_backend -->|"queries accounts"| node_userstore
node_backend -->|"queries mechanics"| node_mechanicstore
node_backend -->|"verifies OTP"| node_otpstore
node_backend -->|"sends OTP"| node_mail
node_backend -->|"mounts endpoints"| node_maproutes
node_maproutes -->|"dispatches"| node_mapcontroller
node_mapcontroller -->|"calls mapping"| node_mapservice
node_mapcontroller -->|"reads destination"| node_requestmodel
node_mapservice -->|"requests map data"| node_googlemaps
node_requestform -->|"fetches suggestions"| node_maproutes

click node_app "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/App.tsx"
click node_routes "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/AppRoutes.tsx"
click node_landing "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Landing.tsx"
click node_authpages "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Signup.tsx"
click node_authstate "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/contexts/AuthContext.tsx"
click node_guard "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/components/ProtectedRoute.tsx"
click node_api "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/services/api.ts"
click node_requestform "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/RequestService.tsx"
click node_available "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Requests.tsx"
click node_myrequests "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/MyRequests.tsx"
click node_navbar "https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/components/Navbar.tsx"
click node_backend "https://github.com/dasrohit15/fixxmate/blob/main/backend/server.js"
click node_requestmodel "https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Request.js"
click node_userstore "https://github.com/dasrohit15/fixxmate/blob/main/backend/models/User.js"
click node_mechanicstore "https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Mechanic.js"
click node_otpstore "https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Otp.js"
click node_maproutes "https://github.com/dasrohit15/fixxmate/blob/main/backend/routes/map.routes.js"
click node_mapcontroller "https://github.com/dasrohit15/fixxmate/blob/main/backend/controller/map.controller.js"
click node_mapservice "https://github.com/dasrohit15/fixxmate/blob/main/backend/services/map.services.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_routes,node_landing,node_navbar toneBlue
class node_authpages,node_authstate,node_guard,node_otpstore,node_mail toneAmber
class node_api,node_requestform,node_available,node_myrequests toneMint
class node_maproutes,node_mapcontroller,node_mapservice,node_googlemaps toneRose
class node_backend,node_requestmodel,node_userstore,node_mechanicstore,node_visitor toneIndigo
```

## Components

### Web application

- [Application shell](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Page routing](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/AppRoutes.tsx): `frontend/src/AppRoutes.tsx`
- [Landing experience](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Landing.tsx): `frontend/src/pages/Landing.tsx`
- [Account navigation](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/components/Navbar.tsx): `frontend/src/components/Navbar.tsx`

### Identity and accounts

- [Login and signup](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Signup.tsx): `frontend/src/pages/Signup.tsx`
- [Session state](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/contexts/AuthContext.tsx): `frontend/src/contexts/AuthContext.tsx`
- [Protected routes](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/components/ProtectedRoute.tsx): `frontend/src/components/ProtectedRoute.tsx`
- [OTP records](https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Otp.js): `backend/models/Otp.js`
- **SMTP email service**

### Service requests

- [API client](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Request service form](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/RequestService.tsx): `frontend/src/pages/RequestService.tsx`
- [Available requests](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/Requests.tsx): `frontend/src/pages/Requests.tsx`
- [My requests](https://github.com/dasrohit15/fixxmate/blob/main/frontend/src/pages/MyRequests.tsx): `frontend/src/pages/MyRequests.tsx`

### Location services

- [Map endpoints](https://github.com/dasrohit15/fixxmate/blob/main/backend/routes/map.routes.js): `backend/routes/map.routes.js`
- [Map controller](https://github.com/dasrohit15/fixxmate/blob/main/backend/controller/map.controller.js): `backend/controller/map.controller.js`
- [Geocoding and routing](https://github.com/dasrohit15/fixxmate/blob/main/backend/services/map.services.js): `backend/services/map.services.js`
- **Google Maps APIs**

### Backend and persistence

- [HTTP API server](https://github.com/dasrohit15/fixxmate/blob/main/backend/server.js): `backend/server.js`
- [Repair request records](https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Request.js): `backend/models/Request.js`
- [User records](https://github.com/dasrohit15/fixxmate/blob/main/backend/models/User.js): `backend/models/User.js`
- [Mechanic records](https://github.com/dasrohit15/fixxmate/blob/main/backend/models/Mechanic.js): `backend/models/Mechanic.js`

### Other components

- **Vehicle owner / mechanic**

## Connections

- Vehicle owner / mechanic → Page routing: opens app (evidence: `frontend/src/AppRoutes.tsx`)
- Application shell → Page routing: renders (evidence: `frontend/src/App.tsx`)
- Page routing → Landing experience: routes to (evidence: `frontend/src/AppRoutes.tsx`)
- Page routing → Login and signup: routes to (evidence: `frontend/src/AppRoutes.tsx`)
- Page routing → Request service form: routes to (evidence: `frontend/src/AppRoutes.tsx`)
- Page routing → Available requests: routes to (evidence: `frontend/src/AppRoutes.tsx`)
- Page routing → My requests: routes to (evidence: `frontend/src/AppRoutes.tsx`)
- Page routing → Protected routes: protects pages (evidence: `frontend/src/AppRoutes.tsx`)
- Login and signup → API client: calls (evidence: `frontend/src/services/api.ts`)
- Session state → Vehicle owner / mechanic: stores session (evidence: `frontend/src/contexts/AuthContext.tsx`)
- Protected routes → Session state: checks session (evidence: `frontend/src/components/ProtectedRoute.tsx`)
- Request service form → API client: submits request (evidence: `frontend/src/pages/RequestService.tsx`)
- Available requests → API client: loads requests (evidence: `frontend/src/services/api.ts`)
- My requests → API client: loads own requests (evidence: `frontend/src/services/api.ts`)
- Account navigation → Session state: reads session (evidence: `frontend/src/components/Navbar.tsx`)
- API client → HTTP API server: HTTP requests (evidence: `frontend/src/services/api.ts`)
- HTTP API server → Repair request records: queries requests (evidence: `backend/server.js`)
- HTTP API server → User records: queries accounts (evidence: `backend/server.js`)
- HTTP API server → Mechanic records: queries mechanics (evidence: `backend/server.js`)
- HTTP API server → OTP records: verifies OTP (evidence: `backend/server.js`)
- HTTP API server → SMTP email service: sends OTP (evidence: `backend/server.js`)
- HTTP API server → Map endpoints: mounts endpoints (evidence: `backend/server.js`)
- Map endpoints → Map controller: dispatches (evidence: `backend/routes/map.routes.js`)
- Map controller → Geocoding and routing: calls mapping (evidence: `backend/controller/map.controller.js`)
- Map controller → Repair request records: reads destination (evidence: `backend/controller/map.controller.js`)
- Geocoding and routing → Google Maps APIs: requests map data (evidence: `backend/services/map.services.js`)
- Request service form → Map endpoints: fetches suggestions (evidence: `frontend/src/pages/RequestService.tsx`)
