Nima Part
Nima Part
Our project adopts a Microservices Architecture to ensure scalability, flexibility, and efficient
management of the tourism application. This architecture breaks down the system into
independent, loosely coupled services, where each microservice is responsible for a specific
business functionality. These microservices communicate with each other through RESTful APIs
and event-driven messaging systems like Kafka, promoting modularity and ease of
maintenance.
+-------------------------------------------------+
| Frontend Layer |
|-------------------------------------------------|
| - Mobile App / Website (Tourists) |
| - Dashboard Website (Tour Agencies) |
| - Dashboard Website (Department of Tourism) |
+----------------------+--------------------------+
|
v
+-----------------------------------------+
| API Gateway & Security Layer |
| (Spring Cloud, OAuth2, JWT) |
+----------------------+------------------+
|
-----------------------------------------------------------------------
| | | |
v v v v
+-------------------+ +-------------------+ +-------------------+ +-------------------+
| User Mgmt | | Tour Booking | | Visa Service | | Payment Service |
| Service | | Service | | (Visa Processing) | | (Transactions) |
+--------+---------+ +---------+---------+ +---------+---------+ +---------+---------+
| | | |
| | | |
+--------v---------+ +---------v---------+ +---------v---------+ +---------v---------+
| User Database | | Booking Database | | Visa Database | | Payment Database |
| (MongoDB) | | (MongoDB) | | (MongoDB) | | (PostgreSQL) |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
|
-----------------------------------------------------------------------
|
v
+-----------------------------------------+
| Event-Driven Communication (Kafka) |
+-----------------------------------------+
|
--------------------------------------------------------------------------------------
| | | |
v v v v
+-------------------+ +-------------------+ +-------------------+ +-------------------+
| Notification | | Reporting & | | Analytics | | Tour Agency |
| Service | | Insights (DoT) | | (For DoT & Agencies)| | Management |
+--------+---------+ +---------+---------+ +---------+---------+ +---------+---------+
| | | |
+--------v---------+ +---------v---------+ +---------v---------+ +---------v---------+
| Notification DB | | Reports Database | | Analytics DB | | Agency Database |
| (MongoDB) | | (MongoDB) | | (PostgreSQL) | | (MongoDB) |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
|
v
+-----------------------------------------+
| Infrastructure & DevOps |
| (Docker, Kubernetes, ELK, Prometheus) |
+-----------------------------------------+
ERD
Tables & Relationships
● Users (user_id, name, email, password_hash, phone, role (tourist, agency, DoT),
created_at)
● Tourist Profiles (user_id (FK), nationality, passport_number, dob,
preferences)
● Agency Profiles (agency_id, user_id (FK), name, license_number,
contact_info, created_at)
4. Payment (PostgreSQL)
5. Notifications (MongoDB)
📌 Features:
● Register/Login
● View & Book Tour Packages
● Apply for Visa
● Make Payments
● Get Notifications
● Track Booking & Visa Status
2. Tour Agencies
📌 Features:
● Register/Login
● Create & Manage Tour Packages
● View Bookings for Their Packages
● Receive Payments for Bookings
● Get Reports on Bookings & Earnings
📌 Features:
● Register/Login
● Manage & Approve Visa Applications
● Generate Reports & Analytics
● View Tour Agency Registrations
● Track Tourism Trends
+-----------------+
| Users |
|-----------------|
| user_id (PK) |
| name |
| email |
| password_hash |
| phone |
| role (Tourist / Agency / DoT) |
| created_at |
+-----------------+
|
|
+---------------------+ +---------------------+ +----------------------+
| Tourist Profiles | | Agency Profiles | | DoT Profiles |
|---------------------| |---------------------| |----------------------|
| user_id (PK, FK) | | agency_id (PK) | | user_id (PK, FK) |
| nationality | | user_id (FK) | | department_name |
| passport_number | | name | | position |
| dob | | license_number | | permissions |
| preferences | | contact_info | | created_at |
+---------------------+ +---------------------+ +----------------------+
|
|
+----------------------------+
| Tour Packages |
|----------------------------|
| package_id (PK) |
| agency_id (FK) |
| title |
| description |
| price |
| availability |
| created_at |
+----------------------------+
|
|
+----------------------------+
| Bookings |
|----------------------------|
| booking_id (PK) |
| user_id (FK) | <-- (Tourist makes booking)
| package_id (FK) |
| status (pending, confirmed)|
| booking_date |
| payment_status |
+----------------------------+
|
|
+----------------------------+
| Payments |
|----------------------------|
| payment_id (PK) |
| booking_id (FK) |
| amount |
| status (successful, failed)|
| transaction_date |
+----------------------------+
|
|
+----------------------------+
| Visa Applications |
|----------------------------|
| visa_id (PK) |
| user_id (FK) | <-- (Tourist applies for Visa)
| passport_number |
| visa_status |
| submission_date |
| approval_date |
+----------------------------+
|
|
+----------------------------+
| Visa Documents |
|----------------------------|
| document_id (PK) |
| visa_id (FK) |
| file_url |
| uploaded_at |
+----------------------------+
|
|
+----------------------------+
| Notifications |
|----------------------------|
| notification_id (PK) |
| user_id (FK) |
| message |
| status (read/unread) |
| created_at |
+----------------------------+
|
|
+----------------------------+
| Reports |
|----------------------------|
| report_id (PK) |
| generated_by (DoT/Admin) | <-- (DoT generates reports)
| report_type |
| generated_date |
+----------------------------+
|
|
+----------------------------+
| Analytics |
|----------------------------|
| analytics_id (PK) |
| metric_name |
| metric_value |
| recorded_at |
+----------------------------+
+---------------------------+
| Tourist / Tour Agency |
| / DoT User Login |
+------------+--------------+
|
v
+---------------------------+
| Authentication Service |
| (JWT / OAuth2 Validation) |
+------------+--------------+
|
+------------------------------+-----------------------------+
| |
v v
+-------------------------+ +---------------------------+
| Tourist Dashboard | | Tour Agency Dashboard |
| (Mobile/Web App) | | (Web Portal) |
+-----------+-------------+ +------------+--------------+
| |
| |
v v
+------------------------------+ +-----------------------------+
| Tour Package & Booking Service| | Manage Tour Packages |
| - View Packages | | - Create/Edit/Delete |
| - Book a Tour | | - Accept/Reject Bookings |
+-----------+-------------------+ +-------------+--------------+
| |
| |
v v
+-------------------------------+ +------------------------------+
| Payment Service | | Notification Service |
| - Process Payment | | - Confirm Booking |
| - Update Booking Status | | - Payment/Visa Alerts |
+-------------------------------+ +------------------------------+
| |
v v
+------------------------------+ +------------------------------+
| Visa Processing Service | | Department of Tourism (DoT) |
| - Submit Visa Application | | - Approve/Reject Visa |
| - Upload Documents | | - View Analytics & Reports |
+------------------------------+ +------------------------------+