# kusalkumar06/eventia architecture

> Architecture diagram of the GitHub repository kusalkumar06/eventia, 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/kusalkumar06/eventia
- Repository: https://github.com/kusalkumar06/eventia

## Overview

Eventia is an event-discovery and event-management application with attendee registration, organizer tools, and administrative review. The main flow is users discovering published events and registering; organizers create and manage events, while admins review event status and organizer access. The graph also includes authentication, OTP email verification, profiles, search, and the persistence layer. Relationships reflect sampled code and SOURCE INDEX references; several UI and service modules were not sampled, so their internals are not inferred.

Main entry points: [`utilities/server/eventActions.ts`](https://github.com/kusalkumar06/eventia/blob/master/utilities/server/eventActions.ts) (Event operations), [`app/api/auth/register/route.ts`](https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/register/route.ts) (Auth endpoints), [`app/api/auth/send-otp/route.ts`](https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/send-otp/route.ts) (OTP endpoints), [`lib/db.ts`](https://github.com/kusalkumar06/eventia/blob/master/lib/db.ts) (MongoDB connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audience["Attendee experience"]
  node_event_discovery["Event discovery<br/>[page.tsx]"]
  node_event_details["Event details<br/>[page.tsx]"]
  node_event_search["Global search<br/>[GlobalSearch.tsx]"]
  node_registration_ui["Registration control<br/>[RegisterButton.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_signin["Sign-in<br/>[page.tsx]"]
  node_auth_service["Authentication<br/>[auth.ts]"]
  node_auth_api["Auth endpoints<br/>[route.ts]"]
  node_otp_api["OTP endpoints<br/>[route.ts]"]
  node_profile["Profile management<br/>[page.tsx]"]
  node_profile_api["Profile update endpoint<br/>[route.ts]"]
end

subgraph group_operations["Event operations"]
  node_organizer_workspace["Organizer workspace<br/>[page.tsx]"]
  node_event_authoring["Event authoring<br/>[EventForm.tsx]"]
  node_event_actions["Event operations<br/>[eventActions.ts]"]
  node_admin_dashboard["Admin dashboard<br/>[page.tsx]"]
  node_admin_review["Admin review<br/>[page.tsx]"]
  node_organizer_access["Organizer access review"]
  node_registration_service["Registration service"]
end

subgraph group_persistence["Persistence and services"]
  node_database[("MongoDB connection<br/>[db.ts]")]
  node_users[("User records<br/>[user.model.ts]")]
  node_events[("Event records<br/>[event.model.ts]")]
  node_registrations[("Registration records")]
  node_categories[("Category records<br/>[category.model.ts]")]
  node_otp_records[("OTP records<br/>[otp.model.ts]")]
  node_activity[("Activity records<br/>[activity.model.ts]")]
end

node_visitor(("Attendee"))
node_organizer(("Organizer"))
node_admin(("Administrator"))
node_email_provider["Brevo email<br/>[brevo.ts]"]
node_google["Google identity"]

node_visitor -->|"browses"| node_event_discovery
node_event_discovery -.->|"loads listings"| node_event_actions
node_visitor -->|"searches"| node_event_search
node_event_search -.->|"requests events"| node_event_actions
node_visitor -->|"opens event"| node_event_details
node_event_details -->|"loads event"| node_event_actions
node_event_details -->|"renders"| node_registration_ui
node_registration_ui -->|"invokes"| node_registration_service
node_registration_service -.->|"reads and writes"| node_registrations
node_landing -.->|"promotes events"| node_event_discovery
node_visitor -->|"signs in"| node_signin
node_signin -.->|"authenticates"| node_auth_service
node_auth_service -->|"reads users"| node_users
node_auth_service -->|"connects"| node_database
node_auth_service -->|"supports sign-in"| node_google
node_visitor -->|"registers"| node_auth_api
node_auth_api -->|"creates user"| node_users
node_auth_api -->|"creates OTP"| node_otp_records
node_auth_api -->|"sends verification"| node_email_provider
node_visitor -->|"requests OTP"| node_otp_api
node_otp_api -->|"stores OTP"| node_otp_records
node_otp_api -->|"sends code"| node_email_provider
node_otp_api -->|"checks account"| node_users
node_profile -->|"updates profile"| node_profile_api
node_profile_api -->|"updates user"| node_users
node_organizer -->|"creates event"| node_event_authoring
node_event_authoring -.->|"submits event"| node_event_actions
node_organizer -->|"manages events"| node_organizer_workspace
node_organizer_workspace -->|"loads events"| node_event_actions
node_event_actions -->|"reads and writes"| node_events
node_event_actions -->|"looks up categories"| node_categories
node_admin -->|"views metrics"| node_admin_dashboard
node_admin_dashboard -->|"counts events"| node_events
node_admin_dashboard -->|"counts users"| node_users
node_admin_dashboard -->|"reads activity"| node_activity
node_admin -->|"reviews events"| node_admin_review
node_admin_review -.->|"loads review list"| node_event_actions
node_admin -->|"reviews requests"| node_organizer_access
node_event_actions -->|"connects"| node_database
node_profile_api -->|"connects"| node_database
node_otp_api -->|"connects"| node_database
node_auth_api -->|"connects"| node_database

click node_event_discovery "https://github.com/kusalkumar06/eventia/blob/master/app/(main)/events/page.tsx"
click node_event_details "https://github.com/kusalkumar06/eventia/blob/master/app/(main)/events/%5B...slug%5D/page.tsx"
click node_event_search "https://github.com/kusalkumar06/eventia/blob/master/components/GlobalSearch.tsx"
click node_registration_ui "https://github.com/kusalkumar06/eventia/blob/master/components/RegisterButton.tsx"
click node_landing "https://github.com/kusalkumar06/eventia/blob/master/components/LandingPage.tsx"
click node_signin "https://github.com/kusalkumar06/eventia/blob/master/app/(auth)/signin/page.tsx"
click node_auth_service "https://github.com/kusalkumar06/eventia/blob/master/lib/auth.ts"
click node_auth_api "https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/register/route.ts"
click node_otp_api "https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/send-otp/route.ts"
click node_profile "https://github.com/kusalkumar06/eventia/blob/master/app/(main)/profile/page.tsx"
click node_profile_api "https://github.com/kusalkumar06/eventia/blob/master/app/api/users/me/route.ts"
click node_organizer_workspace "https://github.com/kusalkumar06/eventia/blob/master/app/organizer/my-events/page.tsx"
click node_event_authoring "https://github.com/kusalkumar06/eventia/blob/master/components/createEvent/EventForm.tsx"
click node_event_actions "https://github.com/kusalkumar06/eventia/blob/master/utilities/server/eventActions.ts"
click node_admin_dashboard "https://github.com/kusalkumar06/eventia/blob/master/app/admin/page.tsx"
click node_admin_review "https://github.com/kusalkumar06/eventia/blob/master/app/admin/events/pending/page.tsx"
click node_organizer_access "https://github.com/kusalkumar06/eventia/blob/master/utilities/server/adminOrganizerActions.ts"
click node_registration_service "https://github.com/kusalkumar06/eventia/blob/master/utilities/services/registrationActions.ts"
click node_database "https://github.com/kusalkumar06/eventia/blob/master/lib/db.ts"
click node_users "https://github.com/kusalkumar06/eventia/blob/master/models/user.model.ts"
click node_events "https://github.com/kusalkumar06/eventia/blob/master/models/event.model.ts"
click node_registrations "https://github.com/kusalkumar06/eventia/blob/master/models/registration.model.ts"
click node_categories "https://github.com/kusalkumar06/eventia/blob/master/models/category.model.ts"
click node_otp_records "https://github.com/kusalkumar06/eventia/blob/master/models/otp.model.ts"
click node_activity "https://github.com/kusalkumar06/eventia/blob/master/models/activity.model.ts"
click node_email_provider "https://github.com/kusalkumar06/eventia/blob/master/lib/brevo.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_event_discovery,node_event_details,node_event_search,node_registration_ui,node_landing toneBlue
class node_signin,node_auth_service,node_auth_api,node_otp_api,node_profile,node_profile_api toneAmber
class node_organizer_workspace,node_event_authoring,node_event_actions,node_admin_dashboard,node_admin_review,node_organizer_access,node_registration_service toneMint
class node_database,node_users,node_events,node_registrations,node_categories,node_otp_records,node_activity toneRose
class node_visitor,node_organizer,node_admin,node_google toneIndigo
class node_email_provider toneTeal
```

## Components

### Attendee experience

- [Event discovery](https://github.com/kusalkumar06/eventia/blob/master/app/(main)/events/page.tsx): `app/(main)/events/page.tsx`
- [Event details](https://github.com/kusalkumar06/eventia/blob/master/app/(main)/events/%5B...slug%5D/page.tsx): `app/(main)/events/[...slug]/page.tsx`
- [Global search](https://github.com/kusalkumar06/eventia/blob/master/components/GlobalSearch.tsx): `components/GlobalSearch.tsx`
- [Registration control](https://github.com/kusalkumar06/eventia/blob/master/components/RegisterButton.tsx): `components/RegisterButton.tsx`
- [Landing page](https://github.com/kusalkumar06/eventia/blob/master/components/LandingPage.tsx): `components/LandingPage.tsx`

### Identity and profiles

- [Sign-in](https://github.com/kusalkumar06/eventia/blob/master/app/(auth)/signin/page.tsx): `app/(auth)/signin/page.tsx`
- [Authentication](https://github.com/kusalkumar06/eventia/blob/master/lib/auth.ts): `lib/auth.ts`
- [Auth endpoints](https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/register/route.ts): `app/api/auth/register/route.ts`
- [OTP endpoints](https://github.com/kusalkumar06/eventia/blob/master/app/api/auth/send-otp/route.ts): `app/api/auth/send-otp/route.ts`
- [Profile management](https://github.com/kusalkumar06/eventia/blob/master/app/(main)/profile/page.tsx): `app/(main)/profile/page.tsx`
- [Profile update endpoint](https://github.com/kusalkumar06/eventia/blob/master/app/api/users/me/route.ts): `app/api/users/me/route.ts`

### Event operations

- [Organizer workspace](https://github.com/kusalkumar06/eventia/blob/master/app/organizer/my-events/page.tsx): `app/organizer/my-events/page.tsx`
- [Event authoring](https://github.com/kusalkumar06/eventia/blob/master/components/createEvent/EventForm.tsx): `components/createEvent/EventForm.tsx`
- [Event operations](https://github.com/kusalkumar06/eventia/blob/master/utilities/server/eventActions.ts): `utilities/server/eventActions.ts`
- [Admin dashboard](https://github.com/kusalkumar06/eventia/blob/master/app/admin/page.tsx): `app/admin/page.tsx`
- [Admin review](https://github.com/kusalkumar06/eventia/blob/master/app/admin/events/pending/page.tsx): `app/admin/events/pending/page.tsx`
- [Organizer access review](https://github.com/kusalkumar06/eventia/blob/master/utilities/server/adminOrganizerActions.ts): `utilities/server/adminOrganizerActions.ts`
- [Registration service](https://github.com/kusalkumar06/eventia/blob/master/utilities/services/registrationActions.ts): `utilities/services/registrationActions.ts`

### Persistence and services

- [MongoDB connection](https://github.com/kusalkumar06/eventia/blob/master/lib/db.ts): `lib/db.ts`
- [User records](https://github.com/kusalkumar06/eventia/blob/master/models/user.model.ts): `models/user.model.ts`
- [Event records](https://github.com/kusalkumar06/eventia/blob/master/models/event.model.ts): `models/event.model.ts`
- [Registration records](https://github.com/kusalkumar06/eventia/blob/master/models/registration.model.ts): `models/registration.model.ts`
- [Category records](https://github.com/kusalkumar06/eventia/blob/master/models/category.model.ts): `models/category.model.ts`
- [OTP records](https://github.com/kusalkumar06/eventia/blob/master/models/otp.model.ts): `models/otp.model.ts`
- [Activity records](https://github.com/kusalkumar06/eventia/blob/master/models/activity.model.ts): `models/activity.model.ts`

### Other components

- **Attendee**
- **Organizer**
- **Administrator**
- [Brevo email](https://github.com/kusalkumar06/eventia/blob/master/lib/brevo.ts): `lib/brevo.ts`
- **Google identity**

## Connections

- Attendee → Event discovery: browses
- Event discovery → Event operations: loads listings
- Attendee → Global search: searches
- Global search → Event operations: requests events
- Attendee → Event details: opens event
- Event details → Event operations: loads event (evidence: `app/(main)/events/[...slug]/page.tsx`)
- Event details → Registration control: renders (evidence: `app/(main)/events/[...slug]/page.tsx`)
- Registration control → Registration service: invokes (evidence: `components/RegisterButton.tsx`)
- Registration service → Registration records: reads and writes
- Landing page → Event discovery: promotes events
- Attendee → Sign-in: signs in
- Sign-in → Authentication: authenticates
- Authentication → User records: reads users (evidence: `lib/auth.ts`)
- Authentication → MongoDB connection: connects (evidence: `lib/auth.ts`)
- Authentication → Google identity: supports sign-in (evidence: `lib/auth.ts`)
- Attendee → Auth endpoints: registers
- Auth endpoints → User records: creates user (evidence: `app/api/auth/register/route.ts`)
- Auth endpoints → OTP records: creates OTP (evidence: `app/api/auth/register/route.ts`)
- Auth endpoints → Brevo email: sends verification (evidence: `app/api/auth/register/route.ts`)
- Attendee → OTP endpoints: requests OTP
- OTP endpoints → OTP records: stores OTP (evidence: `app/api/auth/send-otp/route.ts`)
- OTP endpoints → Brevo email: sends code (evidence: `app/api/auth/send-otp/route.ts`)
- OTP endpoints → User records: checks account (evidence: `app/api/auth/send-otp/route.ts`)
- Profile management → Profile update endpoint: updates profile (evidence: `app/(main)/profile/page.tsx`)
- Profile update endpoint → User records: updates user (evidence: `app/api/users/me/route.ts`)
- Organizer → Event authoring: creates event
- Event authoring → Event operations: submits event
- Organizer → Organizer workspace: manages events
- Organizer workspace → Event operations: loads events (evidence: `app/organizer/my-events/page.tsx`)
- Event operations → Event records: reads and writes (evidence: `utilities/server/eventActions.ts`)
- Event operations → Category records: looks up categories (evidence: `utilities/server/eventActions.ts`)
- Administrator → Admin dashboard: views metrics
- Admin dashboard → Event records: counts events (evidence: `app/admin/page.tsx`)
- Admin dashboard → User records: counts users (evidence: `app/admin/page.tsx`)
- Admin dashboard → Activity records: reads activity (evidence: `app/admin/page.tsx`)
- Administrator → Admin review: reviews events
- Admin review → Event operations: loads review list
- Administrator → Organizer access review: reviews requests
- Event operations → MongoDB connection: connects (evidence: `utilities/server/eventActions.ts`)
- Profile update endpoint → MongoDB connection: connects (evidence: `app/api/users/me/route.ts`)
- OTP endpoints → MongoDB connection: connects (evidence: `app/api/auth/send-otp/route.ts`)
- Auth endpoints → MongoDB connection: connects (evidence: `app/api/auth/register/route.ts`)
