# anuragahirwar958-prog/anurag architecture

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

- Interactive diagram: https://gitdiagram.com/anuragahirwar958-prog/anurag
- Repository: https://github.com/anuragahirwar958-prog/anurag

## Overview

EventFlex is a full-stack event staffing and hiring product. Its main workflow takes organizers from account creation through event and job publishing, then professionals through job discovery and applications; organizers shortlist and hire, followed by acceptance, assignment, attendance, payment, and review. The frontend uses the backend API, which persists to PostgreSQL. The graph preserves the documented domain stages and major discovery capability. Some backend modules and database schema were not sampled, so uncertain internal calls and optional integrations are omitted.

Main entry points: [`frontend/services/eventflex.ts`](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/services/eventflex.ts) (API services), [`backend/src/main.ts`](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/main.ts) (Backend API), [`backend/src/database.service.ts`](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/database.service.ts) (Database access), [`frontend/app/login/page.tsx`](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/login/page.tsx) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_home["Home and discovery<br/>[page.tsx]"]
  node_register["Registration<br/>[page.tsx]"]
  node_login["Login<br/>[page.tsx]"]
  node_organizer_events["Organizer events<br/>[page.tsx]"]
  node_organizer_dashboard["Organizer dashboard<br/>[page.tsx]"]
  node_professional_jobs["Professional jobs<br/>[page.tsx]"]
  node_professional_dashboard["Professional dashboard<br/>[page.tsx]"]
  node_jobs_page["Job search<br/>[page.tsx]"]
  node_workspace["Role workspace<br/>[Workspace.tsx]"]
  node_frontend_services["API services<br/>[eventflex.ts]"]
  node_api_client["HTTP client<br/>[api.ts]"]
  node_session["Session handling<br/>[auth.ts]"]
end

subgraph group_backend["Backend API"]
  node_api["Backend API<br/>[main.ts]"]
  node_auth["Accounts and auth<br/>[auth.ts]"]
  node_events_jobs["Events and jobs<br/>[events-jobs.ts]"]
  node_workflow["Applications and hiring<br/>[workflow.ts]"]
  node_completion["Assignment completion<br/>[completion.ts]"]
  node_notifications["Notifications<br/>[notifications.ts]"]
  node_db_service["Database access"]
end

subgraph group_data["Persistence"]
  node_postgres[("EventFlex database<br/>[schema.sql]")]
end

node_organizer(("Organizer"))
node_professional(("Professional"))

node_organizer -->|"creates account"| node_register
node_professional -->|"creates account"| node_register
node_organizer -->|"signs in"| node_login
node_professional -->|"signs in"| node_login
node_organizer -->|"creates event"| node_organizer_events
node_organizer -->|"manages hiring"| node_organizer_dashboard
node_professional -->|"finds work"| node_professional_jobs
node_professional -->|"searches jobs"| node_jobs_page
node_register -->|"registers via"| node_frontend_services
node_login -->|"authenticates via"| node_frontend_services
node_organizer_events -->|"manages events via"| node_frontend_services
node_organizer_dashboard -->|"uses API"| node_frontend_services
node_professional_jobs -->|"searches and applies via"| node_frontend_services
node_jobs_page -->|"searches via"| node_frontend_services
node_organizer_dashboard -->|"uses"| node_workspace
node_professional_dashboard -->|"uses"| node_workspace
node_professional_jobs -->|"uses"| node_workspace
node_login -->|"saves session"| node_session
node_workspace -->|"reads session"| node_session
node_frontend_services -->|"sends requests"| node_api_client
node_api_client -->|"HTTP requests"| node_api
node_api -->|"dispatches auth"| node_auth
node_api -->|"dispatches event and job requests"| node_events_jobs
node_api -->|"dispatches workflow requests"| node_workflow
node_api -->|"dispatches completion requests"| node_completion
node_api -->|"dispatches notification requests"| node_notifications
node_auth -->|"queries and writes"| node_db_service
node_events_jobs -->|"uses database"| node_db_service
node_workflow -->|"uses database"| node_db_service
node_completion -->|"uses database"| node_db_service
node_notifications -->|"uses database"| node_db_service
node_db_service -->|"queries and transacts"| node_postgres

click node_home "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/page.tsx"
click node_register "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/register/page.tsx"
click node_login "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/login/page.tsx"
click node_organizer_events "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/organizer/events/create/page.tsx"
click node_organizer_dashboard "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/organizer/dashboard/page.tsx"
click node_professional_jobs "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/professional/jobs/page.tsx"
click node_professional_dashboard "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/professional/dashboard/page.tsx"
click node_jobs_page "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/jobs/page.tsx"
click node_workspace "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/components/Workspace.tsx"
click node_frontend_services "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/services/eventflex.ts"
click node_api_client "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/lib/api.ts"
click node_session "https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/lib/auth.ts"
click node_api "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/main.ts"
click node_auth "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/auth.ts"
click node_events_jobs "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/events-jobs.ts"
click node_workflow "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/workflow.ts"
click node_completion "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/completion.ts"
click node_notifications "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/notifications.ts"
click node_db_service "https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/database.service.ts"
click node_postgres "https://github.com/anuragahirwar958-prog/anurag/blob/main/database/schema/schema.sql"

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_register,node_login,node_organizer_events,node_organizer_dashboard,node_professional_jobs,node_professional_dashboard,node_jobs_page,node_workspace,node_frontend_services,node_api_client,node_session toneBlue
class node_api,node_auth,node_events_jobs,node_workflow,node_completion,node_notifications,node_db_service toneAmber
class node_postgres toneMint
class node_organizer,node_professional toneIndigo
```

## Components

### Web application

- [Home and discovery](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Registration](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/register/page.tsx): `frontend/app/register/page.tsx`
- [Login](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/login/page.tsx): `frontend/app/login/page.tsx`
- [Organizer events](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/organizer/events/create/page.tsx): `frontend/app/organizer/events/create/page.tsx`
- [Organizer dashboard](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/organizer/dashboard/page.tsx): `frontend/app/organizer/dashboard/page.tsx`
- [Professional jobs](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/professional/jobs/page.tsx): `frontend/app/professional/jobs/page.tsx`
- [Professional dashboard](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/professional/dashboard/page.tsx): `frontend/app/professional/dashboard/page.tsx`
- [Job search](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/app/jobs/page.tsx): `frontend/app/jobs/page.tsx`
- [Role workspace](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/components/Workspace.tsx): `frontend/components/Workspace.tsx`
- [API services](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/services/eventflex.ts): `frontend/services/eventflex.ts`
- [HTTP client](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Session handling](https://github.com/anuragahirwar958-prog/anurag/blob/main/frontend/lib/auth.ts): `frontend/lib/auth.ts`

### Backend API

- [Backend API](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/main.ts): `backend/src/main.ts`
- [Accounts and auth](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/auth.ts): `backend/src/auth.ts`
- [Events and jobs](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/events-jobs.ts): `backend/src/events-jobs.ts`
- [Applications and hiring](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/workflow.ts): `backend/src/workflow.ts`
- [Assignment completion](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/completion.ts): `backend/src/completion.ts`
- [Notifications](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/notifications.ts): `backend/src/notifications.ts`
- [Database access](https://github.com/anuragahirwar958-prog/anurag/blob/main/backend/src/database.service.ts): `backend/src/database.service.ts`

### Persistence

- [EventFlex database](https://github.com/anuragahirwar958-prog/anurag/blob/main/database/schema/schema.sql): `database/schema/schema.sql`

### Other components

- **Organizer**
- **Professional**

## Connections

- Organizer → Registration: creates account
- Professional → Registration: creates account
- Organizer → Login: signs in
- Professional → Login: signs in
- Organizer → Organizer events: creates event
- Organizer → Organizer dashboard: manages hiring
- Professional → Professional jobs: finds work
- Professional → Job search: searches jobs
- Registration → API services: registers via
- Login → API services: authenticates via
- Organizer events → API services: manages events via
- Organizer dashboard → API services: uses API
- Professional jobs → API services: searches and applies via
- Job search → API services: searches via
- Organizer dashboard → Role workspace: uses
- Professional dashboard → Role workspace: uses
- Professional jobs → Role workspace: uses
- Login → Session handling: saves session
- Role workspace → Session handling: reads session
- API services → HTTP client: sends requests
- HTTP client → Backend API: HTTP requests
- Backend API → Accounts and auth: dispatches auth
- Backend API → Events and jobs: dispatches event and job requests
- Backend API → Applications and hiring: dispatches workflow requests
- Backend API → Assignment completion: dispatches completion requests
- Backend API → Notifications: dispatches notification requests
- Accounts and auth → Database access: queries and writes
- Events and jobs → Database access: uses database
- Applications and hiring → Database access: uses database
- Assignment completion → Database access: uses database
- Notifications → Database access: uses database
- Database access → EventFlex database: queries and transacts
