# 250158hj-maker/yse_compass architecture

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

- Interactive diagram: https://gitdiagram.com/250158hj-maker/yse_compass
- Repository: https://github.com/250158hj-maker/yse_compass

## Overview

YSE Compass is a graduation-project presentation operations platform. Its main workflow gives students and teachers a home view of teams and submission status, supports material and summary submissions, and helps organizers manage presentation events and their timetable; completed events can be archived. Authentication and shared data access form the internal foundation. The graph preserves the major product areas visible in the tree, but several domain links are omitted because their implementations were not excerpted; those paths are represented at their existing directory level.

Main entry points: [`src/lib/data`](https://github.com/250158hj-maker/yse_compass/tree/main/src/lib/data) (Domain data access), [`src/app/(real)/page.tsx`](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/page.tsx) (Home dashboard), [`src/lib/prisma.ts`](https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/prisma.ts) (Prisma client), [`src/auth.ts`](https://github.com/250158hj-maker/yse_compass/blob/main/src/auth.ts) (Authentication config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_login["Sign-in page<br/>[page.tsx]"]
  node_auth["Authentication config<br/>[auth.ts]"]
  node_session["Session access<br/>[session.ts]"]
  node_teacher_admin["Teacher roster<br/>[RosterClient.tsx]"]
end

subgraph group_operations["Event operations"]
  node_home["Home dashboard<br/>[page.tsx]"]
  node_event_pages["Event management"]
  node_team_pages["Team management"]
  node_year_admin["Year administration"]
  node_timetable["Presentation timetable"]
  node_archive["Event archive"]
end

subgraph group_submissions["Submissions and summaries"]
  node_submission_pages["Material submissions"]
  node_submission_status["Submission status<br/>[page.tsx]"]
  node_summary_pages["Team summaries"]
  node_comments["Comments and likes<br/>[comments.ts]"]
  node_booklet["Summary booklet<br/>[route.ts]"]
  node_pdf["PDF generation"]
end

subgraph group_foundation["Data and presentation"]
  node_actions["Server actions"]
  node_data["Domain data access"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
end

node_users(("School users"))
node_postgres[("PostgreSQL")]
node_google["Google sign-in"]

node_users -->|"opens"| node_home
node_home -->|"requires session"| node_session
node_home -->|"loads dashboard data"| node_data
node_home -->|"links to teams"| node_team_pages
node_home -->|"links to events"| node_event_pages
node_home -->|"links to years"| node_year_admin
node_data -->|"uses client"| node_prisma
node_event_pages -->|"checks session"| node_session
node_event_pages -->|"loads event data"| node_data
node_team_pages -->|"loads teams"| node_data
node_team_pages -->|"uses client"| node_prisma
node_timetable -.->|"saves timetable"| node_actions
node_submission_pages -.->|"submits materials"| node_actions
node_summary_pages -.->|"saves summary"| node_actions
node_submission_status -.->|"reads status"| node_data
node_comments -.->|"stores discussion"| node_data
node_archive -.->|"loads archive"| node_data
node_booklet -->|"checks access"| node_auth
node_booklet -->|"loads booklet data"| node_data
node_pdf -->|"loads summaries"| node_data
node_data -->|"connects to database"| node_prisma
node_prisma -->|"connects"| node_postgres
node_login -.->|"offers sign-in"| node_google
node_auth -->|"configures provider"| node_google
node_auth -->|"configures callbacks"| node_prisma
node_session -->|"reads session"| node_auth
node_teacher_admin -->|"invokes roster actions"| node_actions

click node_home "https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/page.tsx"
click node_event_pages "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements"
click node_team_pages "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/teams"
click node_year_admin "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/admin/years"
click node_timetable "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/timetable"
click node_archive "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(mock)/archive"
click node_submission_pages "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/teams/%5BteamId%5D/submit"
click node_submission_status "https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/announcements/%5BannouncementId%5D/submissions/page.tsx"
click node_summary_pages "https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/teams/%5BteamId%5D/summary"
click node_comments "https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/data/comments.ts"
click node_booklet "https://github.com/250158hj-maker/yse_compass/blob/main/src/app/api/summary-booklet/%5BoccasionId%5D/route.ts"
click node_pdf "https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/pdf/summary-booklet.tsx"
click node_login "https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(auth)/login/page.tsx"
click node_auth "https://github.com/250158hj-maker/yse_compass/blob/main/src/auth.ts"
click node_session "https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/auth/session.ts"
click node_teacher_admin "https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/admin/users/RosterClient.tsx"
click node_actions "https://github.com/250158hj-maker/yse_compass/tree/main/src/lib/actions"
click node_data "https://github.com/250158hj-maker/yse_compass/tree/main/src/lib/data"
click node_prisma "https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/prisma.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_login,node_auth,node_session,node_teacher_admin,node_users toneBlue
class node_home,node_event_pages,node_team_pages,node_year_admin,node_timetable,node_archive,node_postgres toneAmber
class node_submission_pages,node_submission_status,node_summary_pages,node_comments,node_booklet,node_pdf toneMint
class node_actions,node_data,node_prisma toneRose
class node_google toneIndigo
```

## Components

### Access and identity

- [Sign-in page](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Authentication config](https://github.com/250158hj-maker/yse_compass/blob/main/src/auth.ts): `src/auth.ts`
- [Session access](https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/auth/session.ts): `src/lib/auth/session.ts`
- [Teacher roster](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/admin/users/RosterClient.tsx): `src/app/(real)/admin/users/RosterClient.tsx`

### Event operations

- [Home dashboard](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/page.tsx): `src/app/(real)/page.tsx`
- [Event management](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements): `src/app/(real)/announcements`
- [Team management](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/teams): `src/app/(real)/teams`
- [Year administration](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/admin/years): `src/app/(real)/admin/years`
- [Presentation timetable](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/timetable): `src/app/(real)/announcements/[announcementId]/timetable`
- [Event archive](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(mock)/archive): `src/app/(mock)/archive`

### Submissions and summaries

- [Material submissions](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/teams/%5BteamId%5D/submit): `src/app/(real)/announcements/[announcementId]/teams/[teamId]/submit`
- [Submission status](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/(real)/announcements/%5BannouncementId%5D/submissions/page.tsx): `src/app/(real)/announcements/[announcementId]/submissions/page.tsx`
- [Team summaries](https://github.com/250158hj-maker/yse_compass/tree/main/src/app/(real)/announcements/%5BannouncementId%5D/teams/%5BteamId%5D/summary): `src/app/(real)/announcements/[announcementId]/teams/[teamId]/summary`
- [Comments and likes](https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/data/comments.ts): `src/lib/data/comments.ts`
- [Summary booklet](https://github.com/250158hj-maker/yse_compass/blob/main/src/app/api/summary-booklet/%5BoccasionId%5D/route.ts): `src/app/api/summary-booklet/[occasionId]/route.ts`
- [PDF generation](https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/pdf/summary-booklet.tsx): `src/lib/pdf/summary-booklet.tsx`

### Data and presentation

- [Server actions](https://github.com/250158hj-maker/yse_compass/tree/main/src/lib/actions): `src/lib/actions`
- [Domain data access](https://github.com/250158hj-maker/yse_compass/tree/main/src/lib/data): `src/lib/data`
- [Prisma client](https://github.com/250158hj-maker/yse_compass/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`

### Other components

- **School users**
- **PostgreSQL**
- **Google sign-in**

## Connections

- School users → Home dashboard: opens (evidence: `src/app/(real)/page.tsx`)
- Home dashboard → Session access: requires session (evidence: `src/app/(real)/page.tsx`)
- Home dashboard → Domain data access: loads dashboard data (evidence: `src/app/(real)/page.tsx`)
- Home dashboard → Team management: links to teams (evidence: `src/app/(real)/page.tsx`)
- Home dashboard → Event management: links to events (evidence: `src/app/(real)/page.tsx`)
- Home dashboard → Year administration: links to years (evidence: `src/app/(real)/page.tsx`)
- Domain data access → Prisma client: uses client (evidence: `src/app/(real)/announcements/[announcementId]/page.tsx`)
- Event management → Session access: checks session (evidence: `src/app/(real)/announcements/[announcementId]/page.tsx`)
- Event management → Domain data access: loads event data (evidence: `src/app/(real)/announcements/[announcementId]/page.tsx`)
- Team management → Domain data access: loads teams (evidence: `src/app/(real)/teams/page.tsx`)
- Team management → Prisma client: uses client (evidence: `src/app/(real)/teams/page.tsx`)
- Presentation timetable → Server actions: saves timetable
- Material submissions → Server actions: submits materials
- Team summaries → Server actions: saves summary
- Submission status → Domain data access: reads status
- Comments and likes → Domain data access: stores discussion
- Event archive → Domain data access: loads archive
- Summary booklet → Authentication config: checks access (evidence: `src/app/api/summary-booklet/[occasionId]/route.ts`)
- Summary booklet → Domain data access: loads booklet data (evidence: `src/app/api/summary-booklet/[occasionId]/route.ts`)
- PDF generation → Domain data access: loads summaries (evidence: `src/lib/pdf/summary-booklet.tsx`)
- Domain data access → Prisma client: connects to database (evidence: `src/lib/prisma.ts`)
- Prisma client → PostgreSQL: connects (evidence: `src/lib/prisma.ts`)
- Sign-in page → Google sign-in: offers sign-in
- Authentication config → Google sign-in: configures provider (evidence: `src/auth.ts`)
- Authentication config → Prisma client: configures callbacks (evidence: `src/auth.ts`)
- Session access → Authentication config: reads session (evidence: `src/lib/auth/session.ts`)
- Teacher roster → Server actions: invokes roster actions (evidence: `src/app/(real)/admin/users/RosterClient.tsx`)
