# ahin99/easy-mannam architecture

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

- Interactive diagram: https://gitdiagram.com/ahin99/easy-mannam
- Repository: https://github.com/ahin99/easy-mannam

## Overview

모일날은 로그인 없이 이름으로 참여해 가능한 날짜를 모으고 최적의 모임 날짜를 찾는 웹앱입니다. 주요 흐름은 모임 생성, 참여 코드로 접속, 날짜 투표 및 수정, 결과와 미투표 인원 확인입니다. 생성·투표 API는 입력을 검증하고 Supabase에 저장하며, 결과 서비스는 투표 자료를 집계해 결과 화면에 제공합니다. README의 기능을 반영했으며, 일부 UI·스키마 구현은 발췌되지 않아 문서와 SOURCE INDEX에서 확인되는 연결만 표시했습니다.

Main entry points: [`app/api/meetings/[code]/votes/route.ts`](https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/votes/route.ts) (투표 저장 API), [`lib/results.ts`](https://github.com/ahin99/easy-mannam/blob/main/lib/results.ts) (결과 집계), [`lib/meetings.ts`](https://github.com/ahin99/easy-mannam/blob/main/lib/meetings.ts) (모임 조회 서비스), [`app/m/[code]/page.tsx`](https://github.com/ahin99/easy-mannam/blob/main/app/m/%5Bcode%5D/page.tsx) (투표 페이지)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["참여 진입"]
  node_home["홈<br/>[page.tsx]"]
  node_create_page["생성 페이지<br/>[page.tsx]"]
  node_create_form["모임 생성 폼"]
  node_join_page["참여 코드 페이지<br/>[page.tsx]"]
  node_join_form["참여 코드 폼<br/>[join-code-form.tsx]"]
end

subgraph group_voting["모임 투표"]
  node_vote_page["투표 페이지<br/>[page.tsx]"]
  node_calendar["날짜 선택·수정"]
end

subgraph group_backend["API 및 데이터"]
  node_create_api["모임 생성 API<br/>[route.ts]"]
  node_meeting_validation["모임 입력 검증<br/>[meeting.ts]"]
  node_meeting_api["모임 조회 API<br/>[route.ts]"]
  node_vote_api["투표 저장 API<br/>[route.ts]"]
  node_vote_validation["투표 입력 검증<br/>[vote.ts]"]
  node_date_tools["날짜 도구<br/>[date.ts]"]
  node_meeting_service["모임 조회 서비스<br/>[meetings.ts]"]
  node_supabase_client["Supabase 클라이언트<br/>[server.ts]"]
  node_database[("Supabase 데이터베이스<br/>[schema.sql]")]
end

subgraph group_results["결과 집계"]
  node_results_page["결과 페이지<br/>[page.tsx]"]
  node_results_api["결과 조회 API<br/>[route.ts]"]
  node_results_service["결과 집계<br/>[results.ts]"]
  node_ranking["최적 날짜 순위<br/>[result-ranking.tsx]"]
  node_vote_summary["투표 요약표"]
end

node_visitor(("참여자"))

node_visitor -->|"opens"| node_home
node_visitor -->|"creates meeting"| node_create_page
node_create_page -->|"renders"| node_create_form
node_create_form -.->|"submits"| node_create_api
node_create_api -->|"validates with"| node_meeting_validation
node_create_api -->|"creates client"| node_supabase_client
node_create_api -->|"inserts meeting"| node_database
node_visitor -->|"enters code"| node_join_page
node_join_page -->|"renders"| node_join_form
node_join_form -.->|"opens meeting"| node_vote_page
node_vote_page -->|"loads meeting"| node_meeting_service
node_vote_page -->|"formats dates"| node_date_tools
node_vote_page -->|"renders"| node_calendar
node_calendar -->|"enumerates dates"| node_date_tools
node_calendar -->|"submits vote"| node_vote_api
node_vote_api -->|"loads meeting"| node_meeting_service
node_vote_api -->|"checks date range"| node_date_tools
node_vote_api -->|"validates with"| node_vote_validation
node_vote_api -->|"creates client"| node_supabase_client
node_vote_api -->|"upserts participant, saves dates"| node_database
node_meeting_api -->|"loads meeting"| node_meeting_service
node_meeting_service -->|"creates client"| node_supabase_client
node_meeting_service -->|"reads meeting"| node_database
node_results_page -->|"loads results"| node_results_service
node_results_page -->|"renders"| node_ranking
node_results_page -->|"renders"| node_vote_summary
node_results_api -->|"gets results"| node_results_service
node_results_service -->|"loads meeting"| node_meeting_service
node_results_service -->|"enumerates and formats"| node_date_tools
node_results_service -->|"creates client"| node_supabase_client
node_results_service -->|"reads participants and dates"| node_database

click node_home "https://github.com/ahin99/easy-mannam/blob/main/app/page.tsx"
click node_create_page "https://github.com/ahin99/easy-mannam/blob/main/app/create/page.tsx"
click node_create_form "https://github.com/ahin99/easy-mannam/blob/main/components/meeting-create-form.tsx"
click node_join_page "https://github.com/ahin99/easy-mannam/blob/main/app/join/page.tsx"
click node_join_form "https://github.com/ahin99/easy-mannam/blob/main/components/join-code-form.tsx"
click node_create_api "https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/route.ts"
click node_meeting_validation "https://github.com/ahin99/easy-mannam/blob/main/lib/validations/meeting.ts"
click node_vote_page "https://github.com/ahin99/easy-mannam/blob/main/app/m/%5Bcode%5D/page.tsx"
click node_calendar "https://github.com/ahin99/easy-mannam/blob/main/components/availability-calendar.tsx"
click node_meeting_api "https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/route.ts"
click node_vote_api "https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/votes/route.ts"
click node_vote_validation "https://github.com/ahin99/easy-mannam/blob/main/lib/validations/vote.ts"
click node_date_tools "https://github.com/ahin99/easy-mannam/blob/main/lib/date.ts"
click node_meeting_service "https://github.com/ahin99/easy-mannam/blob/main/lib/meetings.ts"
click node_supabase_client "https://github.com/ahin99/easy-mannam/blob/main/lib/supabase/server.ts"
click node_database "https://github.com/ahin99/easy-mannam/blob/main/supabase/schema.sql"
click node_results_page "https://github.com/ahin99/easy-mannam/blob/main/app/m/%5Bcode%5D/results/page.tsx"
click node_results_api "https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/results/route.ts"
click node_results_service "https://github.com/ahin99/easy-mannam/blob/main/lib/results.ts"
click node_ranking "https://github.com/ahin99/easy-mannam/blob/main/components/result-ranking.tsx"
click node_vote_summary "https://github.com/ahin99/easy-mannam/blob/main/components/vote-summary-table.tsx"

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_home,node_create_page,node_create_form,node_join_page,node_join_form toneBlue
class node_vote_page,node_calendar toneAmber
class node_create_api,node_meeting_validation,node_meeting_api,node_vote_api,node_vote_validation,node_date_tools,node_meeting_service,node_supabase_client,node_database toneMint
class node_results_page,node_results_api,node_results_service,node_ranking,node_vote_summary toneRose
class node_visitor toneIndigo
```

## Components

### 참여 진입

- [홈](https://github.com/ahin99/easy-mannam/blob/main/app/page.tsx): `app/page.tsx`
- [생성 페이지](https://github.com/ahin99/easy-mannam/blob/main/app/create/page.tsx): `app/create/page.tsx`
- [모임 생성 폼](https://github.com/ahin99/easy-mannam/blob/main/components/meeting-create-form.tsx): `components/meeting-create-form.tsx`
- [참여 코드 페이지](https://github.com/ahin99/easy-mannam/blob/main/app/join/page.tsx): `app/join/page.tsx`
- [참여 코드 폼](https://github.com/ahin99/easy-mannam/blob/main/components/join-code-form.tsx): `components/join-code-form.tsx`

### 모임 투표

- [투표 페이지](https://github.com/ahin99/easy-mannam/blob/main/app/m/%5Bcode%5D/page.tsx): `app/m/[code]/page.tsx`
- [날짜 선택·수정](https://github.com/ahin99/easy-mannam/blob/main/components/availability-calendar.tsx): `components/availability-calendar.tsx`

### API 및 데이터

- [모임 생성 API](https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/route.ts): `app/api/meetings/route.ts`
- [모임 입력 검증](https://github.com/ahin99/easy-mannam/blob/main/lib/validations/meeting.ts): `lib/validations/meeting.ts`
- [모임 조회 API](https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/route.ts): `app/api/meetings/[code]/route.ts`
- [투표 저장 API](https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/votes/route.ts): `app/api/meetings/[code]/votes/route.ts`
- [투표 입력 검증](https://github.com/ahin99/easy-mannam/blob/main/lib/validations/vote.ts): `lib/validations/vote.ts`
- [날짜 도구](https://github.com/ahin99/easy-mannam/blob/main/lib/date.ts): `lib/date.ts`
- [모임 조회 서비스](https://github.com/ahin99/easy-mannam/blob/main/lib/meetings.ts): `lib/meetings.ts`
- [Supabase 클라이언트](https://github.com/ahin99/easy-mannam/blob/main/lib/supabase/server.ts): `lib/supabase/server.ts`
- [Supabase 데이터베이스](https://github.com/ahin99/easy-mannam/blob/main/supabase/schema.sql): `supabase/schema.sql`

### 결과 집계

- [결과 페이지](https://github.com/ahin99/easy-mannam/blob/main/app/m/%5Bcode%5D/results/page.tsx): `app/m/[code]/results/page.tsx`
- [결과 조회 API](https://github.com/ahin99/easy-mannam/blob/main/app/api/meetings/%5Bcode%5D/results/route.ts): `app/api/meetings/[code]/results/route.ts`
- [결과 집계](https://github.com/ahin99/easy-mannam/blob/main/lib/results.ts): `lib/results.ts`
- [최적 날짜 순위](https://github.com/ahin99/easy-mannam/blob/main/components/result-ranking.tsx): `components/result-ranking.tsx`
- [투표 요약표](https://github.com/ahin99/easy-mannam/blob/main/components/vote-summary-table.tsx): `components/vote-summary-table.tsx`

### Other components

- **참여자**

## Connections

- 참여자 → 홈: opens (evidence: `README.md`)
- 참여자 → 생성 페이지: creates meeting (evidence: `README.md`)
- 생성 페이지 → 모임 생성 폼: renders (evidence: `app/create/page.tsx`)
- 모임 생성 폼 → 모임 생성 API: submits
- 모임 생성 API → 모임 입력 검증: validates with (evidence: `app/api/meetings/route.ts`)
- 모임 생성 API → Supabase 클라이언트: creates client (evidence: `app/api/meetings/route.ts`)
- 모임 생성 API → Supabase 데이터베이스: inserts meeting (evidence: `app/api/meetings/route.ts`)
- 참여자 → 참여 코드 페이지: enters code (evidence: `README.md`)
- 참여 코드 페이지 → 참여 코드 폼: renders (evidence: `app/join/page.tsx`)
- 참여 코드 폼 → 투표 페이지: opens meeting
- 투표 페이지 → 모임 조회 서비스: loads meeting (evidence: `app/m/[code]/page.tsx`)
- 투표 페이지 → 날짜 도구: formats dates (evidence: `app/m/[code]/page.tsx`)
- 투표 페이지 → 날짜 선택·수정: renders (evidence: `app/m/[code]/page.tsx`)
- 날짜 선택·수정 → 날짜 도구: enumerates dates (evidence: `components/availability-calendar.tsx`)
- 날짜 선택·수정 → 투표 저장 API: submits vote (evidence: `components/availability-calendar.tsx`)
- 투표 저장 API → 모임 조회 서비스: loads meeting (evidence: `app/api/meetings/[code]/votes/route.ts`)
- 투표 저장 API → 날짜 도구: checks date range (evidence: `app/api/meetings/[code]/votes/route.ts`)
- 투표 저장 API → 투표 입력 검증: validates with (evidence: `app/api/meetings/[code]/votes/route.ts`)
- 투표 저장 API → Supabase 클라이언트: creates client (evidence: `app/api/meetings/[code]/votes/route.ts`)
- 투표 저장 API → Supabase 데이터베이스: upserts participant, saves dates (evidence: `app/api/meetings/[code]/votes/route.ts`)
- 모임 조회 API → 모임 조회 서비스: loads meeting (evidence: `app/api/meetings/[code]/route.ts`)
- 모임 조회 서비스 → Supabase 클라이언트: creates client (evidence: `lib/meetings.ts`)
- 모임 조회 서비스 → Supabase 데이터베이스: reads meeting (evidence: `lib/meetings.ts`)
- 결과 페이지 → 결과 집계: loads results (evidence: `app/m/[code]/results/page.tsx`)
- 결과 페이지 → 최적 날짜 순위: renders (evidence: `app/m/[code]/results/page.tsx`)
- 결과 페이지 → 투표 요약표: renders (evidence: `app/m/[code]/results/page.tsx`)
- 결과 조회 API → 결과 집계: gets results (evidence: `app/api/meetings/[code]/results/route.ts`)
- 결과 집계 → 모임 조회 서비스: loads meeting (evidence: `lib/results.ts`)
- 결과 집계 → 날짜 도구: enumerates and formats (evidence: `lib/results.ts`)
- 결과 집계 → Supabase 클라이언트: creates client (evidence: `lib/results.ts`)
- 결과 집계 → Supabase 데이터베이스: reads participants and dates (evidence: `lib/results.ts`)
