# zoltannyiri/turazzvelunk architecture

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

- Interactive diagram: https://gitdiagram.com/zoltannyiri/turazzvelunk
- Repository: https://github.com/zoltannyiri/turazzvelunk

## Overview

Turazzvelunk is a tour discovery and booking platform with accounts, tour management, bookings and waitlists, payments, equipment allocation, editorial content, and notifications. Users enter through the React application; the Express server mounts API routes, which dispatch to domain controllers. Sampled controllers persist through the shared database, while booking and payment operations also trigger notifications or external payment handling. The README is only the default Vite template, and several screens and controllers were not sampled, so their internal calls are not shown.

Main entry points: [`backend/server.js`](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/server.js) (HTTP and socket server), [`src/App.jsx`](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/App.jsx) (Application router), [`backend/config/db.js`](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/config/db.js) (Application database), [`backend/services/emailService.js`](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/emailService.js) (Email and notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Application router<br/>[App.jsx]"]
  node_tour_ui["Tour discovery"]
  node_tour_detail_ui["Tour details"]
  node_booking_ui["Calendar and bookings<br/>[CalendarScreen.jsx]"]
  node_account_ui["Account and admin<br/>[ProfileScreen.jsx]"]
  node_content_ui["Blog and contact<br/>[BlogScreen.jsx]"]
end

subgraph group_api["API and domain"]
  node_server["HTTP and socket server<br/>[server.js]"]
  node_auth_routes["Authentication routes<br/>[authRoutes.js]"]
  node_auth_controller["Account operations<br/>[authController.js]"]
  node_tour_routes["Tour routes<br/>[tourRoutes.js]"]
  node_tour_controller["Tour operations<br/>[tourController.js]"]
  node_booking_routes["Booking routes<br/>[bookingRoutes.js]"]
  node_booking_controller["Booking operations"]
  node_payment_routes["Payment routes<br/>[paymentRoutes.js]"]
  node_payment_controller["Payment operations"]
  node_content_routes["Editorial routes<br/>[blogRoutes.js]"]
  node_content_controller["Editorial operations<br/>[blogController.js]"]
  node_other_routes["Other domain routes"]
end

subgraph group_services["Shared services"]
  node_db[("Application database<br/>[db.js]")]
  node_email["Email and notifications<br/>[emailService.js]"]
  node_socket["Realtime socket service<br/>[socketService.js]"]
  node_expiry["Booking expiration"]
end

subgraph group_external["External systems"]
  node_stripe["Stripe payments"]
  node_mail_provider["Email delivery"]
end

node_visitor(("Visitor or user"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_tour_ui
node_app -->|"routes to"| node_tour_detail_ui
node_app -->|"routes to"| node_booking_ui
node_app -->|"routes to"| node_account_ui
node_app -->|"routes to"| node_content_ui
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_tour_routes
node_server -->|"mounts"| node_booking_routes
node_server -->|"mounts"| node_payment_routes
node_server -->|"mounts"| node_content_routes
node_server -->|"mounts"| node_other_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_booking_routes -->|"dispatches"| node_booking_controller
node_content_routes -->|"dispatches"| node_content_controller
node_auth_controller -->|"reads and writes"| node_db
node_tour_controller -->|"reads and writes"| node_db
node_booking_controller -->|"reads and writes"| node_db
node_payment_controller -->|"reads and writes"| node_db
node_content_controller -->|"reads and writes"| node_db
node_payment_routes -->|"dispatches"| node_payment_controller
node_payment_controller -->|"creates and checks sessions"| node_stripe
node_stripe -->|"sends webhook"| node_server
node_payment_controller -->|"requests notifications"| node_email
node_auth_controller -->|"requests account mail"| node_email
node_email -->|"queries recipients"| node_db
node_email -->|"sends mail"| node_mail_provider
node_booking_controller -->|"requests booking mail"| node_email
node_booking_controller -->|"emits tour events"| node_server
node_server -->|"sets socket server"| node_socket
node_server -->|"validates notification users"| node_db
node_server -->|"starts job"| node_expiry
node_tour_controller -->|"expires stale bookings"| node_expiry

click node_app "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/App.jsx"
click node_tour_ui "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/toursearchscreen/TourSearchScreen.jsx"
click node_tour_detail_ui "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/tourdetailsscreen/TourDetailsScreen.jsx"
click node_booking_ui "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/calendarscreen/CalendarScreen.jsx"
click node_account_ui "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/profilescreen/ProfileScreen.jsx"
click node_content_ui "https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/blogscreen/BlogScreen.jsx"
click node_server "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/server.js"
click node_auth_routes "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/authRoutes.js"
click node_auth_controller "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/authController.js"
click node_tour_routes "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/tourRoutes.js"
click node_tour_controller "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/tourController.js"
click node_booking_routes "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/bookingRoutes.js"
click node_booking_controller "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/bookingController.js"
click node_payment_routes "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/paymentRoutes.js"
click node_payment_controller "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/paymentController.js"
click node_content_routes "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/blogRoutes.js"
click node_content_controller "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/blogController.js"
click node_other_routes "https://github.com/zoltannyiri/turazzvelunk/tree/main/backend/routes"
click node_db "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/config/db.js"
click node_email "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/emailService.js"
click node_socket "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/socketService.js"
click node_expiry "https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/bookingExpirationService.js"

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_tour_ui,node_tour_detail_ui,node_booking_ui,node_account_ui,node_content_ui,node_visitor toneBlue
class node_server,node_auth_routes,node_auth_controller,node_tour_routes,node_tour_controller,node_booking_routes,node_booking_controller,node_payment_routes,node_payment_controller,node_content_routes,node_content_controller,node_other_routes toneAmber
class node_db,node_email,node_socket,node_expiry toneMint
class node_stripe,node_mail_provider toneRose
```

## Components

### Web application

- [Application router](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/App.jsx): `src/App.jsx`
- [Tour discovery](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/toursearchscreen/TourSearchScreen.jsx): `src/screens/toursearchscreen/TourSearchScreen.jsx`
- [Tour details](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/tourdetailsscreen/TourDetailsScreen.jsx): `src/screens/tourdetailsscreen/TourDetailsScreen.jsx`
- [Calendar and bookings](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/calendarscreen/CalendarScreen.jsx): `src/screens/calendarscreen/CalendarScreen.jsx`
- [Account and admin](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/profilescreen/ProfileScreen.jsx): `src/screens/profilescreen/ProfileScreen.jsx`
- [Blog and contact](https://github.com/zoltannyiri/turazzvelunk/blob/main/src/screens/blogscreen/BlogScreen.jsx): `src/screens/blogscreen/BlogScreen.jsx`

### API and domain

- [HTTP and socket server](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Account operations](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Tour routes](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/tourRoutes.js): `backend/routes/tourRoutes.js`
- [Tour operations](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/tourController.js): `backend/controllers/tourController.js`
- [Booking routes](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/bookingRoutes.js): `backend/routes/bookingRoutes.js`
- [Booking operations](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/bookingController.js): `backend/controllers/bookingController.js`
- [Payment routes](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/paymentRoutes.js): `backend/routes/paymentRoutes.js`
- [Payment operations](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/paymentController.js): `backend/controllers/paymentController.js`
- [Editorial routes](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/routes/blogRoutes.js): `backend/routes/blogRoutes.js`
- [Editorial operations](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/controllers/blogController.js): `backend/controllers/blogController.js`
- [Other domain routes](https://github.com/zoltannyiri/turazzvelunk/tree/main/backend/routes): `backend/routes`

### Shared services

- [Application database](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/config/db.js): `backend/config/db.js`
- [Email and notifications](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/emailService.js): `backend/services/emailService.js`
- [Realtime socket service](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/socketService.js): `backend/services/socketService.js`
- [Booking expiration](https://github.com/zoltannyiri/turazzvelunk/blob/main/backend/services/bookingExpirationService.js): `backend/services/bookingExpirationService.js`

### External systems

- **Stripe payments**
- **Email delivery**

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Application router: uses
- Application router → Tour discovery: routes to
- Application router → Tour details: routes to
- Application router → Calendar and bookings: routes to
- Application router → Account and admin: routes to
- Application router → Blog and contact: routes to
- HTTP and socket server → Authentication routes: mounts
- HTTP and socket server → Tour routes: mounts
- HTTP and socket server → Booking routes: mounts
- HTTP and socket server → Payment routes: mounts
- HTTP and socket server → Editorial routes: mounts
- HTTP and socket server → Other domain routes: mounts
- Authentication routes → Account operations: dispatches
- Booking routes → Booking operations: dispatches
- Editorial routes → Editorial operations: dispatches
- Account operations → Application database: reads and writes
- Tour operations → Application database: reads and writes
- Booking operations → Application database: reads and writes
- Payment operations → Application database: reads and writes
- Editorial operations → Application database: reads and writes
- Payment routes → Payment operations: dispatches
- Payment operations → Stripe payments: creates and checks sessions
- Stripe payments → HTTP and socket server: sends webhook
- Payment operations → Email and notifications: requests notifications
- Account operations → Email and notifications: requests account mail
- Email and notifications → Application database: queries recipients
- Email and notifications → Email delivery: sends mail
- Booking operations → Email and notifications: requests booking mail
- Booking operations → HTTP and socket server: emits tour events
- HTTP and socket server → Realtime socket service: sets socket server
- HTTP and socket server → Application database: validates notification users
- HTTP and socket server → Booking expiration: starts job
- Tour operations → Booking expiration: expires stale bookings
