# pprathik07/community-events-board architecture

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

- Interactive diagram: https://gitdiagram.com/pprathik07/community-events-board
- Repository: https://github.com/pprathik07/community-events-board

## Overview

Community Events Board is a Next.js app for discovering local events, with visitor accounts and an admin event-management workflow. Visitors browse and filter events, then can view details, manage favourites, receive a category-based feed, set reminders, and save decorated event cards. Admins sign in, create events, and toggle visibility. The README establishes that the UI uses the JSON API; excerpts show selected route-to-service and service-to-storage calls. Other feature links are documented but their source was not sampled.

Main entry points: [`src/app/api/auth/signup/route.ts`](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/auth/signup/route.ts) (Authentication routes), [`src/app/events/[id]/page.tsx`](https://github.com/pprathik07/community-events-board/blob/main/src/app/events/%5Bid%5D/page.tsx) (Event details), [`src/app/api/admin/events/route.ts`](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/admin/events/route.ts) (Admin event routes), [`src/app/api/me/feed/route.ts`](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/me/feed/route.ts) (User data routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_browse["Event browsing<br/>[page.tsx]"]
  node_detail["Event details<br/>[page.tsx]"]
  node_accountpages["Account pages<br/>[page.tsx]"]
  node_feedpage["My Feed<br/>[page.tsx]"]
  node_favpage["Favourites<br/>[page.tsx]"]
  node_designer["Card designer<br/>[card-designer.tsx]"]
  node_adminpages["Event management<br/>[page.tsx]"]
end

subgraph group_api["JSON API"]
  node_eventsapi["Public event routes<br/>[route.ts]"]
  node_detailapi["Event detail route<br/>[route.ts]"]
  node_filtersapi["Filter values route<br/>[route.ts]"]
  node_reminderapi["Reminder route<br/>[route.ts]"]
  node_cardapi["Card design route<br/>[route.ts]"]
  node_authapi["Authentication routes<br/>[route.ts]"]
  node_userapi["User data routes<br/>[route.ts]"]
  node_adminapi["Admin event routes<br/>[route.ts]"]
end

subgraph group_domain["Domain services"]
  node_authsvc["Account service<br/>[auth.ts]"]
  node_eventsvc["Event service<br/>[events.ts]"]
  node_visibility["Event visibility<br/>[visibility.ts]"]
  node_favourites["Favourite service<br/>[favourites.ts]"]
  node_feed["Feed service<br/>[feed.ts]"]
  node_reminders["Reminder service<br/>[reminders.ts]"]
end

subgraph group_foundation["Shared foundation"]
  node_db[("Prisma database<br/>[db.ts]")]
  node_session["Session guards<br/>[session.ts]"]
  node_jwt["JWT handling<br/>[jwt.ts]"]
  node_validation["Input validation<br/>[validation.ts]"]
  node_http["HTTP helpers<br/>[http.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_sessionhook["Session hook<br/>[use-session.ts]"]
end

node_visitor(("Visitors"))
node_admin(("Admins"))

node_visitor -->|"browses"| node_browse
node_visitor -->|"signs in"| node_accountpages
node_visitor -->|"opens"| node_detail
node_visitor -->|"views feed"| node_feedpage
node_visitor -->|"sets categories"| node_favpage
node_admin -->|"manages events"| node_adminpages
node_browse -->|"requests events"| node_eventsapi
node_browse -->|"requests filters"| node_filtersapi
node_detail -->|"loads event"| node_detailapi
node_detail -->|"sets reminder"| node_reminderapi
node_detail -->|"offers design"| node_designer
node_designer -->|"saves design"| node_cardapi
node_accountpages -->|"authenticates"| node_authapi
node_feedpage -->|"loads feed"| node_userapi
node_favpage -->|"manages categories"| node_userapi
node_adminpages -->|"manages events"| node_adminapi
node_eventsapi -->|"lists events"| node_eventsvc
node_adminapi -->|"creates or lists"| node_eventsvc
node_authapi -->|"signs up"| node_authsvc
node_authsvc -->|"reads and writes"| node_db
node_eventsvc -->|"queries events"| node_db
node_eventsvc -->|"uses rules"| node_visibility
node_session -->|"checks token"| node_jwt
node_eventsapi -->|"parses filters"| node_validation
node_adminapi -->|"requires admin"| node_session
node_adminapi -->|"validates input"| node_validation
node_authapi -->|"validates signup"| node_validation
node_authapi -->|"formats response"| node_http
node_authapi -.->|"serves JSON API"| node_api_client
node_sessionhook -->|"loads session"| node_api_client
node_designer -->|"checks session"| node_sessionhook
node_userapi -.->|"manages choices"| node_favourites
node_userapi -.->|"builds feed"| node_feed
node_reminderapi -.->|"stores reminders"| node_reminders

click node_browse "https://github.com/pprathik07/community-events-board/blob/main/src/app/page.tsx"
click node_detail "https://github.com/pprathik07/community-events-board/blob/main/src/app/events/%5Bid%5D/page.tsx"
click node_accountpages "https://github.com/pprathik07/community-events-board/blob/main/src/app/login/page.tsx"
click node_feedpage "https://github.com/pprathik07/community-events-board/blob/main/src/app/feed/page.tsx"
click node_favpage "https://github.com/pprathik07/community-events-board/blob/main/src/app/favourites/page.tsx"
click node_designer "https://github.com/pprathik07/community-events-board/blob/main/src/components/card-designer.tsx"
click node_adminpages "https://github.com/pprathik07/community-events-board/blob/main/src/app/admin/(protected)/events/new/page.tsx"
click node_eventsapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/route.ts"
click node_detailapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/route.ts"
click node_filtersapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/filters/route.ts"
click node_reminderapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/reminder/route.ts"
click node_cardapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/card/route.ts"
click node_authapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/auth/signup/route.ts"
click node_userapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/me/feed/route.ts"
click node_adminapi "https://github.com/pprathik07/community-events-board/blob/main/src/app/api/admin/events/route.ts"
click node_authsvc "https://github.com/pprathik07/community-events-board/blob/main/src/services/auth.ts"
click node_eventsvc "https://github.com/pprathik07/community-events-board/blob/main/src/services/events.ts"
click node_visibility "https://github.com/pprathik07/community-events-board/blob/main/src/services/visibility.ts"
click node_favourites "https://github.com/pprathik07/community-events-board/blob/main/src/services/favourites.ts"
click node_feed "https://github.com/pprathik07/community-events-board/blob/main/src/services/feed.ts"
click node_reminders "https://github.com/pprathik07/community-events-board/blob/main/src/services/reminders.ts"
click node_db "https://github.com/pprathik07/community-events-board/blob/main/src/lib/db.ts"
click node_session "https://github.com/pprathik07/community-events-board/blob/main/src/lib/session.ts"
click node_jwt "https://github.com/pprathik07/community-events-board/blob/main/src/lib/jwt.ts"
click node_validation "https://github.com/pprathik07/community-events-board/blob/main/src/lib/validation.ts"
click node_http "https://github.com/pprathik07/community-events-board/blob/main/src/lib/http.ts"
click node_api_client "https://github.com/pprathik07/community-events-board/blob/main/src/lib/api.ts"
click node_sessionhook "https://github.com/pprathik07/community-events-board/blob/main/src/hooks/use-session.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_browse,node_detail,node_accountpages,node_feedpage,node_favpage,node_designer,node_adminpages toneBlue
class node_eventsapi,node_detailapi,node_filtersapi,node_reminderapi,node_cardapi,node_authapi,node_userapi,node_adminapi toneAmber
class node_authsvc,node_eventsvc,node_visibility,node_favourites,node_feed,node_reminders toneMint
class node_db,node_session,node_jwt,node_validation,node_http,node_api_client,node_sessionhook toneRose
class node_visitor,node_admin toneIndigo
```

## Components

### Web experience

- [Event browsing](https://github.com/pprathik07/community-events-board/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Event details](https://github.com/pprathik07/community-events-board/blob/main/src/app/events/%5Bid%5D/page.tsx): `src/app/events/[id]/page.tsx`
- [Account pages](https://github.com/pprathik07/community-events-board/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [My Feed](https://github.com/pprathik07/community-events-board/blob/main/src/app/feed/page.tsx): `src/app/feed/page.tsx`
- [Favourites](https://github.com/pprathik07/community-events-board/blob/main/src/app/favourites/page.tsx): `src/app/favourites/page.tsx`
- [Card designer](https://github.com/pprathik07/community-events-board/blob/main/src/components/card-designer.tsx): `src/components/card-designer.tsx`
- [Event management](https://github.com/pprathik07/community-events-board/blob/main/src/app/admin/(protected)/events/new/page.tsx): `src/app/admin/(protected)/events/new/page.tsx`

### JSON API

- [Public event routes](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/route.ts): `src/app/api/events/route.ts`
- [Event detail route](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/route.ts): `src/app/api/events/[id]/route.ts`
- [Filter values route](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/filters/route.ts): `src/app/api/events/filters/route.ts`
- [Reminder route](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/reminder/route.ts): `src/app/api/events/[id]/reminder/route.ts`
- [Card design route](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/events/%5Bid%5D/card/route.ts): `src/app/api/events/[id]/card/route.ts`
- [Authentication routes](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/auth/signup/route.ts): `src/app/api/auth/signup/route.ts`
- [User data routes](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/me/feed/route.ts): `src/app/api/me/feed/route.ts`
- [Admin event routes](https://github.com/pprathik07/community-events-board/blob/main/src/app/api/admin/events/route.ts): `src/app/api/admin/events/route.ts`

### Domain services

- [Account service](https://github.com/pprathik07/community-events-board/blob/main/src/services/auth.ts): `src/services/auth.ts`
- [Event service](https://github.com/pprathik07/community-events-board/blob/main/src/services/events.ts): `src/services/events.ts`
- [Event visibility](https://github.com/pprathik07/community-events-board/blob/main/src/services/visibility.ts): `src/services/visibility.ts`
- [Favourite service](https://github.com/pprathik07/community-events-board/blob/main/src/services/favourites.ts): `src/services/favourites.ts`
- [Feed service](https://github.com/pprathik07/community-events-board/blob/main/src/services/feed.ts): `src/services/feed.ts`
- [Reminder service](https://github.com/pprathik07/community-events-board/blob/main/src/services/reminders.ts): `src/services/reminders.ts`

### Shared foundation

- [Prisma database](https://github.com/pprathik07/community-events-board/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Session guards](https://github.com/pprathik07/community-events-board/blob/main/src/lib/session.ts): `src/lib/session.ts`
- [JWT handling](https://github.com/pprathik07/community-events-board/blob/main/src/lib/jwt.ts): `src/lib/jwt.ts`
- [Input validation](https://github.com/pprathik07/community-events-board/blob/main/src/lib/validation.ts): `src/lib/validation.ts`
- [HTTP helpers](https://github.com/pprathik07/community-events-board/blob/main/src/lib/http.ts): `src/lib/http.ts`
- [API client](https://github.com/pprathik07/community-events-board/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [Session hook](https://github.com/pprathik07/community-events-board/blob/main/src/hooks/use-session.ts): `src/hooks/use-session.ts`

### Other components

- **Visitors**
- **Admins**

## Connections

- Visitors → Event browsing: browses (evidence: `README.md`)
- Visitors → Account pages: signs in (evidence: `README.md`)
- Visitors → Event details: opens (evidence: `README.md`)
- Visitors → My Feed: views feed (evidence: `README.md`)
- Visitors → Favourites: sets categories (evidence: `README.md`)
- Admins → Event management: manages events (evidence: `README.md`)
- Event browsing → Public event routes: requests events (evidence: `README.md`)
- Event browsing → Filter values route: requests filters (evidence: `README.md`)
- Event details → Event detail route: loads event (evidence: `README.md`)
- Event details → Reminder route: sets reminder (evidence: `README.md`)
- Event details → Card designer: offers design (evidence: `README.md`)
- Card designer → Card design route: saves design (evidence: `src/components/card-designer.tsx`)
- Account pages → Authentication routes: authenticates (evidence: `README.md`)
- My Feed → User data routes: loads feed (evidence: `README.md`)
- Favourites → User data routes: manages categories (evidence: `README.md`)
- Event management → Admin event routes: manages events (evidence: `README.md`)
- Public event routes → Event service: lists events (evidence: `src/app/api/events/route.ts`)
- Admin event routes → Event service: creates or lists (evidence: `src/app/api/admin/events/route.ts`)
- Authentication routes → Account service: signs up (evidence: `src/app/api/auth/signup/route.ts`)
- Account service → Prisma database: reads and writes (evidence: `src/services/auth.ts`)
- Event service → Prisma database: queries events (evidence: `src/services/events.ts`)
- Event service → Event visibility: uses rules (evidence: `src/services/events.ts`)
- Session guards → JWT handling: checks token (evidence: `src/lib/session.ts`)
- Public event routes → Input validation: parses filters (evidence: `src/app/api/events/route.ts`)
- Admin event routes → Session guards: requires admin (evidence: `src/app/api/admin/events/route.ts`)
- Admin event routes → Input validation: validates input (evidence: `src/app/api/admin/events/route.ts`)
- Authentication routes → Input validation: validates signup (evidence: `src/app/api/auth/signup/route.ts`)
- Authentication routes → HTTP helpers: formats response (evidence: `src/app/api/auth/signup/route.ts`)
- Authentication routes → API client: serves JSON API
- Session hook → API client: loads session (evidence: `src/hooks/use-session.ts`)
- Card designer → Session hook: checks session (evidence: `src/components/card-designer.tsx`)
- User data routes → Favourite service: manages choices
- User data routes → Feed service: builds feed
- Reminder route → Reminder service: stores reminders
