# backend-paradox/tne_prod architecture

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

- Interactive diagram: https://gitdiagram.com/backend-paradox/tne_prod
- Repository: https://github.com/backend-paradox/tne_prod

## Overview

Trip & Event is a travel and event booking platform with traveller social features, delivered through a React frontend and Node.js microservices. The user-facing flow is browsing destinations and packages, signing in, booking, and paying; separate services support profiles, groups, messaging, notifications, and conversational assistance. The README documents gateway routing, while the excerpts show several controller-to-service calls and authentication’s profile synchronization. Many service internals and frontend screens are listed but not sampled, so uncertain inter-service links are omitted rather than inferred.

Main entry points: [`backend/api-gateway/src/routes/proxy.js`](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/api-gateway/src/routes/proxy.js) (API gateway), [`frontend/src/App.tsx`](https://github.com/backend-paradox/tne_prod/blob/bhaskar/frontend/src/App.tsx) (Web application), [`frontend/src/components/booking`](https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/booking) (Booking interface), [`frontend/src/components/travellers`](https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/travellers) (Traveller features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_booking_ui["Booking interface"]
  node_traveller_ui["Traveller features"]
end

subgraph group_edge["API access"]
  node_gateway["API gateway<br/>[proxy.js]"]
end

subgraph group_identity["Identity and profiles"]
  node_auth["Authentication<br/>[authService.js]"]
  node_profiles["User profiles<br/>[user.routes.js]"]
end

subgraph group_travel["Travel and community"]
  node_booking["Bookings and vouchers"]
  node_packages["Tours and CineTrip<br/>[tour.controller.js]"]
  node_groups["Group planning<br/>[group.service.js]"]
  node_payments["Payment processing"]
end

subgraph group_support["Engagement services"]
  node_chat["Traveller messaging"]
  node_chatbot["Chatbot and leads"]
  node_notifications["Notifications"]
  node_crm["CRM synchronization<br/>[catalogService.js]"]
end

node_traveller(("Traveller"))

node_traveller -->|"uses"| node_frontend
node_frontend -->|"renders"| node_booking_ui
node_frontend -->|"renders"| node_traveller_ui
node_frontend -->|"sends API requests"| node_gateway
node_gateway -->|"routes auth"| node_auth
node_gateway -->|"routes users"| node_profiles
node_gateway -->|"routes bookings"| node_booking
node_gateway -->|"routes payments"| node_payments
node_gateway -->|"routes notifications"| node_notifications
node_gateway -->|"routes CRM sync"| node_crm
node_auth -->|"creates profile"| node_profiles
node_booking -.->|"payment handoff"| node_payments
node_booking_ui -.->|"requests bookings"| node_booking
node_booking_ui -.->|"browses packages"| node_packages
node_traveller_ui -.->|"plans trips"| node_groups
node_traveller_ui -.->|"messages"| node_chat
node_chatbot -.->|"lead sync"| node_crm

click node_frontend "https://github.com/backend-paradox/tne_prod/blob/bhaskar/frontend/src/App.tsx"
click node_booking_ui "https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/booking"
click node_traveller_ui "https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/travellers"
click node_gateway "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/api-gateway/src/routes/proxy.js"
click node_auth "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/auth-service/src/services/authService.js"
click node_profiles "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/user-service/src/routes/user.routes.js"
click node_booking "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/booking-service/src/controllers/booking.controller.js"
click node_packages "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/package-service/src/controllers/tour.controller.js"
click node_groups "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/group-service/src/services/group.service.js"
click node_payments "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/payment-service/src/controllers/paymentController.js"
click node_chat "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/chat-service/src/controllers/conversation.controller.js"
click node_chatbot "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/chatbot-service/src/controllers/chatbot.controller.js"
click node_notifications "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/notification-service/src/controllers/notificationController.js"
click node_crm "https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/crmsync-service/src/services/catalogService.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_frontend,node_booking_ui,node_traveller_ui toneBlue
class node_gateway toneAmber
class node_auth,node_profiles toneMint
class node_booking,node_packages,node_groups,node_payments toneRose
class node_chat,node_chatbot,node_notifications,node_crm,node_traveller toneIndigo
```

## Components

### Client experience

- [Web application](https://github.com/backend-paradox/tne_prod/blob/bhaskar/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Booking interface](https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/booking): `frontend/src/components/booking`
- [Traveller features](https://github.com/backend-paradox/tne_prod/tree/bhaskar/frontend/src/components/travellers): `frontend/src/components/travellers`

### API access

- [API gateway](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/api-gateway/src/routes/proxy.js): `backend/api-gateway/src/routes/proxy.js`

### Identity and profiles

- [Authentication](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/auth-service/src/services/authService.js): `backend/auth-service/src/services/authService.js`
- [User profiles](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/user-service/src/routes/user.routes.js): `backend/user-service/src/routes/user.routes.js`

### Travel and community

- [Bookings and vouchers](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/booking-service/src/controllers/booking.controller.js): `backend/booking-service/src/controllers/booking.controller.js`
- [Tours and CineTrip](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/package-service/src/controllers/tour.controller.js): `backend/package-service/src/controllers/tour.controller.js`
- [Group planning](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/group-service/src/services/group.service.js): `backend/group-service/src/services/group.service.js`
- [Payment processing](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/payment-service/src/controllers/paymentController.js): `backend/payment-service/src/controllers/paymentController.js`

### Engagement services

- [Traveller messaging](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/chat-service/src/controllers/conversation.controller.js): `backend/chat-service/src/controllers/conversation.controller.js`
- [Chatbot and leads](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/chatbot-service/src/controllers/chatbot.controller.js): `backend/chatbot-service/src/controllers/chatbot.controller.js`
- [Notifications](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/notification-service/src/controllers/notificationController.js): `backend/notification-service/src/controllers/notificationController.js`
- [CRM synchronization](https://github.com/backend-paradox/tne_prod/blob/bhaskar/backend/crmsync-service/src/services/catalogService.js): `backend/crmsync-service/src/services/catalogService.js`

### Other components

- **Traveller**

## Connections

- Traveller → Web application: uses
- Web application → Booking interface: renders (evidence: `frontend/src/App.tsx`)
- Web application → Traveller features: renders (evidence: `frontend/src/App.tsx`)
- Web application → API gateway: sends API requests
- API gateway → Authentication: routes auth
- API gateway → User profiles: routes users
- API gateway → Bookings and vouchers: routes bookings
- API gateway → Payment processing: routes payments
- API gateway → Notifications: routes notifications
- API gateway → CRM synchronization: routes CRM sync
- Authentication → User profiles: creates profile (evidence: `backend/auth-service/src/services/authService.js`)
- Bookings and vouchers → Payment processing: payment handoff
- Booking interface → Bookings and vouchers: requests bookings
- Booking interface → Tours and CineTrip: browses packages
- Traveller features → Group planning: plans trips
- Traveller features → Traveller messaging: messages
- Chatbot and leads → CRM synchronization: lead sync
