# forif-npo/frontend architecture

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

- Interactive diagram: https://gitdiagram.com/forif-npo/frontend
- Repository: https://github.com/forif-npo/frontend

## Overview

FORIF Frontend is a pnpm monorepo for a member-and-mentor service and an operations-admin service, supported by shared domain/API code and a reusable calendar. The primary user journey represented here is applying to a study; the admin app separately manages club operations, communications, events, and hackathon results. The tree shows additional product areas, but most of their internals were not sampled, so their nodes are grouped by feature and unsupported implementation links are omitted. Edges cite the README or sampled/indexed caller evidence.

Main entry points: [`apps/web/src/features/study/apply/useStudyApplyPage.ts`](https://github.com/forif-npo/frontend/blob/main/apps/web/src/features/study/apply/useStudyApplyPage.ts) (Study application), [`apps/admin/src/lib/calendar-service.ts`](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/lib/calendar-service.ts) (Calendar service), [`apps/admin/src/app/(dashboard)/operators/operators-view.tsx`](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/(dashboard)/operators/operators-view.tsx) (Operator management), [`apps/admin/src/app/api/calendar/events/route.ts`](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/api/calendar/events/route.ts) (Calendar API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Member service"]
  node_members["Members and mentors"]
  node_study_catalog["Study discovery"]
  node_study_apply["Study application"]
  node_study_create["Study creation"]
  node_my_page["Member dashboard"]
  node_products["Product applications"]
  node_hackathon["Hackathon participation"]
  node_public_info["Club and support info"]
  node_web_entry["Web experience"]
end

subgraph group_admin["Operations admin"]
  node_admin_entry["Admin dashboard"]
  node_admin_ops["Operator management<br/>[operators-view.tsx]"]
  node_admin_members["Member management"]
  node_admin_studies["Study operations"]
  node_admin_hackathon["Hackathon operations"]
  node_results["Results presentation"]
  node_sms["SMS and AlimTalk"]
  node_admin_comms["Announcements and FAQs<br/>[page.tsx]"]
  node_admin_others["Dues, certificates, products"]
end

subgraph group_shared["Shared runtime"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_api_client["Authenticated API client<br/>[api-client.ts]"]
  node_domain["Shared domain contracts"]
end

subgraph group_calendar["Calendar"]
  node_calendar_routes["Calendar API routes<br/>[route.ts]"]
  node_calendar_service["Calendar service"]
end

node_google_calendar["Google Calendar"]
node_operator_actor(("Club operator"))
node_member_actor(("Member or mentor"))

node_member_actor -->|"uses service"| node_web_entry
node_operator_actor -->|"uses service"| node_admin_entry
node_study_apply -->|"submits application"| node_study_apply
node_study_apply -->|"posts application"| node_api_client
node_study_apply -->|"loads application data"| node_study_apply
node_admin_entry -->|"renders view"| node_admin_ops
node_admin_ops -->|"uses operator API"| node_admin_ops
node_calendar_routes -->|"calls service"| node_calendar_service
node_calendar_service -->|"reads and writes"| node_google_calendar
node_calendar_routes -->|"updates events"| node_calendar_service
node_calendar_service -->|"uses event types"| node_domain
node_api_client -.-> node_google_calendar

click node_members "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/auth"
click node_study_catalog "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/study"
click node_study_apply "https://github.com/forif-npo/frontend/blob/main/apps/web/src/features/study/apply/useStudyApplyPage.ts"
click node_study_create "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/study/create"
click node_my_page "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/my-page"
click node_products "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/products"
click node_hackathon "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/hackathon"
click node_public_info "https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/support"
click node_web_entry "https://github.com/forif-npo/frontend/tree/main/apps/web/src/app"
click node_admin_entry "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)"
click node_admin_ops "https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/(dashboard)/operators/operators-view.tsx"
click node_admin_members "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)/members"
click node_admin_studies "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/studies"
click node_admin_hackathon "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/hackathon"
click node_results "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/hackathon-results"
click node_sms "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/sms"
click node_admin_comms "https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/(dashboard)/announcements/page.tsx"
click node_admin_others "https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)"
click node_auth "https://github.com/forif-npo/frontend/blob/main/packages/core/src/schemas/auth.ts"
click node_api_client "https://github.com/forif-npo/frontend/blob/main/packages/core/src/utils/api-client.ts"
click node_domain "https://github.com/forif-npo/frontend/tree/main/packages/core/src"
click node_calendar_routes "https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/api/calendar/events/route.ts"
click node_calendar_service "https://github.com/forif-npo/frontend/blob/main/apps/admin/src/lib/calendar-service.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_members,node_study_catalog,node_study_apply,node_study_create,node_my_page,node_products,node_hackathon,node_public_info,node_web_entry toneBlue
class node_admin_entry,node_admin_ops,node_admin_members,node_admin_studies,node_admin_hackathon,node_results,node_sms,node_admin_comms,node_admin_others toneAmber
class node_auth,node_api_client,node_domain toneMint
class node_calendar_routes,node_calendar_service toneRose
class node_google_calendar,node_operator_actor,node_member_actor toneIndigo
```

## Components

### Member service

- [Members and mentors](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/auth): `apps/web/src/features/auth`
- [Study discovery](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/study): `apps/web/src/features/study`
- [Study application](https://github.com/forif-npo/frontend/blob/main/apps/web/src/features/study/apply/useStudyApplyPage.ts): `apps/web/src/features/study/apply/useStudyApplyPage.ts`
- [Study creation](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/study/create): `apps/web/src/features/study/create`
- [Member dashboard](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/my-page): `apps/web/src/features/my-page`
- [Product applications](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/products): `apps/web/src/features/products`
- [Hackathon participation](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/hackathon): `apps/web/src/features/hackathon`
- [Club and support info](https://github.com/forif-npo/frontend/tree/main/apps/web/src/features/support): `apps/web/src/features/support`
- [Web experience](https://github.com/forif-npo/frontend/tree/main/apps/web/src/app): `apps/web/src/app`

### Operations admin

- [Admin dashboard](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)): `apps/admin/src/app/(dashboard)`
- [Operator management](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/(dashboard)/operators/operators-view.tsx): `apps/admin/src/app/(dashboard)/operators/operators-view.tsx`
- [Member management](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)/members): `apps/admin/src/app/(dashboard)/members`
- [Study operations](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/studies): `apps/admin/src/features/studies`
- [Hackathon operations](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/hackathon): `apps/admin/src/features/hackathon`
- [Results presentation](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/hackathon-results): `apps/admin/src/features/hackathon-results`
- [SMS and AlimTalk](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/features/sms): `apps/admin/src/features/sms`
- [Announcements and FAQs](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/(dashboard)/announcements/page.tsx): `apps/admin/src/app/(dashboard)/announcements/page.tsx`
- [Dues, certificates, products](https://github.com/forif-npo/frontend/tree/main/apps/admin/src/app/(dashboard)): `apps/admin/src/app/(dashboard)`

### Shared runtime

- [Authentication](https://github.com/forif-npo/frontend/blob/main/packages/core/src/schemas/auth.ts): `packages/core/src/schemas/auth.ts`
- [Authenticated API client](https://github.com/forif-npo/frontend/blob/main/packages/core/src/utils/api-client.ts): `packages/core/src/utils/api-client.ts`
- [Shared domain contracts](https://github.com/forif-npo/frontend/tree/main/packages/core/src): `packages/core/src`

### Calendar

- [Calendar API routes](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/app/api/calendar/events/route.ts): `apps/admin/src/app/api/calendar/events/route.ts`
- [Calendar service](https://github.com/forif-npo/frontend/blob/main/apps/admin/src/lib/calendar-service.ts): `apps/admin/src/lib/calendar-service.ts`

### Other components

- **Google Calendar**
- **Club operator**
- **Member or mentor**

## Connections

- Member or mentor → Web experience: uses service (evidence: `README.md`)
- Club operator → Admin dashboard: uses service (evidence: `README.md`)
- Study application → Study application: submits application (evidence: `apps/web/src/features/study/apply/useStudyApplyPage.ts`)
- Study application → Authenticated API client: posts application (evidence: `apps/web/src/features/study/apply/useStudyApplyPage.ts`)
- Study application → Study application: loads application data (evidence: `apps/web/src/features/study/apply/useStudyApplyPage.ts`)
- Admin dashboard → Operator management: renders view (evidence: `apps/admin/src/app/(dashboard)/operators/page.tsx`)
- Operator management → Operator management: uses operator API (evidence: `apps/admin/src/app/(dashboard)/operators/page.tsx`)
- Calendar API routes → Calendar service: calls service (evidence: `apps/admin/src/app/api/calendar/events/route.ts`)
- Calendar service → Google Calendar: reads and writes (evidence: `apps/admin/src/lib/calendar-service.ts`)
- Calendar API routes → Calendar service: updates events
- Calendar service → Shared domain contracts: uses event types (evidence: `apps/admin/src/lib/calendar-service.ts`)
- Authenticated API client → Google Calendar
