# ayushvishwakarmanitk/studybuddy architecture

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

- Interactive diagram: https://gitdiagram.com/ayushvishwakarmanitk/studybuddy
- Repository: https://github.com/ayushvishwakarmanitk/studybuddy

## Overview

StudyBuddy is a student study-partner matching and accountability platform. Students sign in, complete their profiles and education details, create study spaces, and answer a questionnaire to receive partner matches; the dashboard supports ongoing study-space and progress management. The frontend separates screens, API clients, and shared types; Django views coordinate authentication, profile and study-space operations, and matching. The README also names AI-driven insights, but the available evidence does not establish a separate insights workflow. Backend routes and database configuration were not shown in enough detail to verify their wiring.

Main entry points: [`frontend/src/App.tsx`](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/App.tsx) (App navigation), [`backend/users/views.py`](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/views.py) (Request handlers), [`frontend/src/api/auth.ts`](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/auth.ts) (Auth API), [`frontend/src/api/studyBuddy.ts`](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/studyBuddy.ts) (Study API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_app["App navigation<br/>[App.tsx]"]
  node_sign["Sign-in"]
  node_profile["Profile onboarding"]
  node_dashboard["Study dashboard<br/>[DashboardPage.tsx]"]
  node_questionnaire["Match questionnaire"]
end

subgraph group_frontend["Frontend services"]
  node_authapi["Auth API<br/>[auth.ts]"]
  node_studyapi["Study API<br/>[studyBuddy.ts]"]
  node_http["API transport<br/>[client.ts]"]
  node_types["Study data types<br/>[dashboard.ts]"]
end

subgraph group_backend["Backend domain"]
  node_views["Request handlers<br/>[views.py]"]
  node_googleverify["Google token verification<br/>[google_auth.py]"]
  node_matching["Partner matching<br/>[matching.py]"]
  node_serializers["API serializers<br/>[serializers.py]"]
end

subgraph group_persistence["Domain data"]
  node_models["Student and study records<br/>[models.py]"]
  node_database[("PostgreSQL database")]
end

node_student(("Student"))
node_google(("Google identity"))

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_sign
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_questionnaire
node_sign -->|"authenticates through"| node_authapi
node_profile -->|"updates profile through"| node_authapi
node_dashboard -->|"uses"| node_authapi
node_dashboard -->|"manages study data"| node_studyapi
node_questionnaire -->|"submits answers"| node_studyapi
node_authapi -->|"sends requests"| node_http
node_studyapi -->|"sends requests"| node_http
node_http -.->|"HTTP API calls"| node_views
node_google -->|"provides identity"| node_sign
node_views -->|"verifies token"| node_googleverify
node_googleverify -->|"checks token"| node_google
node_views -->|"requests matches"| node_matching
node_views -->|"serializes responses"| node_serializers
node_views -->|"reads and writes"| node_models
node_matching -->|"uses records"| node_models
node_models -.->|"persists domain data"| node_database
node_studyapi -->|"maps study data"| node_types
node_authapi -->|"uses profile types"| node_types

click node_app "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/App.tsx"
click node_sign "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/SignUpLoginPage.tsx"
click node_profile "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/ProfileCompletionPage.tsx"
click node_dashboard "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/DashboardPage.tsx"
click node_questionnaire "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/QuestionnairePage.tsx"
click node_authapi "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/auth.ts"
click node_studyapi "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/studyBuddy.ts"
click node_http "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/client.ts"
click node_types "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/types/dashboard.ts"
click node_views "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/views.py"
click node_googleverify "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/google_auth.py"
click node_matching "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/matching.py"
click node_serializers "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/serializers.py"
click node_models "https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/models.py"

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_sign,node_profile,node_dashboard,node_questionnaire toneBlue
class node_authapi,node_studyapi,node_http,node_types toneAmber
class node_views,node_googleverify,node_matching,node_serializers toneMint
class node_models,node_database toneRose
class node_student,node_google toneIndigo
```

## Components

### Student experience

- [App navigation](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Sign-in](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/SignUpLoginPage.tsx): `frontend/src/pages/SignUpLoginPage.tsx`
- [Profile onboarding](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/ProfileCompletionPage.tsx): `frontend/src/pages/ProfileCompletionPage.tsx`
- [Study dashboard](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Match questionnaire](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/pages/QuestionnairePage.tsx): `frontend/src/pages/QuestionnairePage.tsx`

### Frontend services

- [Auth API](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/auth.ts): `frontend/src/api/auth.ts`
- [Study API](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/studyBuddy.ts): `frontend/src/api/studyBuddy.ts`
- [API transport](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Study data types](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/frontend/src/types/dashboard.ts): `frontend/src/types/dashboard.ts`

### Backend domain

- [Request handlers](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/views.py): `backend/users/views.py`
- [Google token verification](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/google_auth.py): `backend/users/google_auth.py`
- [Partner matching](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/matching.py): `backend/users/matching.py`
- [API serializers](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/serializers.py): `backend/users/serializers.py`

### Domain data

- [Student and study records](https://github.com/ayushvishwakarmanitk/studybuddy/blob/develop/backend/users/models.py): `backend/users/models.py`
- **PostgreSQL database**

### Other components

- **Student**
- **Google identity**

## Connections

- Student → App navigation: uses (evidence: `frontend/src/App.tsx`)
- App navigation → Sign-in: routes to (evidence: `frontend/src/App.tsx`)
- App navigation → Profile onboarding: routes to (evidence: `frontend/src/App.tsx`)
- App navigation → Study dashboard: routes to (evidence: `frontend/src/App.tsx`)
- App navigation → Match questionnaire: routes to (evidence: `frontend/src/App.tsx`)
- Sign-in → Auth API: authenticates through (evidence: `frontend/src/pages/SignUpLoginPage.tsx`)
- Profile onboarding → Auth API: updates profile through (evidence: `frontend/src/pages/ProfileCompletionPage.tsx`)
- Study dashboard → Auth API: uses (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Study dashboard → Study API: manages study data (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Match questionnaire → Study API: submits answers (evidence: `frontend/src/pages/QuestionnairePage.tsx`)
- Auth API → API transport: sends requests (evidence: `frontend/src/api/auth.ts`)
- Study API → API transport: sends requests (evidence: `frontend/src/api/studyBuddy.ts`)
- API transport → Request handlers: HTTP API calls
- Google identity → Sign-in: provides identity (evidence: `frontend/src/pages/SignUpLoginPage.tsx`)
- Request handlers → Google token verification: verifies token (evidence: `backend/users/views.py`)
- Google token verification → Google identity: checks token (evidence: `backend/users/google_auth.py`)
- Request handlers → Partner matching: requests matches (evidence: `backend/users/views.py`)
- Request handlers → API serializers: serializes responses (evidence: `backend/users/views.py`)
- Request handlers → Student and study records: reads and writes (evidence: `backend/users/views.py`)
- Partner matching → Student and study records: uses records (evidence: `backend/users/matching.py`)
- Student and study records → PostgreSQL database: persists domain data
- Study API → Study data types: maps study data (evidence: `frontend/src/api/studyBuddy.ts`)
- Auth API → Study data types: uses profile types (evidence: `frontend/src/api/auth.ts`)
