# tigrannnn/event-space architecture

> Architecture diagram of the GitHub repository tigrannnn/event-space, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tigrannnn/event-space
- Repository: https://github.com/tigrannnn/event-space

## Overview

Event Space is a multilingual tour-booking platform: customers discover events, book dates, pay or manage bookings, and leave reviews; operators publish inventory and manage bookings, money, and customer activity. The web app is the customer and operator interface, the NestJS API owns domain operations, and shared schemas provide contracts. The README documents broad product flows; source excerpts and the index support selected API call edges. Many web-to-API routes and unsampled subsystems are not shown, so those links are omitted rather than inferred.

Main entry points: [`apps/api/src/infrastructure/prisma/prisma.service.ts`](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/prisma/prisma.service.ts) (Database access), [`apps/api/src/modules/booking/booking.controller.ts`](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/booking.controller.ts) (Booking operations), [`apps/api/src/modules/booking/use-cases/booking-query.service.ts`](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/use-cases/booking-query.service.ts) (Booking queries), [`apps/api/src/modules/review/review.service.ts`](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/review/review.service.ts) (Review management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Customer experience"]
  node_web_catalog["Catalog and event pages<br/>[page.tsx]"]
  node_web_search["Search experience<br/>[useSearchBox.ts]"]
  node_web_booking["Booking pages"]
  node_web_reviews["Review experience<br/>[useReviews.ts]"]
end

subgraph group_operations["Operator console"]
  node_web_admin["Admin console<br/>[page.tsx]"]
end

subgraph group_api["API domain services"]
  node_event_api["Event catalog and publishing<br/>[event.service.ts]"]
  node_search_api["Search service<br/>[search.service.ts]"]
  node_booking_api["Booking operations"]
  node_booking_query["Booking queries"]
  node_review_api["Review management<br/>[review.service.ts]"]
  node_review_routes["Review endpoints"]
  node_admin_routes["Admin endpoints"]
  node_admin_bookings["Admin bookings"]
  node_admin_dashboard["Dashboard analytics"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
end

subgraph group_infrastructure["Platform infrastructure"]
  node_stripe["Stripe payments<br/>[stripe.service.ts]"]
  node_prisma["Database access<br/>[prisma.service.ts]"]
  node_mail["Email delivery<br/>[mail.service.ts]"]
end

subgraph group_contracts["Shared contracts"]
  node_shared["Shared schemas<br/>[review.schema.ts]"]
end

node_customer(("Customer"))
node_operator(("Operator"))
node_postgres[("PostgreSQL")]

node_customer -->|"browses"| node_web_catalog
node_customer -->|"books and manages"| node_web_booking
node_customer -->|"submits reviews"| node_web_reviews
node_operator -->|"manages platform"| node_web_admin
node_web_search -.->|"requests search"| node_search_api
node_web_catalog -.->|"loads events"| node_event_api
node_web_booking -.->|"manages bookings"| node_booking_api
node_web_reviews -.->|"sends review requests"| node_review_routes
node_event_api -.->|"reads and writes"| node_prisma
node_search_api -.->|"queries events"| node_prisma
node_booking_api -->|"delegates queries"| node_booking_query
node_booking_query -->|"reads bookings"| node_prisma
node_booking_query -->|"uses contracts"| node_shared
node_review_routes -->|"routes review actions"| node_review_api
node_review_api -->|"reads and updates"| node_prisma
node_review_api -->|"uses review rules"| node_shared
node_admin_routes -->|"routes booking admin"| node_admin_bookings
node_admin_routes -->|"routes dashboard queries"| node_admin_dashboard
node_admin_bookings -.->|"queries bookings"| node_prisma
node_admin_dashboard -.->|"aggregates activity"| node_prisma
node_auth_service -.->|"persists accounts"| node_prisma
node_booking_api -.->|"processes payments"| node_stripe
node_booking_api -.->|"sends confirmations"| node_mail
node_prisma -.->|"stores data"| node_postgres

click node_web_catalog "https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/(home)/page.tsx"
click node_web_search "https://github.com/tigrannnn/event-space/blob/main/apps/web/src/features/search/hooks/useSearchBox.ts"
click node_web_booking "https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/bookings/BookingsPageContent.tsx"
click node_web_reviews "https://github.com/tigrannnn/event-space/blob/main/apps/web/src/features/reviews/hooks/useReviews.ts"
click node_web_admin "https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/admin/dashboard/page.tsx"
click node_event_api "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/event/event.service.ts"
click node_search_api "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/search/search.service.ts"
click node_booking_api "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/booking.controller.ts"
click node_booking_query "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/use-cases/booking-query.service.ts"
click node_review_api "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/review/review.service.ts"
click node_review_routes "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/review/review.controller.ts"
click node_admin_routes "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/admin.controller.ts"
click node_admin_bookings "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/bookings/admin-bookings.service.ts"
click node_admin_dashboard "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/dashboard/dashboard-revenue.service.ts"
click node_auth_service "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_stripe "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/stripe/stripe.service.ts"
click node_prisma "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/prisma/prisma.service.ts"
click node_mail "https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/mail/mail.service.ts"
click node_shared "https://github.com/tigrannnn/event-space/blob/main/packages/shared/src/schemas/review.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_web_catalog,node_web_search,node_web_booking,node_web_reviews toneBlue
class node_web_admin,node_postgres toneAmber
class node_event_api,node_search_api,node_booking_api,node_booking_query,node_review_api,node_review_routes,node_admin_routes,node_admin_bookings,node_admin_dashboard,node_auth_service toneMint
class node_stripe,node_prisma,node_mail toneRose
class node_shared,node_customer,node_operator toneIndigo
```

## Components

### Customer experience

- [Catalog and event pages](https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/(home)/page.tsx): `apps/web/src/app/[locale]/(home)/page.tsx`
- [Search experience](https://github.com/tigrannnn/event-space/blob/main/apps/web/src/features/search/hooks/useSearchBox.ts): `apps/web/src/features/search/hooks/useSearchBox.ts`
- [Booking pages](https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/bookings/BookingsPageContent.tsx): `apps/web/src/app/[locale]/bookings/BookingsPageContent.tsx`
- [Review experience](https://github.com/tigrannnn/event-space/blob/main/apps/web/src/features/reviews/hooks/useReviews.ts): `apps/web/src/features/reviews/hooks/useReviews.ts`

### Operator console

- [Admin console](https://github.com/tigrannnn/event-space/blob/main/apps/web/src/app/%5Blocale%5D/admin/dashboard/page.tsx): `apps/web/src/app/[locale]/admin/dashboard/page.tsx`

### API domain services

- [Event catalog and publishing](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/event/event.service.ts): `apps/api/src/modules/event/event.service.ts`
- [Search service](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/search/search.service.ts): `apps/api/src/modules/search/search.service.ts`
- [Booking operations](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/booking.controller.ts): `apps/api/src/modules/booking/booking.controller.ts`
- [Booking queries](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/booking/use-cases/booking-query.service.ts): `apps/api/src/modules/booking/use-cases/booking-query.service.ts`
- [Review management](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/review/review.service.ts): `apps/api/src/modules/review/review.service.ts`
- [Review endpoints](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/review/review.controller.ts): `apps/api/src/modules/review/review.controller.ts`
- [Admin endpoints](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/admin.controller.ts): `apps/api/src/modules/admin/admin.controller.ts`
- [Admin bookings](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/bookings/admin-bookings.service.ts): `apps/api/src/modules/admin/bookings/admin-bookings.service.ts`
- [Dashboard analytics](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/admin/dashboard/dashboard-revenue.service.ts): `apps/api/src/modules/admin/dashboard/dashboard-revenue.service.ts`
- [Authentication](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`

### Platform infrastructure

- [Stripe payments](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/stripe/stripe.service.ts): `apps/api/src/infrastructure/stripe/stripe.service.ts`
- [Database access](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/prisma/prisma.service.ts): `apps/api/src/infrastructure/prisma/prisma.service.ts`
- [Email delivery](https://github.com/tigrannnn/event-space/blob/main/apps/api/src/infrastructure/mail/mail.service.ts): `apps/api/src/infrastructure/mail/mail.service.ts`

### Shared contracts

- [Shared schemas](https://github.com/tigrannnn/event-space/blob/main/packages/shared/src/schemas/review.schema.ts): `packages/shared/src/schemas/review.schema.ts`

### Other components

- **Customer**
- **Operator**
- **PostgreSQL**

## Connections

- Customer → Catalog and event pages: browses (evidence: `README.md`)
- Customer → Booking pages: books and manages (evidence: `README.md`)
- Customer → Review experience: submits reviews (evidence: `README.md`)
- Operator → Admin console: manages platform (evidence: `README.md`)
- Search experience → Search service: requests search
- Catalog and event pages → Event catalog and publishing: loads events
- Booking pages → Booking operations: manages bookings
- Review experience → Review endpoints: sends review requests
- Event catalog and publishing → Database access: reads and writes
- Search service → Database access: queries events
- Booking operations → Booking queries: delegates queries (evidence: `apps/api/src/modules/booking/booking.controller.ts`)
- Booking queries → Database access: reads bookings (evidence: `apps/api/src/modules/booking/use-cases/booking-query.service.ts`)
- Booking queries → Shared schemas: uses contracts (evidence: `apps/api/src/modules/booking/use-cases/booking-query.service.ts`)
- Review endpoints → Review management: routes review actions (evidence: `apps/api/src/modules/review/review.controller.ts`)
- Review management → Database access: reads and updates (evidence: `apps/api/src/modules/review/review.service.ts`)
- Review management → Shared schemas: uses review rules (evidence: `apps/api/src/modules/review/review.service.ts`)
- Admin endpoints → Admin bookings: routes booking admin (evidence: `apps/api/src/modules/admin/admin.controller.ts`)
- Admin endpoints → Dashboard analytics: routes dashboard queries (evidence: `apps/api/src/modules/admin/admin.controller.ts`)
- Admin bookings → Database access: queries bookings
- Dashboard analytics → Database access: aggregates activity
- Authentication → Database access: persists accounts
- Booking operations → Stripe payments: processes payments
- Booking operations → Email delivery: sends confirmations
- Database access → PostgreSQL: stores data
