# shinukjin/wp architecture

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

- Interactive diagram: https://gitdiagram.com/shinukjin/wp
- Repository: https://github.com/shinukjin/wp

## Overview

Wedding Project is a wedding-planning web application for couples: users register or log in, then manage shared wedding-preparation tasks, property listings, travel schedules, calendars, budgets, and profile information; administrators review users. The main browser workflow runs through feature pages and components, the Axios client, authenticated API routes, and Prisma-backed data. The README and sampled files establish these capabilities and several internal dependencies; many routes and pages were not sampled, so their detailed links are omitted or marked unverified.

Main entry points: [`lib/api/client.ts`](https://github.com/shinukjin/wp/blob/main/lib/api/client.ts) (HTTP client), [`lib/utils/auth.ts`](https://github.com/shinukjin/wp/blob/main/lib/utils/auth.ts) (Token authentication), [`lib/prisma.ts`](https://github.com/shinukjin/wp/blob/main/lib/prisma.ts) (Prisma access), [`app/api/wedding-prep/route.ts`](https://github.com/shinukjin/wp/blob/main/app/api/wedding-prep/route.ts) (Preparation API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_authpages["Sign-in and registration<br/>[page.tsx]"]
  node_home["Home dashboard<br/>[page.tsx]"]
  node_profilepage["My information<br/>[page.tsx]"]
  node_admin["Admin console<br/>[page.tsx]"]
end

subgraph group_planning["Planning features"]
  node_weddingui["Wedding preparation UI"]
  node_propertyui["Property listings UI"]
  node_scheduleui["Travel schedule UI"]
  node_calendarui["Calendar<br/>[Calendar.tsx]"]
  node_dashboardui["Dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_account["Accounts and sharing"]
  node_profileedit["Profile editor"]
  node_state["Session and user state<br/>[useWeddingStore.ts]"]
end

subgraph group_services["Server services"]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_auth_api["Authentication API<br/>[route.ts]"]
  node_wedding_api["Preparation API<br/>[route.ts]"]
  node_property_api["Property API<br/>[route.ts]"]
  node_travel_api["Travel schedule API<br/>[route.ts]"]
  node_calendar_api["Calendar API<br/>[route.ts]"]
  node_dashboard_api["Dashboard API<br/>[route.ts]"]
  node_user_api["User profile API<br/>[route.ts]"]
  node_connection_api["Connection API<br/>[route.ts]"]
  node_admin_api["Admin user APIs<br/>[route.ts]"]
  node_auth["Token authentication<br/>[auth.ts]"]
  node_jwt["JWT verification<br/>[jwt.ts]"]
  node_sharing["Partner sharing<br/>[connection.ts]"]
  node_etag["Conditional caching<br/>[etag.ts]"]
  node_database_client["Prisma access<br/>[prisma.ts]"]
  node_database[("Application database<br/>[schema.prisma]")]
  node_logger["Application logging<br/>[logger.ts]"]
end

node_visitor(("Couple or admin"))

node_visitor -->|"opens"| node_authpages
node_visitor -.->|"opens"| node_home
node_visitor -.->|"opens"| node_admin
node_authpages -->|"updates session"| node_state
node_authpages -->|"submits credentials"| node_api_client
node_home -->|"renders"| node_dashboardui
node_home -->|"renders"| node_calendarui
node_home -->|"reads state"| node_state
node_dashboardui -->|"requests data"| node_api_client
node_calendarui -->|"requests events"| node_api_client
node_profilepage -->|"renders editor"| node_profileedit
node_profilepage -->|"requests profile"| node_api_client
node_profileedit -->|"updates profile"| node_api_client
node_weddingui -->|"requests tasks"| node_api_client
node_propertyui -->|"requests listings"| node_api_client
node_propertyui -->|"reads state"| node_state
node_scheduleui -->|"requests schedule"| node_api_client
node_scheduleui -->|"reads state"| node_state
node_api_client -.->|"sends requests"| node_auth_api
node_api_client -.->|"sends requests"| node_wedding_api
node_api_client -.->|"sends requests"| node_property_api
node_api_client -.->|"sends requests"| node_travel_api
node_api_client -.->|"sends requests"| node_calendar_api
node_api_client -.->|"sends requests"| node_dashboard_api
node_api_client -.->|"sends requests"| node_user_api
node_api_client -.->|"sends requests"| node_admin_api
node_auth_api -.->|"verifies token"| node_auth
node_wedding_api -->|"verifies token"| node_auth
node_property_api -->|"verifies token"| node_auth
node_calendar_api -->|"verifies token"| node_auth
node_dashboard_api -->|"verifies token"| node_auth
node_user_api -->|"verifies token"| node_auth
node_connection_api -->|"verifies token"| node_auth
node_admin_api -.->|"verifies token"| node_auth
node_auth -->|"uses"| node_jwt
node_wedding_api -->|"gets shared users"| node_sharing
node_property_api -->|"gets shared users"| node_sharing
node_calendar_api -->|"gets shared users"| node_sharing
node_user_api -->|"gets partner"| node_sharing
node_sharing -->|"queries connections"| node_database_client
node_wedding_api -->|"reads and writes"| node_database_client
node_property_api -->|"reads and writes"| node_database_client
node_calendar_api -->|"reads and writes"| node_database_client
node_dashboard_api -->|"reads data"| node_database_client
node_user_api -->|"reads and writes"| node_database_client
node_connection_api -->|"reads and writes"| node_database_client
node_database_client -.->|"queries"| node_database
node_wedding_api -->|"checks cache"| node_etag

click node_authpages "https://github.com/shinukjin/wp/blob/main/app/(site)/login/page.tsx"
click node_home "https://github.com/shinukjin/wp/blob/main/app/(site)/page.tsx"
click node_profilepage "https://github.com/shinukjin/wp/blob/main/app/(site)/my-info/page.tsx"
click node_admin "https://github.com/shinukjin/wp/blob/main/app/(admin)/admin/page.tsx"
click node_weddingui "https://github.com/shinukjin/wp/blob/main/components/wedding-prep/WeddingPrepTable.tsx"
click node_propertyui "https://github.com/shinukjin/wp/blob/main/components/real-estate/RealEstateTable.tsx"
click node_scheduleui "https://github.com/shinukjin/wp/blob/main/components/schedule/TravelScheduleTable.tsx"
click node_calendarui "https://github.com/shinukjin/wp/blob/main/components/calendar/Calendar.tsx"
click node_dashboardui "https://github.com/shinukjin/wp/blob/main/components/dashboard/Dashboard.tsx"
click node_profileedit "https://github.com/shinukjin/wp/blob/main/components/my-info/UserInfoEditModal.tsx"
click node_state "https://github.com/shinukjin/wp/blob/main/lib/store/useWeddingStore.ts"
click node_api_client "https://github.com/shinukjin/wp/blob/main/lib/api/client.ts"
click node_auth_api "https://github.com/shinukjin/wp/blob/main/app/api/auth/login/route.ts"
click node_wedding_api "https://github.com/shinukjin/wp/blob/main/app/api/wedding-prep/route.ts"
click node_property_api "https://github.com/shinukjin/wp/blob/main/app/api/real-estate/route.ts"
click node_travel_api "https://github.com/shinukjin/wp/blob/main/app/api/travel-schedule/route.ts"
click node_calendar_api "https://github.com/shinukjin/wp/blob/main/app/api/calendar/route.ts"
click node_dashboard_api "https://github.com/shinukjin/wp/blob/main/app/api/dashboard/route.ts"
click node_user_api "https://github.com/shinukjin/wp/blob/main/app/api/user/route.ts"
click node_connection_api "https://github.com/shinukjin/wp/blob/main/app/api/connection/route.ts"
click node_admin_api "https://github.com/shinukjin/wp/blob/main/app/api/admin/users/route.ts"
click node_auth "https://github.com/shinukjin/wp/blob/main/lib/utils/auth.ts"
click node_jwt "https://github.com/shinukjin/wp/blob/main/lib/utils/jwt.ts"
click node_sharing "https://github.com/shinukjin/wp/blob/main/lib/utils/connection.ts"
click node_etag "https://github.com/shinukjin/wp/blob/main/lib/utils/etag.ts"
click node_database_client "https://github.com/shinukjin/wp/blob/main/lib/prisma.ts"
click node_database "https://github.com/shinukjin/wp/blob/main/prisma/schema.prisma"
click node_logger "https://github.com/shinukjin/wp/blob/main/lib/logger.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_authpages,node_home,node_profilepage,node_admin toneBlue
class node_weddingui,node_propertyui,node_scheduleui,node_calendarui,node_dashboardui toneAmber
class node_profileedit,node_state toneMint
class node_api_client,node_auth_api,node_wedding_api,node_property_api,node_travel_api,node_calendar_api,node_dashboard_api,node_user_api,node_connection_api,node_admin_api,node_auth,node_jwt,node_sharing,node_etag,node_database_client,node_database,node_logger toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [Sign-in and registration](https://github.com/shinukjin/wp/blob/main/app/(site)/login/page.tsx): `app/(site)/login/page.tsx`
- [Home dashboard](https://github.com/shinukjin/wp/blob/main/app/(site)/page.tsx): `app/(site)/page.tsx`
- [My information](https://github.com/shinukjin/wp/blob/main/app/(site)/my-info/page.tsx): `app/(site)/my-info/page.tsx`
- [Admin console](https://github.com/shinukjin/wp/blob/main/app/(admin)/admin/page.tsx): `app/(admin)/admin/page.tsx`

### Planning features

- [Wedding preparation UI](https://github.com/shinukjin/wp/blob/main/components/wedding-prep/WeddingPrepTable.tsx): `components/wedding-prep/WeddingPrepTable.tsx`
- [Property listings UI](https://github.com/shinukjin/wp/blob/main/components/real-estate/RealEstateTable.tsx): `components/real-estate/RealEstateTable.tsx`
- [Travel schedule UI](https://github.com/shinukjin/wp/blob/main/components/schedule/TravelScheduleTable.tsx): `components/schedule/TravelScheduleTable.tsx`
- [Calendar](https://github.com/shinukjin/wp/blob/main/components/calendar/Calendar.tsx): `components/calendar/Calendar.tsx`
- [Dashboard](https://github.com/shinukjin/wp/blob/main/components/dashboard/Dashboard.tsx): `components/dashboard/Dashboard.tsx`

### Accounts and sharing

- [Profile editor](https://github.com/shinukjin/wp/blob/main/components/my-info/UserInfoEditModal.tsx): `components/my-info/UserInfoEditModal.tsx`
- [Session and user state](https://github.com/shinukjin/wp/blob/main/lib/store/useWeddingStore.ts): `lib/store/useWeddingStore.ts`

### Server services

- [HTTP client](https://github.com/shinukjin/wp/blob/main/lib/api/client.ts): `lib/api/client.ts`
- [Authentication API](https://github.com/shinukjin/wp/blob/main/app/api/auth/login/route.ts): `app/api/auth/login/route.ts`
- [Preparation API](https://github.com/shinukjin/wp/blob/main/app/api/wedding-prep/route.ts): `app/api/wedding-prep/route.ts`
- [Property API](https://github.com/shinukjin/wp/blob/main/app/api/real-estate/route.ts): `app/api/real-estate/route.ts`
- [Travel schedule API](https://github.com/shinukjin/wp/blob/main/app/api/travel-schedule/route.ts): `app/api/travel-schedule/route.ts`
- [Calendar API](https://github.com/shinukjin/wp/blob/main/app/api/calendar/route.ts): `app/api/calendar/route.ts`
- [Dashboard API](https://github.com/shinukjin/wp/blob/main/app/api/dashboard/route.ts): `app/api/dashboard/route.ts`
- [User profile API](https://github.com/shinukjin/wp/blob/main/app/api/user/route.ts): `app/api/user/route.ts`
- [Connection API](https://github.com/shinukjin/wp/blob/main/app/api/connection/route.ts): `app/api/connection/route.ts`
- [Admin user APIs](https://github.com/shinukjin/wp/blob/main/app/api/admin/users/route.ts): `app/api/admin/users/route.ts`
- [Token authentication](https://github.com/shinukjin/wp/blob/main/lib/utils/auth.ts): `lib/utils/auth.ts`
- [JWT verification](https://github.com/shinukjin/wp/blob/main/lib/utils/jwt.ts): `lib/utils/jwt.ts`
- [Partner sharing](https://github.com/shinukjin/wp/blob/main/lib/utils/connection.ts): `lib/utils/connection.ts`
- [Conditional caching](https://github.com/shinukjin/wp/blob/main/lib/utils/etag.ts): `lib/utils/etag.ts`
- [Prisma access](https://github.com/shinukjin/wp/blob/main/lib/prisma.ts): `lib/prisma.ts`
- [Application database](https://github.com/shinukjin/wp/blob/main/prisma/schema.prisma): `prisma/schema.prisma`
- [Application logging](https://github.com/shinukjin/wp/blob/main/lib/logger.ts): `lib/logger.ts`

### Other components

- **Couple or admin**

## Connections

- Couple or admin → Sign-in and registration: opens (evidence: `app/(site)/login/page.tsx`)
- Couple or admin → Home dashboard: opens
- Couple or admin → Admin console: opens
- Sign-in and registration → Session and user state: updates session
- Sign-in and registration → HTTP client: submits credentials
- Home dashboard → Dashboard: renders (evidence: `app/(site)/page.tsx`)
- Home dashboard → Calendar: renders (evidence: `app/(site)/page.tsx`)
- Home dashboard → Session and user state: reads state (evidence: `app/(site)/page.tsx`)
- Dashboard → HTTP client: requests data (evidence: `components/dashboard/Dashboard.tsx`)
- Calendar → HTTP client: requests events (evidence: `components/calendar/Calendar.tsx`)
- My information → Profile editor: renders editor (evidence: `app/(site)/my-info/page.tsx`)
- My information → HTTP client: requests profile (evidence: `app/(site)/my-info/page.tsx`)
- Profile editor → HTTP client: updates profile (evidence: `components/my-info/UserInfoEditModal.tsx`)
- Wedding preparation UI → HTTP client: requests tasks (evidence: `components/wedding-prep/WeddingPrepTable.tsx`)
- Property listings UI → HTTP client: requests listings (evidence: `components/real-estate/RealEstateTable.tsx`)
- Property listings UI → Session and user state: reads state (evidence: `components/real-estate/RealEstateTable.tsx`)
- Travel schedule UI → HTTP client: requests schedule (evidence: `components/schedule/TravelScheduleTable.tsx`)
- Travel schedule UI → Session and user state: reads state (evidence: `components/schedule/TravelScheduleTable.tsx`)
- HTTP client → Authentication API: sends requests
- HTTP client → Preparation API: sends requests
- HTTP client → Property API: sends requests
- HTTP client → Travel schedule API: sends requests
- HTTP client → Calendar API: sends requests
- HTTP client → Dashboard API: sends requests
- HTTP client → User profile API: sends requests
- HTTP client → Admin user APIs: sends requests
- Authentication API → Token authentication: verifies token
- Preparation API → Token authentication: verifies token (evidence: `app/api/wedding-prep/route.ts`)
- Property API → Token authentication: verifies token (evidence: `app/api/real-estate/route.ts`)
- Calendar API → Token authentication: verifies token (evidence: `app/api/calendar/route.ts`)
- Dashboard API → Token authentication: verifies token (evidence: `app/api/dashboard/route.ts`)
- User profile API → Token authentication: verifies token (evidence: `app/api/user/route.ts`)
- Connection API → Token authentication: verifies token (evidence: `app/api/connection/route.ts`)
- Admin user APIs → Token authentication: verifies token
- Token authentication → JWT verification: uses (evidence: `lib/utils/auth.ts`)
- Preparation API → Partner sharing: gets shared users (evidence: `app/api/wedding-prep/route.ts`)
- Property API → Partner sharing: gets shared users (evidence: `app/api/real-estate/route.ts`)
- Calendar API → Partner sharing: gets shared users (evidence: `app/api/calendar/route.ts`)
- User profile API → Partner sharing: gets partner (evidence: `app/api/user/route.ts`)
- Partner sharing → Prisma access: queries connections (evidence: `lib/utils/connection.ts`)
- Preparation API → Prisma access: reads and writes (evidence: `app/api/wedding-prep/route.ts`)
- Property API → Prisma access: reads and writes (evidence: `app/api/real-estate/route.ts`)
- Calendar API → Prisma access: reads and writes (evidence: `app/api/calendar/route.ts`)
- Dashboard API → Prisma access: reads data (evidence: `app/api/dashboard/route.ts`)
- User profile API → Prisma access: reads and writes (evidence: `app/api/user/route.ts`)
- Connection API → Prisma access: reads and writes (evidence: `app/api/connection/route.ts`)
- Prisma access → Application database: queries
- Preparation API → Conditional caching: checks cache (evidence: `app/api/wedding-prep/route.ts`)
