# ikrishagarwal/technika-server architecture

> Architecture diagram of the GitHub repository ikrishagarwal/technika-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ikrishagarwal/technika-server
- Repository: https://github.com/ikrishagarwal/technika-server

## Overview

Technika 25 Server is a Fastify API for event and attendee transactions. Users authenticate, then register or book accommodation, alumni, delegate, event, or merchandise offerings; the server persists records in Firebase and uses TiQR for bookings and payment details. Payment-provider webhooks reconcile payment status. The graph preserves documented legacy and testing endpoints plus the deprecated WebSocket plugin. Relationships are based on excerpts, the SOURCE INDEX, and README; several route implementations were not excerpted, so their documented capabilities are shown without speculative internal flows.

Main entry points: [`src/app.ts`](https://github.com/ikrishagarwal/technika-server/blob/main/src/app.ts) (Fastify App), [`src/lib/firebase.ts`](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/firebase.ts) (Firebase Access), [`src/lib/tiqr.ts`](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/tiqr.ts) (TiQR Client), [`src/lib/auth.ts`](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/auth.ts) (Token Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API Runtime"]
  node_server["Server Startup<br/>[server.ts]"]
  node_app["Fastify App<br/>[app.ts]"]
  node_websocket["WebSocket Plugin<br/>[websocket.ts]"]
end

subgraph group_registration["Registration Workflows"]
  node_accommodation["Accommodation<br/>[accommodation.ts]"]
  node_alumni["Alumni Registration<br/>[alumni.ts]"]
  node_delegate["Delegate Registration<br/>[delegate.ts]"]
  node_events["Event Booking<br/>[event.ts]"]
end

subgraph group_commerce["Booking and Commerce"]
  node_merch["Merch Orders<br/>[merch.ts]"]
  node_legacy_book["Legacy Ticket Booking<br/>[book.ts]"]
  node_booking_proxy["Booking Proxy<br/>[booking.ts]"]
  node_ticket_list["Ticket Listing<br/>[list.ts]"]
end

subgraph group_services["Identity and Integrations"]
  node_auth["Token Validation<br/>[auth.ts]"]
  node_firebase["Firebase Access<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
  node_tiqr["TiQR Client<br/>[tiqr.ts]"]
end

subgraph group_operations["Payment Operations"]
  node_webhook["Payment Webhook<br/>[webhook.ts]"]
  node_sentry["Error Monitoring<br/>[sentry.ts]"]
end

node_client(("API Client"))
node_tiqr_service["TiQR Service"]
node_payment_service["Payment Provider"]

node_client -->|"sends requests"| node_app
node_server -->|"starts"| node_app
node_server -->|"initializes"| node_firebase
node_app -->|"registers routes"| node_accommodation
node_app -->|"registers routes"| node_alumni
node_app -->|"registers routes"| node_delegate
node_app -->|"registers routes"| node_events
node_app -->|"registers routes"| node_merch
node_app -->|"registers routes"| node_legacy_book
node_app -->|"registers routes"| node_booking_proxy
node_app -->|"registers routes"| node_ticket_list
node_app -->|"registers routes"| node_webhook
node_app -->|"registers plugin"| node_websocket
node_app -->|"reports errors"| node_sentry
node_accommodation -->|"validates token"| node_auth
node_alumni -->|"validates token"| node_auth
node_delegate -->|"validates token"| node_auth
node_events -->|"validates token"| node_auth
node_merch -->|"validates token"| node_auth
node_legacy_book -->|"validates token"| node_auth
node_booking_proxy -->|"validates token"| node_auth
node_auth -->|"verifies tokens"| node_firebase
node_accommodation -->|"reads and writes"| node_firebase
node_alumni -->|"reads and writes"| node_firebase
node_delegate -->|"reads and writes"| node_firebase
node_events -->|"reads and writes"| node_firebase
node_merch -->|"reads and writes"| node_firebase
node_legacy_book -->|"reads and writes"| node_firebase
node_booking_proxy -->|"accesses data"| node_firebase
node_ticket_list -->|"reads data"| node_firebase
node_webhook -->|"updates payment status"| node_firebase
node_firebase -->|"accesses"| node_firestore
node_accommodation -->|"requests bookings"| node_tiqr
node_alumni -->|"requests bookings"| node_tiqr
node_delegate -->|"requests bookings"| node_tiqr
node_events -->|"requests bookings"| node_tiqr
node_merch -->|"requests bookings"| node_tiqr
node_legacy_book -->|"requests bookings"| node_tiqr
node_booking_proxy -->|"requests booking data"| node_tiqr
node_webhook -->|"fetches booking"| node_tiqr
node_tiqr -->|"calls API"| node_tiqr_service
node_payment_service -->|"sends status updates"| node_webhook
node_app -->|"configures monitoring"| node_sentry

click node_server "https://github.com/ikrishagarwal/technika-server/blob/main/src/server.ts"
click node_app "https://github.com/ikrishagarwal/technika-server/blob/main/src/app.ts"
click node_websocket "https://github.com/ikrishagarwal/technika-server/blob/main/src/plugins/websocket.ts"
click node_accommodation "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/accommodation.ts"
click node_alumni "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/alumni.ts"
click node_delegate "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/delegate.ts"
click node_events "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/event.ts"
click node_merch "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/merch.ts"
click node_legacy_book "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/book.ts"
click node_booking_proxy "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/booking.ts"
click node_ticket_list "https://github.com/ikrishagarwal/technika-server/blob/main/src/list.ts"
click node_auth "https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/auth.ts"
click node_firebase "https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/firebase.ts"
click node_tiqr "https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/tiqr.ts"
click node_webhook "https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/webhook.ts"
click node_sentry "https://github.com/ikrishagarwal/technika-server/blob/main/src/sentry.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_server,node_app,node_websocket,node_client toneBlue
class node_accommodation,node_alumni,node_delegate,node_events toneAmber
class node_merch,node_legacy_book,node_booking_proxy,node_ticket_list toneMint
class node_auth,node_firebase,node_firestore,node_tiqr toneRose
class node_webhook,node_sentry,node_tiqr_service,node_payment_service toneIndigo
```

## Components

### API Runtime

- [Server Startup](https://github.com/ikrishagarwal/technika-server/blob/main/src/server.ts): `src/server.ts`
- [Fastify App](https://github.com/ikrishagarwal/technika-server/blob/main/src/app.ts): `src/app.ts`
- [WebSocket Plugin](https://github.com/ikrishagarwal/technika-server/blob/main/src/plugins/websocket.ts): `src/plugins/websocket.ts`

### Registration Workflows

- [Accommodation](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/accommodation.ts): `src/routes/accommodation.ts`
- [Alumni Registration](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/alumni.ts): `src/routes/alumni.ts`
- [Delegate Registration](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/delegate.ts): `src/routes/delegate.ts`
- [Event Booking](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/event.ts): `src/routes/event.ts`

### Booking and Commerce

- [Merch Orders](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/merch.ts): `src/routes/merch.ts`
- [Legacy Ticket Booking](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/book.ts): `src/routes/book.ts`
- [Booking Proxy](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/booking.ts): `src/routes/booking.ts`
- [Ticket Listing](https://github.com/ikrishagarwal/technika-server/blob/main/src/list.ts): `src/list.ts`

### Identity and Integrations

- [Token Validation](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Firebase Access](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- **Firestore**
- [TiQR Client](https://github.com/ikrishagarwal/technika-server/blob/main/src/lib/tiqr.ts): `src/lib/tiqr.ts`

### Payment Operations

- [Payment Webhook](https://github.com/ikrishagarwal/technika-server/blob/main/src/routes/webhook.ts): `src/routes/webhook.ts`
- [Error Monitoring](https://github.com/ikrishagarwal/technika-server/blob/main/src/sentry.ts): `src/sentry.ts`

### Other components

- **API Client**
- **TiQR Service**
- **Payment Provider**

## Connections

- API Client → Fastify App: sends requests (evidence: `README.md`)
- Server Startup → Fastify App: starts (evidence: `src/server.ts`)
- Server Startup → Firebase Access: initializes (evidence: `src/server.ts`)
- Fastify App → Accommodation: registers routes (evidence: `src/app.ts`)
- Fastify App → Alumni Registration: registers routes (evidence: `src/app.ts`)
- Fastify App → Delegate Registration: registers routes (evidence: `src/app.ts`)
- Fastify App → Event Booking: registers routes (evidence: `src/app.ts`)
- Fastify App → Merch Orders: registers routes (evidence: `src/app.ts`)
- Fastify App → Legacy Ticket Booking: registers routes (evidence: `src/app.ts`)
- Fastify App → Booking Proxy: registers routes (evidence: `src/app.ts`)
- Fastify App → Ticket Listing: registers routes (evidence: `src/app.ts`)
- Fastify App → Payment Webhook: registers routes (evidence: `src/app.ts`)
- Fastify App → WebSocket Plugin: registers plugin (evidence: `src/app.ts`)
- Fastify App → Error Monitoring: reports errors (evidence: `src/app.ts`)
- Accommodation → Token Validation: validates token (evidence: `src/routes/accommodation.ts`)
- Alumni Registration → Token Validation: validates token (evidence: `src/routes/alumni.ts`)
- Delegate Registration → Token Validation: validates token (evidence: `src/routes/delegate.ts`)
- Event Booking → Token Validation: validates token (evidence: `src/routes/event.ts`)
- Merch Orders → Token Validation: validates token (evidence: `src/routes/merch.ts`)
- Legacy Ticket Booking → Token Validation: validates token (evidence: `src/routes/book.ts`)
- Booking Proxy → Token Validation: validates token (evidence: `src/routes/booking.ts`)
- Token Validation → Firebase Access: verifies tokens (evidence: `src/lib/auth.ts`)
- Accommodation → Firebase Access: reads and writes (evidence: `src/routes/accommodation.ts`)
- Alumni Registration → Firebase Access: reads and writes (evidence: `src/routes/alumni.ts`)
- Delegate Registration → Firebase Access: reads and writes (evidence: `src/routes/delegate.ts`)
- Event Booking → Firebase Access: reads and writes (evidence: `src/routes/event.ts`)
- Merch Orders → Firebase Access: reads and writes (evidence: `src/routes/merch.ts`)
- Legacy Ticket Booking → Firebase Access: reads and writes (evidence: `src/routes/book.ts`)
- Booking Proxy → Firebase Access: accesses data (evidence: `src/routes/booking.ts`)
- Ticket Listing → Firebase Access: reads data (evidence: `src/list.ts`)
- Payment Webhook → Firebase Access: updates payment status (evidence: `src/routes/webhook.ts`)
- Firebase Access → Firestore: accesses (evidence: `src/lib/firebase.ts`)
- Accommodation → TiQR Client: requests bookings (evidence: `src/routes/accommodation.ts`)
- Alumni Registration → TiQR Client: requests bookings (evidence: `src/routes/alumni.ts`)
- Delegate Registration → TiQR Client: requests bookings (evidence: `src/routes/delegate.ts`)
- Event Booking → TiQR Client: requests bookings (evidence: `src/routes/event.ts`)
- Merch Orders → TiQR Client: requests bookings (evidence: `src/routes/merch.ts`)
- Legacy Ticket Booking → TiQR Client: requests bookings (evidence: `src/routes/book.ts`)
- Booking Proxy → TiQR Client: requests booking data (evidence: `src/routes/booking.ts`)
- Payment Webhook → TiQR Client: fetches booking (evidence: `src/routes/webhook.ts`)
- TiQR Client → TiQR Service: calls API (evidence: `src/lib/tiqr.ts`)
- Payment Provider → Payment Webhook: sends status updates (evidence: `README.md`)
- Fastify App → Error Monitoring: configures monitoring (evidence: `src/app.ts`)
