# team-bytebros/vit-interview architecture

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

- Interactive diagram: https://gitdiagram.com/team-bytebros/vit-interview
- Repository: https://github.com/team-bytebros/vit-interview

## Overview

vit-interview is a backend API for user accounts and profiles, company records, interview experiences, recommendations, and saved articles. API clients send requests through the Express entry point, which mounts domain routes; routes dispatch to controllers that perform Supabase-backed operations. Interview retrieval includes TF-IDF ranking, and a separate controller method computes KNN-style similarity. The frontend currently renders only a Tailwind status screen; the sampled code does not show it calling the API. Edges reflect the shown mounts, dispatches, and data access.

Main entry points: [`Backend/index.js`](https://github.com/team-bytebros/vit-interview/blob/main/Backend/index.js) (Express server), [`Backend/src/config/supabase.js`](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/config/supabase.js) (Supabase client), [`Backend/src/routes/userRoute.js`](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/userRoute.js) (User routes), [`Backend/src/controllers/userController.js`](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/userController.js) (User accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_server["Express server<br/>[index.js]"]
  node_frontend["Status screen<br/>[App.jsx]"]
  node_frontend_entry["React entry<br/>[main.jsx]"]
end

subgraph group_accounts["User accounts"]
  node_user_routes["User routes<br/>[userRoute.js]"]
  node_user_controller["User accounts<br/>[userController.js]"]
end

subgraph group_interviews["Interview content"]
  node_interview_routes["Interview routes"]
  node_interview_controller["Experience and ranking"]
end

subgraph group_catalog["Company and saves"]
  node_company_routes["Company routes<br/>[companyRoute.js]"]
  node_company_controller["Company records"]
  node_saved_routes["Saved article routes"]
  node_saved_controller["Saved articles"]
end

subgraph group_data["Data access"]
  node_supabase_client["Supabase client<br/>[supabase.js]"]
  node_supabase_store[("Supabase database")]
end

node_api_client(("API client"))

node_frontend_entry -->|"renders"| node_frontend
node_api_client -.->|"sends requests"| node_server
node_server -->|"mounts routes"| node_user_routes
node_server -->|"mounts routes"| node_company_routes
node_server -->|"mounts routes"| node_interview_routes
node_server -->|"mounts routes"| node_saved_routes
node_user_routes -->|"dispatches to"| node_user_controller
node_company_routes -->|"dispatches to"| node_company_controller
node_interview_routes -->|"dispatches to"| node_interview_controller
node_saved_routes -->|"dispatches to"| node_saved_controller
node_user_controller -->|"queries through"| node_supabase_client
node_company_controller -->|"queries through"| node_supabase_client
node_interview_controller -->|"queries through"| node_supabase_client
node_saved_controller -->|"queries through"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase_store

click node_server "https://github.com/team-bytebros/vit-interview/blob/main/Backend/index.js"
click node_frontend "https://github.com/team-bytebros/vit-interview/blob/main/Frontend/src/App.jsx"
click node_frontend_entry "https://github.com/team-bytebros/vit-interview/blob/main/Frontend/src/main.jsx"
click node_user_routes "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/userRoute.js"
click node_user_controller "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/userController.js"
click node_company_routes "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/companyRoute.js"
click node_company_controller "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/companyController.js"
click node_interview_routes "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/interviewExperienceRoute.js"
click node_interview_controller "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/interviewExperienceController.js"
click node_saved_routes "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/savedArtcileRoute.js"
click node_saved_controller "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/savedArticleController.js"
click node_supabase_client "https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/config/supabase.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_frontend,node_frontend_entry,node_api_client toneBlue
class node_user_routes,node_user_controller toneAmber
class node_interview_routes,node_interview_controller toneMint
class node_company_routes,node_company_controller,node_saved_routes,node_saved_controller toneRose
class node_supabase_client,node_supabase_store toneIndigo
```

## Components

### API runtime

- [Express server](https://github.com/team-bytebros/vit-interview/blob/main/Backend/index.js): `Backend/index.js`
- [Status screen](https://github.com/team-bytebros/vit-interview/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [React entry](https://github.com/team-bytebros/vit-interview/blob/main/Frontend/src/main.jsx): `Frontend/src/main.jsx`

### User accounts

- [User routes](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/userRoute.js): `Backend/src/routes/userRoute.js`
- [User accounts](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/userController.js): `Backend/src/controllers/userController.js`

### Interview content

- [Interview routes](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/interviewExperienceRoute.js): `Backend/src/routes/interviewExperienceRoute.js`
- [Experience and ranking](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/interviewExperienceController.js): `Backend/src/controllers/interviewExperienceController.js`

### Company and saves

- [Company routes](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/companyRoute.js): `Backend/src/routes/companyRoute.js`
- [Company records](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/companyController.js): `Backend/src/controllers/companyController.js`
- [Saved article routes](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/routes/savedArtcileRoute.js): `Backend/src/routes/savedArtcileRoute.js`
- [Saved articles](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/controllers/savedArticleController.js): `Backend/src/controllers/savedArticleController.js`

### Data access

- [Supabase client](https://github.com/team-bytebros/vit-interview/blob/main/Backend/src/config/supabase.js): `Backend/src/config/supabase.js`
- **Supabase database**

### Other components

- **API client**

## Connections

- React entry → Status screen: renders (evidence: `Frontend/src/main.jsx`)
- API client → Express server: sends requests
- Express server → User routes: mounts routes (evidence: `Backend/index.js`)
- Express server → Company routes: mounts routes (evidence: `Backend/index.js`)
- Express server → Interview routes: mounts routes (evidence: `Backend/index.js`)
- Express server → Saved article routes: mounts routes (evidence: `Backend/index.js`)
- User routes → User accounts: dispatches to (evidence: `Backend/src/routes/userRoute.js`)
- Company routes → Company records: dispatches to (evidence: `Backend/src/routes/companyRoute.js`)
- Interview routes → Experience and ranking: dispatches to (evidence: `Backend/src/routes/interviewExperienceRoute.js`)
- Saved article routes → Saved articles: dispatches to (evidence: `Backend/src/routes/savedArtcileRoute.js`)
- User accounts → Supabase client: queries through (evidence: `Backend/src/controllers/userController.js`)
- Company records → Supabase client: queries through (evidence: `Backend/src/controllers/companyController.js`)
- Experience and ranking → Supabase client: queries through (evidence: `Backend/src/controllers/interviewExperienceController.js`)
- Saved articles → Supabase client: queries through (evidence: `Backend/src/controllers/savedArticleController.js`)
- Supabase client → Supabase database: connects to (evidence: `Backend/src/config/supabase.js`)
