# elmir-ahmed/triqna architecture

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

- Interactive diagram: https://gitdiagram.com/elmir-ahmed/triqna
- Repository: https://github.com/elmir-ahmed/triqna

## Overview

Triqna is documented as a microservice ridesharing platform with JWT authentication, a gateway, and separate booking and ride services. The available source excerpts show service startup, controller mapping, health endpoints, and auth security rules, but not booking or ride business logic, gateway routing, or service-to-service calls. The React client is mentioned in the README but has no source directory in the supplied tree, so it is represented as an external initiating actor.

Main entry points: [`apps/bookings-service/Program.cs`](https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Program.cs) (Bookings service), [`apps/rides-service/Program.cs`](https://github.com/elmir-ahmed/triqna/blob/main/apps/rides-service/Program.cs) (Rides service), [`apps/triqna-gateway`](https://github.com/elmir-ahmed/triqna/tree/main/apps/triqna-gateway) (API gateway), [`apps/bookings-service/Controllers/HealthController.cs`](https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Controllers/HealthController.cs) (Bookings health endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Platform entry"]
  node_gateway["API gateway"]
end

subgraph group_services["Backend services"]
  node_bookings["Bookings service<br/>[Program.cs]"]
  node_bookings_health["Bookings health endpoint"]
  node_rides["Rides service<br/>[Program.cs]"]
  node_rides_health["Rides health endpoint"]
end

subgraph group_auth["Authentication"]
  node_auth_app["Auth service"]
  node_auth_security["JWT security rules"]
  node_auth_health["Auth health endpoint"]
end

node_rider(("Rider / client"))

node_rider -.->|"sends requests"| node_gateway
node_bookings -->|"maps controllers"| node_bookings_health
node_rides -->|"maps controllers"| node_rides_health

click node_gateway "https://github.com/elmir-ahmed/triqna/tree/main/apps/triqna-gateway"
click node_auth_app "https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/AuthServiceApplication.java"
click node_auth_security "https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/config/SecurityConfig.java"
click node_auth_health "https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/controller/HealthController.java"
click node_bookings "https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Program.cs"
click node_bookings_health "https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Controllers/HealthController.cs"
click node_rides "https://github.com/elmir-ahmed/triqna/blob/main/apps/rides-service/Program.cs"
click node_rides_health "https://github.com/elmir-ahmed/triqna/blob/main/apps/rides-service/Controllers/HealthController.cs"

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_gateway,node_rider toneBlue
class node_bookings,node_bookings_health,node_rides,node_rides_health toneAmber
class node_auth_app,node_auth_security,node_auth_health toneMint
```

## Components

### Platform entry

- [API gateway](https://github.com/elmir-ahmed/triqna/tree/main/apps/triqna-gateway): `apps/triqna-gateway`

### Backend services

- [Bookings service](https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Program.cs): `apps/bookings-service/Program.cs`
- [Bookings health endpoint](https://github.com/elmir-ahmed/triqna/blob/main/apps/bookings-service/Controllers/HealthController.cs): `apps/bookings-service/Controllers/HealthController.cs`
- [Rides service](https://github.com/elmir-ahmed/triqna/blob/main/apps/rides-service/Program.cs): `apps/rides-service/Program.cs`
- [Rides health endpoint](https://github.com/elmir-ahmed/triqna/blob/main/apps/rides-service/Controllers/HealthController.cs): `apps/rides-service/Controllers/HealthController.cs`

### Authentication

- [Auth service](https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/AuthServiceApplication.java): `apps/auth-service/src/main/java/com/triqna/auth_service/AuthServiceApplication.java`
- [JWT security rules](https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/config/SecurityConfig.java): `apps/auth-service/src/main/java/com/triqna/auth_service/config/SecurityConfig.java`
- [Auth health endpoint](https://github.com/elmir-ahmed/triqna/blob/main/apps/auth-service/src/main/java/com/triqna/auth_service/controller/HealthController.java): `apps/auth-service/src/main/java/com/triqna/auth_service/controller/HealthController.java`

### Other components

- **Rider / client**

## Connections

- Rider / client → API gateway: sends requests
- Bookings service → Bookings health endpoint: maps controllers (evidence: `apps/bookings-service/Program.cs`)
- Rides service → Rides health endpoint: maps controllers (evidence: `apps/rides-service/Program.cs`)
