Skip to content

dwin-gharibi/badraghe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

113 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Badraghe - Online Travel Ticket Selling Platform

Python Django React MySQL Docker GitLab CI/CD

Welcome to Badraghe, a comprehensive online booking platform that allows users to search, reserve, and manage tickets seamlessly. Whether it's airline tickets, train journeys, or bus rides, Badraghe ensures real-time availability, secure transactions, and a user-friendly interface.

🌐 Live Demo: Badraghe Platform


πŸš€ New Features and Integrations

πŸ“‘ API Endpoint

API Endpoint


πŸ” GitLab CI/CD Integration

Seamlessly deploy, migrate, and seed the project with integrated GitLab CI/CD pipelines for continuous delivery.

GitLab CI/CD


πŸ“Š Badraghe Metabase Dashboard

Monitor and analyze operational metrics (ticket sales, user activity, performance) in one centralized Metabase dashboard.
πŸ”— Metabase Dashboard

Metabase


πŸ› οΈ PhpMyAdmin Access

Use PhpMyAdmin for database administration tasks like migrations, queries, and data validations.
πŸ”— PhpMyAdmin

PhpMyAdmin


πŸ“¦ CLI Seeders for Database Setup

Seed the database with realistic dummy data using Badraghe’s Python CLI utility.

CLI Seeders


🧩 Badraghe Updamus Monitoring

Monitor the health of all deployed services in real-time using Updamus.
πŸ”— Updamus Monitoring

Updamus


🌟 Platform Features

🧾 Core Features

  • Real-Time Ticket Booking: Up-to-date ticket availability and instant reservation confirmations.
  • Secure Transactions: Built-in integration with secure payment gateways like Zarinpal.
  • Multi-Transport Support: Book across buses, trains, and airlines on one platform.
  • Flexible Reservations: Supports one-way, round-trip, and multi-city bookings.

πŸ“‹ Administrator Features

  • Monitor ticket sales with live dashboards.
  • Manage routes, schedules, and dynamic pricing models.
  • Automate notifications for payment reminders, cancellations, and changes.

πŸ–₯️ Developer Features

  • RESTful API Support for frontend integrations.
  • GitLab CI/CD for continuous testing and deployment.
  • Docker Compose files to replicate production-ready environments.

System Architecture

1. API Backend (badraghe-api)

  • Manages business logic, ticket processing, and API endpoints.
  • Key Features:
    • RESTful API integration.
    • Authentication and role-based access control.
    • Processes secure payment transactions.

2. Database (badraghe-db)

  • Central repository for handling tickets, reservations, and payments.
  • Uses MySQL for relational data consistency.

3. Entity Relationship Models (badraghe-er)

  • Provides the structure for the database, ensuring a clear relationship between entities:
    • Users
    • Tickets
    • Reservations
    • Transactions

4. User Interface (badraghe-ui)

  • Fully responsive React.js-based frontend optimized for travelers and admin users.

πŸ“‹ Entity Relationship Diagram (ERD)

The following ER diagram showcases the relationships between users, tickets, reservations, and transactions:

ERDiagram


πŸš€ Setup & Usage

🌐 Prerequisites

Before setting up the platform, ensure the following tools are installed:

  • βœ… Docker & Docker Compose
  • βœ… Python 3.8+
  • βœ… pip (for Python dependencies)

🚧 Backend Setup

# Clone the Badraghe repository
git clone https://github.com/dwin-gharibi/badraghe.git
cd badraghe

# Navigate to the API Backend
cd badraghe-api

# Setup the Python virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Create the .env file for backend configurations:

DATABASE_URL=mysql://user:password@mysql_server/badraghe_main
PAYMENT_GATEWAY_KEY=your_zarinpal_key
SMTP_SERVER=smtp.example.com
SMTP_USER=username
SMTP_PASSWORD=password

🐳 Start Services with Docker

# For MySQL and PhpMyAdmin
docker-compose up -d

Access PhpMyAdmin at localhost:8080 with:

  • Server: mysql
  • Username: user
  • Password: password

πŸ”¬ Testing the Project (test.py)

Run tests using the unittest framework to validate database migrations, data constraints, and transactions.

# Install dependencies
pip install -r requirements.txt

# Run tests
python -m unittest test.py

πŸ“Š Monitoring Tools

1. Metabase Dashboard

  • Track business performance metrics like customer bookings and revenue.

2. Updamus Service Monitoring

  • Real-time service uptime monitoring.

3. GitLab CI/CD Pipelines

  • Continuous deployment for backend and frontend builds.

🀝 Contributing

We welcome contributions to make Badraghe better! Steps to contribute:

  1. Fork the Repository
  2. Create a feature branch
  3. Submit a PR for review.

πŸ“§ Support and Contact

For questions, issues, or feature requests:


Badraghe Logo

Thank you for choosing Badraghe! Simplify your travel ticketing today.

About

Welcome to Badraghe, a comprehensive online booking platform that allows users to search, reserve, and manage tickets seamlessly. Whether it's airline tickets, train journeys, or bus rides, Badraghe ensures real-time availability, secure transactions, and a user-friendly interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors