# anuragahirwar958-prog/sistec architecture

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

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

## Overview

EventStaff is an event-staffing marketplace connecting organizers who publish events and manage bookings with workers who discover shifts, apply, and track attendance and pay. The React app provides role-specific dashboards, event and worker discovery, profiles, chat, and booking interactions; its API client communicates with a server that uses query logic backed by PostgreSQL or an in-memory fallback. The README gives little product detail, so capabilities are also reflected from the supplied source index and excerpts. Server routing and some unsampled feature wiring remain unverified.

Main entry points: [`src/services/api.ts`](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/services/api.ts) (API client), [`src/App.tsx`](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/App.tsx) (App shell), [`src/pages/OrganizerDashboard.tsx`](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/OrganizerDashboard.tsx) (Organizer dashboard), [`src/pages/WorkerDashboard.tsx`](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/WorkerDashboard.tsx) (Worker dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App shell<br/>[App.tsx]"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_theme["Theme state<br/>[ThemeContext.tsx]"]
  node_notifications["Notifications"]
  node_assistant["AI assistant"]
end

subgraph group_market["Marketplace"]
  node_events["Public events"]
  node_create["Create event"]
  node_workersearch["Worker directory"]
  node_workerprofile["Worker profile"]
  node_organizerprofile["Organizer profile"]
end

subgraph group_booking["Booking Operations"]
  node_orgdash["Organizer dashboard"]
  node_workerdash["Worker dashboard"]
  node_checkin["OTP check-in"]
  node_checkout["Shift checkout<br/>[CheckOutModal.tsx]"]
  node_payment["Payment<br/>[PaymentModal.tsx]"]
  node_bank["Bank transfer"]
  node_review["Reviews<br/>[ReviewModal.tsx]"]
  node_chat["Chat<br/>[ChatCenter.tsx]"]
end

subgraph group_backend["API and Data"]
  node_api["API client<br/>[api.ts]"]
  node_server["HTTP server<br/>[server.ts]"]
  node_middleware["Auth middleware<br/>[auth.ts]"]
  node_queries["Domain queries<br/>[queries.ts]"]
  node_pg[("PostgreSQL<br/>[index.ts]")]
  node_memory[("Memory fallback<br/>[memoryStore.ts]")]
  node_schema["Data schema<br/>[schema.ts]"]
end

node_user(("Organizer or worker"))

node_user -->|"uses"| node_app
node_app -->|"provides state"| node_auth
node_app -->|"provides state"| node_theme
node_app -->|"renders"| node_events
node_app -->|"renders"| node_orgdash
node_app -->|"renders"| node_workerdash
node_app -->|"renders"| node_workersearch
node_app -->|"opens"| node_create
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_assistant
node_auth -->|"calls"| node_api
node_auth -->|"supplies state"| node_notifications
node_events -->|"loads and applies"| node_api
node_create -->|"creates event"| node_api
node_workersearch -.->|"searches workers"| node_api
node_workersearch -->|"opens profile"| node_workerprofile
node_events -.->|"opens profile"| node_organizerprofile
node_events -.->|"opens profile"| node_workerprofile
node_orgdash -->|"loads and manages"| node_api
node_workerdash -.->|"loads bookings"| node_api
node_orgdash -->|"opens"| node_checkin
node_orgdash -->|"opens"| node_checkout
node_orgdash -->|"opens"| node_payment
node_orgdash -->|"opens"| node_review
node_workerdash -->|"opens"| node_checkin
node_workerdash -->|"opens"| node_checkout
node_workerdash -->|"opens"| node_review
node_workerdash -->|"opens"| node_bank
node_checkin -->|"verifies OTP"| node_api
node_checkout -->|"submits checkout"| node_api
node_payment -.->|"processes payment"| node_api
node_review -->|"submits review"| node_api
node_chat -->|"loads chat"| node_api
node_assistant -.->|"requests assistance"| node_api
node_api -.->|"sends HTTP requests"| node_server
node_server -->|"uses auth"| node_middleware
node_server -->|"calls domain queries"| node_queries
node_queries -->|"queries database"| node_pg
node_queries -->|"falls back"| node_memory
node_queries -->|"uses schema"| node_schema
node_pg -->|"configures ORM"| node_schema

click node_app "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/App.tsx"
click node_auth "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/context/AuthContext.tsx"
click node_theme "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/context/ThemeContext.tsx"
click node_events "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/PublicEventsPage.tsx"
click node_create "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/CreateEventModal.tsx"
click node_workersearch "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/WorkerSearchPage.tsx"
click node_workerprofile "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/WorkerProfileModal.tsx"
click node_organizerprofile "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/OrganizerProfileModal.tsx"
click node_orgdash "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/OrganizerDashboard.tsx"
click node_workerdash "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/WorkerDashboard.tsx"
click node_checkin "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/OtpCheckinModal.tsx"
click node_checkout "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/CheckOutModal.tsx"
click node_payment "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/PaymentModal.tsx"
click node_bank "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/BankTransferModal.tsx"
click node_review "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/ReviewModal.tsx"
click node_chat "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/ChatCenter.tsx"
click node_notifications "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/NotificationDropdown.tsx"
click node_assistant "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/AiAssistantWidget.tsx"
click node_api "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/services/api.ts"
click node_server "https://github.com/anuragahirwar958-prog/sistec/blob/main/server.ts"
click node_middleware "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/middleware/auth.ts"
click node_queries "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/queries.ts"
click node_pg "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/index.ts"
click node_memory "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/memoryStore.ts"
click node_schema "https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/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_app,node_auth,node_theme,node_notifications,node_assistant toneBlue
class node_events,node_create,node_workersearch,node_workerprofile,node_organizerprofile toneAmber
class node_orgdash,node_workerdash,node_checkin,node_checkout,node_payment,node_bank,node_review,node_chat toneMint
class node_api,node_server,node_middleware,node_queries,node_pg,node_memory,node_schema,node_user toneRose
```

## Components

### Application

- [App shell](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication state](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Theme state](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/context/ThemeContext.tsx): `src/context/ThemeContext.tsx`
- [Notifications](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/NotificationDropdown.tsx): `src/components/NotificationDropdown.tsx`
- [AI assistant](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/AiAssistantWidget.tsx): `src/components/AiAssistantWidget.tsx`

### Marketplace

- [Public events](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/PublicEventsPage.tsx): `src/pages/PublicEventsPage.tsx`
- [Create event](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/CreateEventModal.tsx): `src/components/CreateEventModal.tsx`
- [Worker directory](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/WorkerSearchPage.tsx): `src/pages/WorkerSearchPage.tsx`
- [Worker profile](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/WorkerProfileModal.tsx): `src/components/WorkerProfileModal.tsx`
- [Organizer profile](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/OrganizerProfileModal.tsx): `src/components/OrganizerProfileModal.tsx`

### Booking Operations

- [Organizer dashboard](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/OrganizerDashboard.tsx): `src/pages/OrganizerDashboard.tsx`
- [Worker dashboard](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/pages/WorkerDashboard.tsx): `src/pages/WorkerDashboard.tsx`
- [OTP check-in](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/OtpCheckinModal.tsx): `src/components/OtpCheckinModal.tsx`
- [Shift checkout](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/CheckOutModal.tsx): `src/components/CheckOutModal.tsx`
- [Payment](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/PaymentModal.tsx): `src/components/PaymentModal.tsx`
- [Bank transfer](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/BankTransferModal.tsx): `src/components/BankTransferModal.tsx`
- [Reviews](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/ReviewModal.tsx): `src/components/ReviewModal.tsx`
- [Chat](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/components/ChatCenter.tsx): `src/components/ChatCenter.tsx`

### API and Data

- [API client](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/services/api.ts): `src/services/api.ts`
- [HTTP server](https://github.com/anuragahirwar958-prog/sistec/blob/main/server.ts): `server.ts`
- [Auth middleware](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/middleware/auth.ts): `src/middleware/auth.ts`
- [Domain queries](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/queries.ts): `src/db/queries.ts`
- [PostgreSQL](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/index.ts): `src/db/index.ts`
- [Memory fallback](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/memoryStore.ts): `src/db/memoryStore.ts`
- [Data schema](https://github.com/anuragahirwar958-prog/sistec/blob/main/src/db/schema.ts): `src/db/schema.ts`

### Other components

- **Organizer or worker**

## Connections

- Organizer or worker → App shell: uses (evidence: `src/App.tsx`)
- App shell → Authentication state: provides state (evidence: `src/App.tsx`)
- App shell → Theme state: provides state (evidence: `src/App.tsx`)
- App shell → Public events: renders (evidence: `src/App.tsx`)
- App shell → Organizer dashboard: renders (evidence: `src/App.tsx`)
- App shell → Worker dashboard: renders (evidence: `src/App.tsx`)
- App shell → Worker directory: renders (evidence: `src/App.tsx`)
- App shell → Create event: opens (evidence: `src/App.tsx`)
- App shell → Chat: renders (evidence: `src/App.tsx`)
- App shell → AI assistant: renders (evidence: `src/App.tsx`)
- Authentication state → API client: calls (evidence: `src/context/AuthContext.tsx`)
- Authentication state → Notifications: supplies state (evidence: `src/context/AuthContext.tsx`)
- Public events → API client: loads and applies (evidence: `src/pages/PublicEventsPage.tsx`)
- Create event → API client: creates event (evidence: `src/components/CreateEventModal.tsx`)
- Worker directory → API client: searches workers (evidence: `src/pages/WorkerSearchPage.tsx`)
- Worker directory → Worker profile: opens profile (evidence: `src/pages/WorkerSearchPage.tsx`)
- Public events → Organizer profile: opens profile (evidence: `src/pages/PublicEventsPage.tsx`)
- Public events → Worker profile: opens profile (evidence: `src/pages/PublicEventsPage.tsx`)
- Organizer dashboard → API client: loads and manages (evidence: `src/pages/OrganizerDashboard.tsx`)
- Worker dashboard → API client: loads bookings (evidence: `src/pages/WorkerDashboard.tsx`)
- Organizer dashboard → OTP check-in: opens (evidence: `src/pages/OrganizerDashboard.tsx`)
- Organizer dashboard → Shift checkout: opens (evidence: `src/pages/OrganizerDashboard.tsx`)
- Organizer dashboard → Payment: opens (evidence: `src/pages/OrganizerDashboard.tsx`)
- Organizer dashboard → Reviews: opens (evidence: `src/pages/OrganizerDashboard.tsx`)
- Worker dashboard → OTP check-in: opens (evidence: `src/pages/WorkerDashboard.tsx`)
- Worker dashboard → Shift checkout: opens (evidence: `src/pages/WorkerDashboard.tsx`)
- Worker dashboard → Reviews: opens (evidence: `src/pages/WorkerDashboard.tsx`)
- Worker dashboard → Bank transfer: opens (evidence: `src/pages/WorkerDashboard.tsx`)
- OTP check-in → API client: verifies OTP (evidence: `src/components/OtpCheckinModal.tsx`)
- Shift checkout → API client: submits checkout (evidence: `src/components/CheckOutModal.tsx`)
- Payment → API client: processes payment (evidence: `src/components/PaymentModal.tsx`)
- Reviews → API client: submits review (evidence: `src/components/ReviewModal.tsx`)
- Chat → API client: loads chat (evidence: `src/components/ChatCenter.tsx`)
- AI assistant → API client: requests assistance (evidence: `src/components/AiAssistantWidget.tsx`)
- API client → HTTP server: sends HTTP requests
- HTTP server → Auth middleware: uses auth (evidence: `server.ts`)
- HTTP server → Domain queries: calls domain queries (evidence: `server.ts`)
- Domain queries → PostgreSQL: queries database (evidence: `src/db/queries.ts`)
- Domain queries → Memory fallback: falls back (evidence: `src/db/queries.ts`)
- Domain queries → Data schema: uses schema (evidence: `src/db/queries.ts`)
- PostgreSQL → Data schema: configures ORM (evidence: `src/db/index.ts`)
