# parth-access/psysphere architecture

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

- Interactive diagram: https://gitdiagram.com/parth-access/psysphere
- Repository: https://github.com/parth-access/psysphere

## Overview

Saarthi Classes is a psychology coaching website and class dashboard. Its principal path is public course/workshop discovery, followed by workshop registration or direct batch enrollment; approval-mode requests await admin review, payment triggers student account provisioning and email, and students then use the dashboard for classes and coursework. The graph also preserves attendance, materials, quizzes, recordings, reporting, and Google/Razorpay integrations. Sampled source verifies selected calls; README statements support the documented enrollment flow, while unsampled subsystem links are omitted where wiring is not shown.

Main entry points: [`src/domains/joining/service.ts`](https://github.com/parth-access/psysphere/blob/main/src/domains/joining/service.ts) (Batch enrollment), [`app/dashboard/student/page.tsx`](https://github.com/parth-access/psysphere/blob/main/app/dashboard/student/page.tsx) (Student dashboard), [`app/dashboard/classes`](https://github.com/parth-access/psysphere/tree/main/app/dashboard/classes) (Classes and assignments), [`app/page.tsx`](https://github.com/parth-access/psysphere/blob/main/app/page.tsx) (Marketing pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public discovery"]
  node_marketing["Marketing pages<br/>[page.tsx]"]
  node_workshops["Workshop registration"]
end

subgraph group_enroll["Enrollment and payments"]
  node_join["Batch enrollment<br/>[service.ts]"]
  node_joinui["Enrollment interface<br/>[page.tsx]"]
  node_adminrequests["Request approval"]
  node_payments["Razorpay payments<br/>[razorpay.ts]"]
  node_onboarding["Student onboarding<br/>[service.ts]"]
end

subgraph group_learning["Learning dashboard"]
  node_studentdash["Student dashboard<br/>[page.tsx]"]
  node_teacheradmin["Teacher and admin dashboards"]
  node_academic["Classes and assignments"]
  node_quizzes["Quizzes and tests<br/>[service.ts]"]
  node_attendance["Attendance tracking<br/>[meetSync.ts]"]
  node_materials["Study materials<br/>[storage.ts]"]
  node_recordings["Class recordings<br/>[service.ts]"]
  node_reports["Weekly reports<br/>[weekly.ts]"]
end

subgraph group_platform["Identity and platform"]
  node_email["Email notifications<br/>[service.ts]"]
  node_auth["Authentication and roles<br/>[getProfile.ts]"]
  node_profiles[("Profiles and enrollments<br/>[enrollments.ts]")]
  node_db[("Postgres data access<br/>[index.ts]")]
end

node_visitor(("Prospective student"))
node_razorpay{{"Razorpay"}}
node_google{{"Google Calendar and Meet"}}
node_storage[("Supabase file storage")]

node_visitor -->|"browses"| node_marketing
node_visitor -->|"reserves seat"| node_workshops
node_visitor -->|"chooses batch"| node_joinui
node_marketing -->|"links to"| node_workshops
node_joinui -->|"loads options"| node_join
node_join -->|"records request"| node_profiles
node_adminrequests -->|"approves request"| node_join
node_join -->|"creates order"| node_payments
node_payments -->|"creates payment"| node_razorpay
node_razorpay -->|"confirms payment"| node_join
node_join -->|"provisions student"| node_onboarding
node_join -->|"sends notices"| node_email
node_studentdash -->|"checks role"| node_auth
node_auth -->|"loads profile"| node_db
node_studentdash -->|"reads learning data"| node_db
node_studentdash -->|"loads live quizzes"| node_quizzes
node_studentdash -.->|"shows coursework"| node_academic
node_teacheradmin -.->|"manages classes"| node_academic
node_attendance -.->|"syncs Meet attendance"| node_google
node_materials -->|"stores files"| node_storage
node_recordings -.->|"stores recordings"| node_storage
node_reports -.->|"sends reports"| node_email
node_academic -.->|"uses enrollment data"| node_profiles

click node_marketing "https://github.com/parth-access/psysphere/blob/main/app/page.tsx"
click node_workshops "https://github.com/parth-access/psysphere/tree/main/app/workshops"
click node_join "https://github.com/parth-access/psysphere/blob/main/src/domains/joining/service.ts"
click node_joinui "https://github.com/parth-access/psysphere/blob/main/app/join/page.tsx"
click node_adminrequests "https://github.com/parth-access/psysphere/tree/main/app/dashboard/join-requests"
click node_payments "https://github.com/parth-access/psysphere/blob/main/server/integrations/razorpay.ts"
click node_onboarding "https://github.com/parth-access/psysphere/blob/main/src/domains/onboarding/service.ts"
click node_email "https://github.com/parth-access/psysphere/blob/main/src/domains/email/service.ts"
click node_studentdash "https://github.com/parth-access/psysphere/blob/main/app/dashboard/student/page.tsx"
click node_teacheradmin "https://github.com/parth-access/psysphere/tree/main/app/dashboard"
click node_academic "https://github.com/parth-access/psysphere/tree/main/app/dashboard/classes"
click node_quizzes "https://github.com/parth-access/psysphere/blob/main/src/domains/quizzes/service.ts"
click node_attendance "https://github.com/parth-access/psysphere/blob/main/src/domains/attendance/meetSync.ts"
click node_materials "https://github.com/parth-access/psysphere/blob/main/src/domains/materials/storage.ts"
click node_recordings "https://github.com/parth-access/psysphere/blob/main/src/domains/recordings/service.ts"
click node_reports "https://github.com/parth-access/psysphere/blob/main/src/domains/reports/weekly.ts"
click node_auth "https://github.com/parth-access/psysphere/blob/main/server/authorization/getProfile.ts"
click node_profiles "https://github.com/parth-access/psysphere/blob/main/db/schema/core/enrollments.ts"
click node_db "https://github.com/parth-access/psysphere/blob/main/db/index.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_marketing,node_workshops toneBlue
class node_join,node_joinui,node_adminrequests,node_payments,node_onboarding,node_storage toneAmber
class node_studentdash,node_teacheradmin,node_academic,node_quizzes,node_attendance,node_materials,node_recordings,node_reports toneMint
class node_email,node_auth,node_profiles,node_db toneRose
class node_visitor,node_razorpay,node_google toneIndigo
```

## Components

### Public discovery

- [Marketing pages](https://github.com/parth-access/psysphere/blob/main/app/page.tsx): `app/page.tsx`
- [Workshop registration](https://github.com/parth-access/psysphere/tree/main/app/workshops): `app/workshops`

### Enrollment and payments

- [Batch enrollment](https://github.com/parth-access/psysphere/blob/main/src/domains/joining/service.ts): `src/domains/joining/service.ts`
- [Enrollment interface](https://github.com/parth-access/psysphere/blob/main/app/join/page.tsx): `app/join/page.tsx`
- [Request approval](https://github.com/parth-access/psysphere/tree/main/app/dashboard/join-requests): `app/dashboard/join-requests`
- [Razorpay payments](https://github.com/parth-access/psysphere/blob/main/server/integrations/razorpay.ts): `server/integrations/razorpay.ts`
- [Student onboarding](https://github.com/parth-access/psysphere/blob/main/src/domains/onboarding/service.ts): `src/domains/onboarding/service.ts`

### Learning dashboard

- [Student dashboard](https://github.com/parth-access/psysphere/blob/main/app/dashboard/student/page.tsx): `app/dashboard/student/page.tsx`
- [Teacher and admin dashboards](https://github.com/parth-access/psysphere/tree/main/app/dashboard): `app/dashboard`
- [Classes and assignments](https://github.com/parth-access/psysphere/tree/main/app/dashboard/classes): `app/dashboard/classes`
- [Quizzes and tests](https://github.com/parth-access/psysphere/blob/main/src/domains/quizzes/service.ts): `src/domains/quizzes/service.ts`
- [Attendance tracking](https://github.com/parth-access/psysphere/blob/main/src/domains/attendance/meetSync.ts): `src/domains/attendance/meetSync.ts`
- [Study materials](https://github.com/parth-access/psysphere/blob/main/src/domains/materials/storage.ts): `src/domains/materials/storage.ts`
- [Class recordings](https://github.com/parth-access/psysphere/blob/main/src/domains/recordings/service.ts): `src/domains/recordings/service.ts`
- [Weekly reports](https://github.com/parth-access/psysphere/blob/main/src/domains/reports/weekly.ts): `src/domains/reports/weekly.ts`

### Identity and platform

- [Email notifications](https://github.com/parth-access/psysphere/blob/main/src/domains/email/service.ts): `src/domains/email/service.ts`
- [Authentication and roles](https://github.com/parth-access/psysphere/blob/main/server/authorization/getProfile.ts): `server/authorization/getProfile.ts`
- [Profiles and enrollments](https://github.com/parth-access/psysphere/blob/main/db/schema/core/enrollments.ts): `db/schema/core/enrollments.ts`
- [Postgres data access](https://github.com/parth-access/psysphere/blob/main/db/index.ts): `db/index.ts`

### Other components

- **Prospective student**
- **Razorpay**
- **Google Calendar and Meet**
- **Supabase file storage**

## Connections

- Prospective student → Marketing pages: browses (evidence: `README.md`)
- Prospective student → Workshop registration: reserves seat (evidence: `README.md`)
- Prospective student → Enrollment interface: chooses batch (evidence: `README.md`)
- Marketing pages → Workshop registration: links to
- Enrollment interface → Batch enrollment: loads options (evidence: `app/join/page.tsx`)
- Batch enrollment → Profiles and enrollments: records request (evidence: `src/domains/joining/service.ts`)
- Request approval → Batch enrollment: approves request (evidence: `README.md`)
- Batch enrollment → Razorpay payments: creates order (evidence: `src/domains/joining/service.ts`)
- Razorpay payments → Razorpay: creates payment (evidence: `README.md`)
- Razorpay → Batch enrollment: confirms payment
- Batch enrollment → Student onboarding: provisions student (evidence: `src/domains/joining/service.ts`)
- Batch enrollment → Email notifications: sends notices (evidence: `src/domains/joining/service.ts`)
- Student dashboard → Authentication and roles: checks role (evidence: `app/dashboard/student/page.tsx`)
- Authentication and roles → Postgres data access: loads profile (evidence: `server/authorization/getProfile.ts`)
- Student dashboard → Postgres data access: reads learning data (evidence: `app/dashboard/student/page.tsx`)
- Student dashboard → Quizzes and tests: loads live quizzes (evidence: `app/dashboard/student/page.tsx`)
- Student dashboard → Classes and assignments: shows coursework
- Teacher and admin dashboards → Classes and assignments: manages classes
- Attendance tracking → Google Calendar and Meet: syncs Meet attendance
- Study materials → Supabase file storage: stores files (evidence: `src/domains/materials/storage.ts`)
- Class recordings → Supabase file storage: stores recordings
- Weekly reports → Email notifications: sends reports (evidence: `README.md`)
- Classes and assignments → Profiles and enrollments: uses enrollment data
