# shravan-chourasiya/synthviewai architecture

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

- Interactive diagram: https://gitdiagram.com/shravan-chourasiya/synthviewai
- Repository: https://github.com/shravan-chourasiya/synthviewai

## Overview

This is an AI-assisted interview-practice application: users authenticate, create or resume an interview, answer questions in a live session, and review a report. The backend also exposes analytics, administration, notifications, and shared reports; the frontend supplies the corresponding user and admin views. The sampled material confirms the interview route/controller/service path and parts of authentication and admin handling. AI generation, realtime wiring, and several feature branches are represented from the repository tree, but their internal calls were not sampled.

Main entry points: [`backend/src/modules/auth/services/auth.service.ts`](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/auth/services/auth.service.ts) (Auth services), [`frontend/src/lib/services/interview.service.ts`](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/services/interview.service.ts) (Feature services), [`frontend/src/App.tsx`](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/App.tsx) (App routing), [`backend/src/modules/interview/services/interview.service.ts`](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/services/interview.service.ts) (Interview service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_webapp["App routing<br/>[App.tsx]"]
  node_authui["Auth views<br/>[auth.tsx]"]
  node_interviewui["Interview views<br/>[live.tsx]"]
  node_reportui["Reports and history<br/>[report.tsx]"]
  node_adminui["Admin views<br/>[overview.tsx]"]
  node_http["HTTP client<br/>[http.ts]"]
  node_frontservices["Feature services"]
  node_liveclient["Live socket client"]
end

subgraph group_api["Backend API"]
  node_routes["API routes"]
  node_authcontroller["Auth controller<br/>[auth.controller.ts]"]
end

subgraph group_interview["Interview runtime"]
  node_interviewcontroller["Interview controller"]
  node_interviewservice["Interview service"]
  node_ai["AI interview engine"]
  node_context["Interview context"]
  node_gateway["Socket gateway"]
end

subgraph group_platform["Platform services"]
  node_authservice["Auth services<br/>[auth.service.ts]"]
  node_postgres[("Postgres<br/>[postgres.init.ts]")]
  node_redis[("Redis<br/>[redis.init.ts]")]
  node_mail["Mail delivery<br/>[mail.service.ts]"]
  node_notifications["Notifications"]
  node_contact["Contact<br/>[contact.service.ts]"]
end

subgraph group_insights["Insights and admin"]
  node_analytics["Analytics"]
  node_admin["Admin operations<br/>[admin.service.ts]"]
  node_admincontroller["Admin controller"]
end

node_user(("User"))

node_user -.->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authui
node_webapp -->|"routes to"| node_interviewui
node_webapp -.->|"routes to"| node_adminui
node_authui -.->|"requests data"| node_frontservices
node_interviewui -.->|"requests data"| node_frontservices
node_interviewui -.->|"uses socket"| node_liveclient
node_reportui -.->|"requests data"| node_frontservices
node_frontservices -->|"uses"| node_http
node_http -.->|"HTTP requests"| node_routes
node_routes -->|"routes to"| node_interviewcontroller
node_interviewcontroller -->|"calls"| node_interviewservice
node_interviewservice -.->|"generates questions"| node_ai
node_interviewservice -.->|"uses context"| node_context
node_liveclient -.->|"socket events"| node_gateway
node_interviewservice -.->|"reads and writes"| node_postgres
node_routes -.->|"routes to"| node_authcontroller
node_authcontroller -->|"calls"| node_authservice
node_authservice -->|"sends OTP mail"| node_mail
node_authservice -.->|"reads and writes"| node_postgres
node_authservice -.->|"uses"| node_redis
node_authservice -.->|"unverified"| node_admin
node_admincontroller -->|"calls"| node_admin
node_admincontroller -->|"gets metrics"| node_analytics
node_adminui -.->|"requests data"| node_frontservices
node_notifications -.->|"unverified storage"| node_postgres
node_contact -.->|"unverified delivery"| node_mail

click node_webapp "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/App.tsx"
click node_authui "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/auth/auth.tsx"
click node_interviewui "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/interviews/live.tsx"
click node_reportui "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/interviews/report.tsx"
click node_adminui "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/admin/overview.tsx"
click node_http "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/http.ts"
click node_frontservices "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/services/interview.service.ts"
click node_liveclient "https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/socket/interview-socket.ts"
click node_routes "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/routes/interview.routes.ts"
click node_authcontroller "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/auth/controllers/auth.controller.ts"
click node_authservice "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/auth/services/auth.service.ts"
click node_interviewcontroller "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/controller/interview.controller.ts"
click node_interviewservice "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/services/interview.service.ts"
click node_ai "https://github.com/shravan-chourasiya/synthviewai/tree/main/backend/src/integrations/ai"
click node_context "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/services/interview.context.service.ts"
click node_gateway "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/websocket/interview.gateway.ts"
click node_postgres "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/db/postgres.init.ts"
click node_redis "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/config/redis.init.ts"
click node_mail "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/services/mail.service.ts"
click node_analytics "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/analytics/services/analytics.service.ts"
click node_admin "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/admin/services/admin.service.ts"
click node_notifications "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/notification/services/notification.service.ts"
click node_contact "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/contact/services/contact.service.ts"
click node_admincontroller "https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/admin/controllers/admin.controller.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_webapp,node_authui,node_interviewui,node_reportui,node_adminui,node_http,node_frontservices,node_liveclient,node_user toneBlue
class node_routes,node_authcontroller toneAmber
class node_interviewcontroller,node_interviewservice,node_ai,node_context,node_gateway toneMint
class node_authservice,node_postgres,node_redis,node_mail,node_notifications,node_contact toneRose
class node_analytics,node_admin,node_admincontroller toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Auth views](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/auth/auth.tsx): `frontend/src/pages/auth/auth.tsx`
- [Interview views](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/interviews/live.tsx): `frontend/src/pages/interviews/live.tsx`
- [Reports and history](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/interviews/report.tsx): `frontend/src/pages/interviews/report.tsx`
- [Admin views](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/pages/admin/overview.tsx): `frontend/src/pages/admin/overview.tsx`
- [HTTP client](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/http.ts): `frontend/src/lib/http.ts`
- [Feature services](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/services/interview.service.ts): `frontend/src/lib/services/interview.service.ts`
- [Live socket client](https://github.com/shravan-chourasiya/synthviewai/blob/main/frontend/src/lib/socket/interview-socket.ts): `frontend/src/lib/socket/interview-socket.ts`

### Backend API

- [API routes](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/routes/interview.routes.ts): `backend/src/routes/interview.routes.ts`
- [Auth controller](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/auth/controllers/auth.controller.ts): `backend/src/modules/auth/controllers/auth.controller.ts`

### Interview runtime

- [Interview controller](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/controller/interview.controller.ts): `backend/src/modules/interview/controller/interview.controller.ts`
- [Interview service](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/services/interview.service.ts): `backend/src/modules/interview/services/interview.service.ts`
- [AI interview engine](https://github.com/shravan-chourasiya/synthviewai/tree/main/backend/src/integrations/ai): `backend/src/integrations/ai`
- [Interview context](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/interview/services/interview.context.service.ts): `backend/src/modules/interview/services/interview.context.service.ts`
- [Socket gateway](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/websocket/interview.gateway.ts): `backend/src/websocket/interview.gateway.ts`

### Platform services

- [Auth services](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/auth/services/auth.service.ts): `backend/src/modules/auth/services/auth.service.ts`
- [Postgres](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/db/postgres.init.ts): `backend/src/db/postgres.init.ts`
- [Redis](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/config/redis.init.ts): `backend/src/config/redis.init.ts`
- [Mail delivery](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/services/mail.service.ts): `backend/src/services/mail.service.ts`
- [Notifications](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/notification/services/notification.service.ts): `backend/src/modules/notification/services/notification.service.ts`
- [Contact](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/contact/services/contact.service.ts): `backend/src/modules/contact/services/contact.service.ts`

### Insights and admin

- [Analytics](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/analytics/services/analytics.service.ts): `backend/src/modules/analytics/services/analytics.service.ts`
- [Admin operations](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/admin/services/admin.service.ts): `backend/src/modules/admin/services/admin.service.ts`
- [Admin controller](https://github.com/shravan-chourasiya/synthviewai/blob/main/backend/src/modules/admin/controllers/admin.controller.ts): `backend/src/modules/admin/controllers/admin.controller.ts`

### Other components

- **User**

## Connections

- User → App routing: uses
- App routing → Auth views: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Interview views: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Admin views: routes to
- Auth views → Feature services: requests data
- Interview views → Feature services: requests data
- Interview views → Live socket client: uses socket
- Reports and history → Feature services: requests data
- Feature services → HTTP client: uses (evidence: `frontend/src/lib/services/interview.service.ts`)
- HTTP client → API routes: HTTP requests
- API routes → Interview controller: routes to (evidence: `backend/src/routes/interview.routes.ts`)
- Interview controller → Interview service: calls (evidence: `backend/src/modules/interview/controller/interview.controller.ts`)
- Interview service → AI interview engine: generates questions
- Interview service → Interview context: uses context
- Live socket client → Socket gateway: socket events
- Interview service → Postgres: reads and writes
- API routes → Auth controller: routes to
- Auth controller → Auth services: calls (evidence: `backend/src/modules/auth/controllers/auth.controller.ts`)
- Auth services → Mail delivery: sends OTP mail (evidence: `backend/src/modules/auth/services/auth.service.ts`)
- Auth services → Postgres: reads and writes (evidence: `backend/src/modules/auth/services/auth.service.ts`)
- Auth services → Redis: uses
- Auth services → Admin operations: unverified
- Admin controller → Admin operations: calls (evidence: `backend/src/modules/admin/controllers/admin.controller.ts`)
- Admin controller → Analytics: gets metrics (evidence: `backend/src/modules/admin/controllers/admin.controller.ts`)
- Admin views → Feature services: requests data
- Notifications → Postgres: unverified storage
- Contact → Mail delivery: unverified delivery
