# birkerochek/diplom architecture

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

- Interactive diagram: https://gitdiagram.com/birkerochek/diplom
- Repository: https://github.com/birkerochek/diplom

## Overview

This is a Next.js volunteer-event platform: people register and sign in, volunteers discover events and manage applications and attendance, organizers create and administer events, and admins review events and manage users. The main runtime path is role-based UI to API routes, then domain services and Prisma-backed data access. The tree and sampled files establish event, dashboard, registration, and volunteer-attendance flows; admin and several client-facing branches are represented from the tree, with their internal links left unverified where source was not sampled.

Main entry points: [`app/api/events`](https://github.com/birkerochek/diplom/tree/main/app/api/events) (Event API routes), [`app/api/volunteer`](https://github.com/birkerochek/diplom/tree/main/app/api/volunteer) (Volunteer API), [`src/2_pages/VolunteerPage`](https://github.com/birkerochek/diplom/tree/main/src/2_pages/VolunteerPage) (Volunteer workspace), [`src/2_pages/OrganizerPage`](https://github.com/birkerochek/diplom/tree/main/src/2_pages/OrganizerPage) (Organizer workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth_ui["Sign-in and signup"]
  node_auth_api["Authentication API"]
  node_auth_service["Registration handler<br/>[route.ts]"]
end

subgraph group_events["Event lifecycle"]
  node_home["Public discovery"]
  node_organizer_ui["Organizer workspace"]
  node_event_api["Event API routes"]
  node_event_services["Event services"]
  node_event_store[("Prisma data access<br/>[prisma.ts]")]
end

subgraph group_volunteer["Volunteer experience"]
  node_volunteer_ui["Volunteer workspace"]
  node_volunteer_api["Volunteer API"]
  node_applications["Applications"]
  node_attendance["Attendance records"]
  node_volunteer_dashboard["Volunteer dashboard"]
end

subgraph group_operations["Platform operations"]
  node_admin_ui["Admin console"]
  node_admin_api["Admin API"]
  node_organizer_dashboard["Organizer dashboards"]
  node_shared_client_api["Client API hooks"]
  node_shared_ui["Shared UI and utilities"]
end

node_people(("People"))

node_people -.->|"registers or signs in"| node_auth_ui
node_people -.->|"discovers events"| node_home
node_people -.->|"organizes events"| node_organizer_ui
node_people -.->|"volunteers"| node_volunteer_ui
node_people -.->|"manages platform"| node_admin_ui
node_auth_ui -.->|"submits credentials"| node_auth_api
node_auth_api -->|"handles registration"| node_auth_service
node_organizer_ui -.->|"manages events"| node_event_api
node_volunteer_ui -.->|"browses and applies"| node_event_api
node_event_api -->|"calls services"| node_event_services
node_event_api -->|"calls detail services"| node_event_services
node_event_services -.->|"reads and writes"| node_event_store
node_admin_ui -.->|"reviews and manages"| node_admin_api
node_admin_api -.->|"moderates events"| node_event_api
node_organizer_dashboard -.->|"queries statistics"| node_event_store
node_volunteer_ui -.->|"loads volunteer data"| node_volunteer_api
node_volunteer_api -.->|"routes applications"| node_applications
node_volunteer_api -->|"routes attendance"| node_attendance
node_volunteer_api -.->|"routes dashboard"| node_volunteer_dashboard
node_volunteer_dashboard -->|"includes attendance stats"| node_attendance
node_attendance -->|"queries completed registrations"| node_event_store
node_shared_client_api -.->|"requests event data"| node_event_api
node_shared_client_api -.->|"requests volunteer data"| node_volunteer_api
node_shared_ui -.->|"supports page interfaces"| node_organizer_ui
node_shared_ui -.->|"supports page interfaces"| node_volunteer_ui

click node_auth_ui "https://github.com/birkerochek/diplom/tree/main/src/2_pages"
click node_auth_api "https://github.com/birkerochek/diplom/tree/main/app/api/auth"
click node_auth_service "https://github.com/birkerochek/diplom/blob/main/app/api/auth/register/route.ts"
click node_home "https://github.com/birkerochek/diplom/tree/main/src/2_pages/HomePage"
click node_organizer_ui "https://github.com/birkerochek/diplom/tree/main/src/2_pages/OrganizerPage"
click node_event_api "https://github.com/birkerochek/diplom/tree/main/app/api/events"
click node_event_services "https://github.com/birkerochek/diplom/tree/main/app/api/events/services"
click node_event_store "https://github.com/birkerochek/diplom/blob/main/src/6_shared/lib/prisma.ts"
click node_admin_ui "https://github.com/birkerochek/diplom/tree/main/src/2_pages/AdminPage"
click node_admin_api "https://github.com/birkerochek/diplom/tree/main/app/api/admin"
click node_organizer_dashboard "https://github.com/birkerochek/diplom/tree/main/app/api/organizer/dashboard"
click node_volunteer_ui "https://github.com/birkerochek/diplom/tree/main/src/2_pages/VolunteerPage"
click node_volunteer_api "https://github.com/birkerochek/diplom/tree/main/app/api/volunteer"
click node_applications "https://github.com/birkerochek/diplom/tree/main/app/api/volunteer/applications"
click node_attendance "https://github.com/birkerochek/diplom/blob/main/app/api/volunteer/attended-events/services/getVolunteerAttendedEvents.ts"
click node_volunteer_dashboard "https://github.com/birkerochek/diplom/tree/main/app/api/volunteer/dashboard"
click node_shared_client_api "https://github.com/birkerochek/diplom/tree/main/src/6_shared/api"
click node_shared_ui "https://github.com/birkerochek/diplom/tree/main/src/6_shared"

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_auth_ui,node_auth_api,node_auth_service toneBlue
class node_home,node_organizer_ui,node_event_api,node_event_services,node_event_store toneAmber
class node_volunteer_ui,node_volunteer_api,node_applications,node_attendance,node_volunteer_dashboard toneMint
class node_admin_ui,node_admin_api,node_organizer_dashboard,node_shared_client_api,node_shared_ui toneRose
class node_people toneIndigo
```

## Components

### Identity and access

- [Sign-in and signup](https://github.com/birkerochek/diplom/tree/main/src/2_pages): `src/2_pages`
- [Authentication API](https://github.com/birkerochek/diplom/tree/main/app/api/auth): `app/api/auth`
- [Registration handler](https://github.com/birkerochek/diplom/blob/main/app/api/auth/register/route.ts): `app/api/auth/register/route.ts`

### Event lifecycle

- [Public discovery](https://github.com/birkerochek/diplom/tree/main/src/2_pages/HomePage): `src/2_pages/HomePage`
- [Organizer workspace](https://github.com/birkerochek/diplom/tree/main/src/2_pages/OrganizerPage): `src/2_pages/OrganizerPage`
- [Event API routes](https://github.com/birkerochek/diplom/tree/main/app/api/events): `app/api/events`
- [Event services](https://github.com/birkerochek/diplom/tree/main/app/api/events/services): `app/api/events/services`
- [Prisma data access](https://github.com/birkerochek/diplom/blob/main/src/6_shared/lib/prisma.ts): `src/6_shared/lib/prisma.ts`

### Volunteer experience

- [Volunteer workspace](https://github.com/birkerochek/diplom/tree/main/src/2_pages/VolunteerPage): `src/2_pages/VolunteerPage`
- [Volunteer API](https://github.com/birkerochek/diplom/tree/main/app/api/volunteer): `app/api/volunteer`
- [Applications](https://github.com/birkerochek/diplom/tree/main/app/api/volunteer/applications): `app/api/volunteer/applications`
- [Attendance records](https://github.com/birkerochek/diplom/blob/main/app/api/volunteer/attended-events/services/getVolunteerAttendedEvents.ts): `app/api/volunteer/attended-events/services/getVolunteerAttendedEvents.ts`
- [Volunteer dashboard](https://github.com/birkerochek/diplom/tree/main/app/api/volunteer/dashboard): `app/api/volunteer/dashboard`

### Platform operations

- [Admin console](https://github.com/birkerochek/diplom/tree/main/src/2_pages/AdminPage): `src/2_pages/AdminPage`
- [Admin API](https://github.com/birkerochek/diplom/tree/main/app/api/admin): `app/api/admin`
- [Organizer dashboards](https://github.com/birkerochek/diplom/tree/main/app/api/organizer/dashboard): `app/api/organizer/dashboard`
- [Client API hooks](https://github.com/birkerochek/diplom/tree/main/src/6_shared/api): `src/6_shared/api`
- [Shared UI and utilities](https://github.com/birkerochek/diplom/tree/main/src/6_shared): `src/6_shared`

### Other components

- **People**

## Connections

- People → Sign-in and signup: registers or signs in
- People → Public discovery: discovers events
- People → Organizer workspace: organizes events
- People → Volunteer workspace: volunteers
- People → Admin console: manages platform
- Sign-in and signup → Authentication API: submits credentials
- Authentication API → Registration handler: handles registration (evidence: `app/api/auth/register/route.ts`)
- Organizer workspace → Event API routes: manages events
- Volunteer workspace → Event API routes: browses and applies
- Event API routes → Event services: calls services (evidence: `app/api/events/route.ts`)
- Event API routes → Event services: calls detail services (evidence: `app/api/events/[eventId]/route.ts`)
- Event services → Prisma data access: reads and writes
- Admin console → Admin API: reviews and manages
- Admin API → Event API routes: moderates events
- Organizer dashboards → Prisma data access: queries statistics
- Volunteer workspace → Volunteer API: loads volunteer data
- Volunteer API → Applications: routes applications (evidence: `app/api/volunteer/applications/route.ts`)
- Volunteer API → Attendance records: routes attendance (evidence: `app/api/volunteer/attended-events/route.ts`)
- Volunteer API → Volunteer dashboard: routes dashboard (evidence: `app/api/volunteer/dashboard/route.ts`)
- Volunteer dashboard → Attendance records: includes attendance stats (evidence: `app/api/volunteer/dashboard/services/getVolunteerDashboardStats.ts`)
- Attendance records → Prisma data access: queries completed registrations (evidence: `app/api/volunteer/attended-events/services/getVolunteerAttendedEvents.ts`)
- Client API hooks → Event API routes: requests event data
- Client API hooks → Volunteer API: requests volunteer data
- Shared UI and utilities → Organizer workspace: supports page interfaces
- Shared UI and utilities → Volunteer workspace: supports page interfaces
