# aparna21400/interviewbuddy architecture

> Architecture diagram of the GitHub repository aparna21400/interviewbuddy, 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/aparna21400/interviewbuddy
- Repository: https://github.com/aparna21400/interviewbuddy

## Overview

InterviewBuddy is a peer-to-peer mock interview platform organized around the cycle of finding a practice partner, scheduling and conducting an interview, earning or spending credits, and exchanging feedback. Users enter through the React app and its protected dashboard; the Express API routes requests to feature modules backed by MySQL. Authentication uses Firebase tokens, while Google Calendar supports scheduling and meeting links. The README documents the REST boundary and major capabilities; some feature-specific controller connections are not shown in the sampled source, so those links are omitted or marked unverified.

Main entry points: [`backend/app.js`](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/app.js) (API router), [`backend/config/mysql.js`](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/config/mysql.js) (MySQL), [`backend/modules/Schedule/interviewCon.js`](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Schedule/interviewCon.js) (Interview scheduling), [`backend/modules/Google/googleCalendarService.js`](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Google/googleCalendarService.js) (Calendar service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React application"]
  node_react_app["React routes<br/>[App.jsx]"]
  node_auth_context["Auth session<br/>[AuthContext.jsx]"]
  node_dashboard["Dashboard views"]
  node_match_view["Match view<br/>[Matches.jsx]"]
  node_schedule_view["Schedule view<br/>[Schedule.jsx]"]
  node_profile_view["Profile view<br/>[Profile.jsx]"]
  node_credits_view["Credits view<br/>[Credits.jsx]"]
  node_feedback_view["Feedback view<br/>[Feedback.jsx]"]
  node_settings_view["Settings view<br/>[Settings.jsx]"]
  node_api_client["REST client<br/>[api.js]"]
end

subgraph group_api["Express API"]
  node_api_server["API router<br/>[app.js]"]
  node_auth_feature["Authentication<br/>[authCon.js]"]
  node_auth_guard["Token guard<br/>[auth.js]"]
  node_user_feature["User profiles"]
  node_skills_feature["Skills<br/>[skillsRoute.js]"]
  node_mysql[("MySQL<br/>[mysql.js]")]
end

subgraph group_practice["Interview workflows"]
  node_matching_feature["Smart matching<br/>[matchCon.js]"]
  node_scheduling_feature["Interview scheduling<br/>[interviewCon.js]"]
  node_feedback_feature["Interview feedback"]
  node_credits_feature["Credit tracking"]
  node_settings_feature["Availability settings"]
end

subgraph group_integrations["Identity and integrations"]
  node_firebase["Firebase Auth<br/>[firebase.js]"]
  node_google_oauth["Google OAuth<br/>[googleAuth.js]"]
  node_calendar_service["Calendar service"]
end

node_learner(("Learner"))
node_google_calendar["Google Calendar"]

node_learner -->|"uses"| node_react_app
node_react_app -->|"routes to"| node_dashboard
node_learner -.->|"requests data"| node_api_client
node_api_client -->|"calls REST API"| node_api_server
node_api_server -->|"mounts auth"| node_auth_feature
node_api_server -->|"mounts users"| node_user_feature
node_api_server -->|"mounts matches"| node_matching_feature
node_api_server -->|"mounts feedback"| node_feedback_feature
node_api_server -->|"mounts interviews"| node_scheduling_feature
node_api_server -->|"mounts credits"| node_credits_feature
node_api_server -->|"mounts settings"| node_settings_feature
node_api_server -->|"mounts skills"| node_skills_feature
node_auth_feature -->|"verifies identity"| node_firebase
node_auth_feature -->|"reads and writes"| node_mysql
node_auth_guard -->|"verifies tokens"| node_firebase
node_auth_guard -->|"loads user"| node_mysql
node_skills_feature -->|"guards routes"| node_auth_guard
node_skills_feature -->|"reads and writes skills"| node_mysql
node_matching_feature -->|"queries matching data"| node_mysql
node_scheduling_feature -->|"stores interview data"| node_mysql
node_scheduling_feature -->|"creates calendar events"| node_calendar_service
node_google_oauth -->|"handles OAuth"| node_calendar_service
node_calendar_service -->|"stores tokens"| node_mysql
node_calendar_service -->|"creates events"| node_google_calendar
node_match_view -.->|"uses matching API"| node_matching_feature
node_schedule_view -.->|"uses scheduling API"| node_scheduling_feature
node_profile_view -.->|"uses profile API"| node_user_feature
node_credits_view -.->|"uses credits API"| node_credits_feature
node_feedback_view -.->|"uses feedback API"| node_feedback_feature
node_settings_view -.->|"uses settings API"| node_settings_feature

click node_react_app "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/App.jsx"
click node_auth_context "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/context/AuthContext.jsx"
click node_dashboard "https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/frontend/src/components/Dashboard"
click node_match_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Matches.jsx"
click node_schedule_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Schedule.jsx"
click node_profile_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Profile.jsx"
click node_credits_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Credits.jsx"
click node_feedback_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Feedback.jsx"
click node_settings_view "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Settings.jsx"
click node_api_client "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/lib/api.js"
click node_api_server "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/app.js"
click node_auth_feature "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/auth/authCon.js"
click node_auth_guard "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/auth/auth.js"
click node_user_feature "https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/users"
click node_skills_feature "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/Shared/services/skillsRoute.js"
click node_matching_feature "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/matches/matchCon.js"
click node_scheduling_feature "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Schedule/interviewCon.js"
click node_feedback_feature "https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/Feedback"
click node_credits_feature "https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/credits"
click node_settings_feature "https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/Setting"
click node_mysql "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/config/mysql.js"
click node_firebase "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/config/firebase.js"
click node_google_oauth "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Google/googleAuth.js"
click node_calendar_service "https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Google/googleCalendarService.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_react_app,node_auth_context,node_dashboard,node_match_view,node_schedule_view,node_profile_view,node_credits_view,node_feedback_view,node_settings_view,node_api_client toneBlue
class node_api_server,node_auth_feature,node_auth_guard,node_user_feature,node_skills_feature,node_mysql toneAmber
class node_matching_feature,node_scheduling_feature,node_feedback_feature,node_credits_feature,node_settings_feature toneMint
class node_firebase,node_google_oauth,node_calendar_service toneRose
class node_learner,node_google_calendar toneIndigo
```

## Components

### React application

- [React routes](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/App.jsx): `frontend/App.jsx`
- [Auth session](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Dashboard views](https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/frontend/src/components/Dashboard): `frontend/src/components/Dashboard`
- [Match view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Matches.jsx): `frontend/src/components/Dashboard/Matches.jsx`
- [Schedule view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Schedule.jsx): `frontend/src/components/Dashboard/Schedule.jsx`
- [Profile view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Profile.jsx): `frontend/src/components/Dashboard/Profile.jsx`
- [Credits view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Credits.jsx): `frontend/src/components/Dashboard/Credits.jsx`
- [Feedback view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Feedback.jsx): `frontend/src/components/Dashboard/Feedback.jsx`
- [Settings view](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/Dashboard/Settings.jsx): `frontend/src/components/Dashboard/Settings.jsx`
- [REST client](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/frontend/src/components/lib/api.js): `frontend/src/components/lib/api.js`

### Express API

- [API router](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/app.js): `backend/app.js`
- [Authentication](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/auth/authCon.js): `backend/modules/auth/authCon.js`
- [Token guard](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/auth/auth.js): `backend/modules/auth/auth.js`
- [User profiles](https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/users): `backend/modules/users`
- [Skills](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/Shared/services/skillsRoute.js): `backend/Shared/services/skillsRoute.js`
- [MySQL](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/config/mysql.js): `backend/config/mysql.js`

### Interview workflows

- [Smart matching](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/matches/matchCon.js): `backend/modules/matches/matchCon.js`
- [Interview scheduling](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Schedule/interviewCon.js): `backend/modules/Schedule/interviewCon.js`
- [Interview feedback](https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/Feedback): `backend/modules/Feedback`
- [Credit tracking](https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/credits): `backend/modules/credits`
- [Availability settings](https://github.com/aparna21400/interviewbuddy/tree/fix-main-clean/backend/modules/Setting): `backend/modules/Setting`

### Identity and integrations

- [Firebase Auth](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/config/firebase.js): `backend/config/firebase.js`
- [Google OAuth](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Google/googleAuth.js): `backend/modules/Google/googleAuth.js`
- [Calendar service](https://github.com/aparna21400/interviewbuddy/blob/fix-main-clean/backend/modules/Google/googleCalendarService.js): `backend/modules/Google/googleCalendarService.js`

### Other components

- **Learner**
- **Google Calendar**

## Connections

- Learner → React routes: uses (evidence: `frontend/App.jsx`)
- React routes → Dashboard views: routes to (evidence: `frontend/App.jsx`)
- Learner → REST client: requests data
- REST client → API router: calls REST API
- API router → Authentication: mounts auth (evidence: `backend/app.js`)
- API router → User profiles: mounts users (evidence: `backend/app.js`)
- API router → Smart matching: mounts matches (evidence: `backend/app.js`)
- API router → Interview feedback: mounts feedback (evidence: `backend/app.js`)
- API router → Interview scheduling: mounts interviews (evidence: `backend/app.js`)
- API router → Credit tracking: mounts credits (evidence: `backend/app.js`)
- API router → Availability settings: mounts settings (evidence: `backend/app.js`)
- API router → Skills: mounts skills (evidence: `backend/app.js`)
- Authentication → Firebase Auth: verifies identity (evidence: `backend/modules/auth/authCon.js`)
- Authentication → MySQL: reads and writes (evidence: `backend/modules/auth/authCon.js`)
- Token guard → Firebase Auth: verifies tokens (evidence: `backend/modules/auth/auth.js`)
- Token guard → MySQL: loads user (evidence: `backend/modules/auth/auth.js`)
- Skills → Token guard: guards routes (evidence: `backend/Shared/services/skillsRoute.js`)
- Skills → MySQL: reads and writes skills (evidence: `backend/Shared/services/skillsRoute.js`)
- Smart matching → MySQL: queries matching data (evidence: `backend/modules/matches/matchCon.js`)
- Interview scheduling → MySQL: stores interview data (evidence: `backend/modules/Schedule/interviewCon.js`)
- Interview scheduling → Calendar service: creates calendar events (evidence: `backend/modules/Schedule/interviewCon.js`)
- Google OAuth → Calendar service: handles OAuth (evidence: `backend/modules/Google/googleAuth.js`)
- Calendar service → MySQL: stores tokens (evidence: `backend/modules/Google/googleCalendarService.js`)
- Calendar service → Google Calendar: creates events (evidence: `backend/modules/Google/googleCalendarService.js`)
- Match view → Smart matching: uses matching API
- Schedule view → Interview scheduling: uses scheduling API
- Profile view → User profiles: uses profile API
- Credits view → Credit tracking: uses credits API
- Feedback view → Interview feedback: uses feedback API
- Settings view → Availability settings: uses settings API
