# love2explore/btp_open_stack architecture

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

- Interactive diagram: https://gitdiagram.com/love2explore/btp_open_stack
- Repository: https://github.com/love2explore/btp_open_stack

## Overview

This repository contains several small web applications. The documented workflow is user registration and lookup, ticket creation and retrieval, and booking creation and lookup; the Python booking API and Node.js ticket API are separate services sharing a MongoDB database. The tree also includes visit/token and text-similarity web apps, but the root README does not document their workflows. Their nodes are included without speculative connections; edges cite only shown source or README relationships.

Main entry points: [`Booking_Python/app.py`](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/app.py) (REST app), [`Booking_Python/services/userService.py`](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/userService.py) (User service), [`Booking_Python/services/bookingService.py`](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/bookingService.py) (Booking service), [`MovieTickets_Application_NodeJS/app/app.js`](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/app.js) (Express app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Python Booking API"]
  node_py_app["REST app<br/>[app.py]"]
  node_user_resource["User endpoints<br/>[user.py]"]
  node_booking_resource["Booking endpoints<br/>[booking.py]"]
  node_user_service["User service<br/>[userService.py]"]
  node_booking_service["Booking service<br/>[bookingService.py]"]
  node_user_model["User model<br/>[user.py]"]
  node_booking_model["Booking model<br/>[booking.py]"]
  node_py_db["Mongo connection<br/>[db.py]"]
end

subgraph group_tickets["Node Ticket API"]
  node_node_app["Express app<br/>[app.js]"]
  node_ticket_routes["Ticket routes<br/>[movietickets.js]"]
  node_ticket_controller["Ticket controller<br/>[movietickets.js]"]
  node_ticket_model["Ticket model<br/>[ticket.js]"]
  node_node_db["Database helper<br/>[database.js]"]
end

subgraph group_visits["Visit And Token"]
  node_visit_app["Visit/token web app<br/>[app.py]"]
end

subgraph group_similarity["Text Similarity"]
  node_similarity_app["Text similarity web app<br/>[app.py]"]
end

node_api_user(("API client"))
node_mongo[("MongoDB")]
node_ticket_client(("API client"))

node_api_user -->|"calls API"| node_py_app
node_py_app -->|"registers route"| node_user_resource
node_py_app -->|"registers route"| node_booking_resource
node_user_resource -->|"calls"| node_user_service
node_booking_resource -->|"calls"| node_booking_service
node_user_service -->|"creates"| node_user_model
node_user_service -->|"uses collection"| node_py_db
node_booking_service -->|"creates"| node_booking_model
node_booking_service -->|"uses collection"| node_py_db
node_py_db -->|"connects"| node_mongo
node_ticket_client -->|"calls API"| node_node_app
node_node_app -->|"mounts routes"| node_ticket_routes
node_ticket_routes -->|"dispatches"| node_ticket_controller
node_ticket_controller -->|"queries and saves"| node_ticket_model
node_ticket_model -->|"uses helper"| node_node_db
node_node_app -->|"connects"| node_mongo

click node_py_app "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/app.py"
click node_user_resource "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/resources/user.py"
click node_booking_resource "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/resources/booking.py"
click node_user_service "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/userService.py"
click node_booking_service "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/bookingService.py"
click node_user_model "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/model/user.py"
click node_booking_model "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/model/booking.py"
click node_py_db "https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/util/db.py"
click node_node_app "https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/app.js"
click node_ticket_routes "https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/routes/movietickets.js"
click node_ticket_controller "https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/controllers/movietickets.js"
click node_ticket_model "https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/model/ticket.js"
click node_node_db "https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/util/database.js"
click node_visit_app "https://github.com/love2explore/btp_open_stack/blob/main/Count_User_Visit_And_Left_Token/web/app.py"
click node_similarity_app "https://github.com/love2explore/btp_open_stack/blob/main/User_Registration_Detect_Text_Similarity/web/app.py"

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_py_app,node_user_resource,node_booking_resource,node_user_service,node_booking_service,node_user_model,node_booking_model,node_py_db,node_api_user,node_ticket_client toneBlue
class node_node_app,node_ticket_routes,node_ticket_controller,node_ticket_model,node_node_db,node_mongo toneAmber
class node_visit_app toneMint
class node_similarity_app toneRose
```

## Components

### Python Booking API

- [REST app](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/app.py): `Booking_Python/app.py`
- [User endpoints](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/resources/user.py): `Booking_Python/resources/user.py`
- [Booking endpoints](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/resources/booking.py): `Booking_Python/resources/booking.py`
- [User service](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/userService.py): `Booking_Python/services/userService.py`
- [Booking service](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/services/bookingService.py): `Booking_Python/services/bookingService.py`
- [User model](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/model/user.py): `Booking_Python/model/user.py`
- [Booking model](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/model/booking.py): `Booking_Python/model/booking.py`
- [Mongo connection](https://github.com/love2explore/btp_open_stack/blob/main/Booking_Python/util/db.py): `Booking_Python/util/db.py`

### Node Ticket API

- [Express app](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/app.js): `MovieTickets_Application_NodeJS/app/app.js`
- [Ticket routes](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/routes/movietickets.js): `MovieTickets_Application_NodeJS/app/routes/movietickets.js`
- [Ticket controller](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/controllers/movietickets.js): `MovieTickets_Application_NodeJS/app/controllers/movietickets.js`
- [Ticket model](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/model/ticket.js): `MovieTickets_Application_NodeJS/app/model/ticket.js`
- [Database helper](https://github.com/love2explore/btp_open_stack/blob/main/MovieTickets_Application_NodeJS/app/util/database.js): `MovieTickets_Application_NodeJS/app/util/database.js`

### Visit And Token

- [Visit/token web app](https://github.com/love2explore/btp_open_stack/blob/main/Count_User_Visit_And_Left_Token/web/app.py): `Count_User_Visit_And_Left_Token/web/app.py`

### Text Similarity

- [Text similarity web app](https://github.com/love2explore/btp_open_stack/blob/main/User_Registration_Detect_Text_Similarity/web/app.py): `User_Registration_Detect_Text_Similarity/web/app.py`

### Other components

- **API client**
- **MongoDB**
- **API client**

## Connections

- API client → REST app: calls API (evidence: `README.md`)
- REST app → User endpoints: registers route (evidence: `Booking_Python/app.py`)
- REST app → Booking endpoints: registers route (evidence: `Booking_Python/app.py`)
- User endpoints → User service: calls (evidence: `Booking_Python/resources/user.py`)
- Booking endpoints → Booking service: calls (evidence: `Booking_Python/resources/booking.py`)
- User service → User model: creates (evidence: `Booking_Python/services/userService.py`)
- User service → Mongo connection: uses collection (evidence: `Booking_Python/services/userService.py`)
- Booking service → Booking model: creates (evidence: `Booking_Python/services/bookingService.py`)
- Booking service → Mongo connection: uses collection (evidence: `Booking_Python/services/bookingService.py`)
- Mongo connection → MongoDB: connects (evidence: `Booking_Python/util/db.py`)
- API client → Express app: calls API (evidence: `README.md`)
- Express app → Ticket routes: mounts routes (evidence: `MovieTickets_Application_NodeJS/app/app.js`)
- Ticket routes → Ticket controller: dispatches (evidence: `MovieTickets_Application_NodeJS/app/routes/movietickets.js`)
- Ticket controller → Ticket model: queries and saves (evidence: `MovieTickets_Application_NodeJS/app/controllers/movietickets.js`)
- Ticket model → Database helper: uses helper (evidence: `MovieTickets_Application_NodeJS/app/model/ticket.js`)
- Express app → MongoDB: connects (evidence: `MovieTickets_Application_NodeJS/app/app.js`)
