# anuragahirwar958-prog/eventflex architecture

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

## Overview

Eventflex is an event-staffing marketplace: organizers publish events and staffing jobs, while workers can browse live jobs and apply. The visible backend workflow validates requests in tRPC routers and delegates job, event, and application operations to database code. The client exposes a home route and shared API/auth plumbing. The tree also includes map and AI-chat UI and several integration modules, but their runtime wiring is not shown in the sampled source, so those links are left out.

Main entry points: [`server/_core/index.ts`](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/index.ts) (Server entry), [`server/routers.ts`](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/routers.ts) (App router), [`client/src/main.tsx`](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/main.tsx) (tRPC client), [`client/src/pages/Home.tsx`](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/pages/Home.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client application"]
  node_home["Home page<br/>[Home.tsx]"]
  node_map["Map UI<br/>[Map.tsx]"]
  node_ai_chat["AI chat UI<br/>[AIChatBox.tsx]"]
  node_auth_hook["Auth hook<br/>[useAuth.ts]"]
  node_trpc_client["tRPC client<br/>[main.tsx]"]
end

subgraph group_api["API and auth"]
  node_app_router["App router<br/>[routers.ts]"]
  node_server_entry["Server entry<br/>[index.ts]"]
  node_request_context["Request context<br/>[context.ts]"]
  node_oauth["OAuth routes<br/>[oauth.ts]"]
  node_system_router["System router<br/>[systemRouter.ts]"]
  node_notification["Owner notification<br/>[notification.ts]"]
end

subgraph group_domain["Marketplace data"]
  node_db_ops["Marketplace operations<br/>[db.ts]"]
  node_schema["Database schema<br/>[schema.ts]"]
end

node_user(("Marketplace user"))
node_mysql[("MySQL database")]
node_oauth_provider(("OAuth provider"))

node_user -->|"uses"| node_home
node_home -->|"requests data"| node_trpc_client
node_auth_hook -->|"queries auth"| node_trpc_client
node_trpc_client -->|"sends API calls"| node_server_entry
node_server_entry -->|"dispatches API"| node_app_router
node_server_entry -->|"creates context"| node_request_context
node_server_entry -->|"registers routes"| node_oauth
node_oauth -.->|"authenticates"| node_oauth_provider
node_app_router -->|"runs marketplace operations"| node_db_ops
node_db_ops -->|"reads and writes"| node_mysql
node_schema -->|"defines stored data"| node_mysql
node_app_router -->|"mounts system routes"| node_system_router
node_system_router -->|"calls notification"| node_notification

click node_home "https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/pages/Home.tsx"
click node_map "https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/components/Map.tsx"
click node_ai_chat "https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/components/AIChatBox.tsx"
click node_auth_hook "https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/_core/hooks/useAuth.ts"
click node_trpc_client "https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/main.tsx"
click node_app_router "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/routers.ts"
click node_server_entry "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/index.ts"
click node_request_context "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/context.ts"
click node_oauth "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/oauth.ts"
click node_system_router "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/systemRouter.ts"
click node_notification "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/notification.ts"
click node_db_ops "https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/db.ts"
click node_schema "https://github.com/anuragahirwar958-prog/eventflex/blob/main/drizzle/schema.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_home,node_map,node_ai_chat,node_auth_hook,node_trpc_client,node_user toneBlue
class node_app_router,node_server_entry,node_request_context,node_oauth,node_system_router,node_notification,node_mysql toneAmber
class node_db_ops,node_schema toneMint
class node_oauth_provider toneIndigo
```

## Components

### Client application

- [Home page](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`
- [Map UI](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/components/Map.tsx): `client/src/components/Map.tsx`
- [AI chat UI](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/components/AIChatBox.tsx): `client/src/components/AIChatBox.tsx`
- [Auth hook](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/_core/hooks/useAuth.ts): `client/src/_core/hooks/useAuth.ts`
- [tRPC client](https://github.com/anuragahirwar958-prog/eventflex/blob/main/client/src/main.tsx): `client/src/main.tsx`

### API and auth

- [App router](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/routers.ts): `server/routers.ts`
- [Server entry](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/index.ts): `server/_core/index.ts`
- [Request context](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/context.ts): `server/_core/context.ts`
- [OAuth routes](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/oauth.ts): `server/_core/oauth.ts`
- [System router](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/systemRouter.ts): `server/_core/systemRouter.ts`
- [Owner notification](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/_core/notification.ts): `server/_core/notification.ts`

### Marketplace data

- [Marketplace operations](https://github.com/anuragahirwar958-prog/eventflex/blob/main/server/db.ts): `server/db.ts`
- [Database schema](https://github.com/anuragahirwar958-prog/eventflex/blob/main/drizzle/schema.ts): `drizzle/schema.ts`

### Other components

- **Marketplace user**
- **MySQL database**
- **OAuth provider**

## Connections

- Marketplace user → Home page: uses
- Home page → tRPC client: requests data
- Auth hook → tRPC client: queries auth
- tRPC client → Server entry: sends API calls
- Server entry → App router: dispatches API
- Server entry → Request context: creates context
- Server entry → OAuth routes: registers routes
- OAuth routes → OAuth provider: authenticates
- App router → Marketplace operations: runs marketplace operations
- Marketplace operations → MySQL database: reads and writes
- Database schema → MySQL database: defines stored data
- App router → System router: mounts system routes
- System router → Owner notification: calls notification
