Skip to content

jayanth-org1/cab-booking-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cab Booking API

A full-featured ride-sharing system built with FastAPI, SQLAlchemy, and PostgreSQL.

Features

  • User authentication and authorization
  • Driver management and availability
  • Cab registration and management
  • Booking system with fare estimation
  • Payment processing
  • Notification system
  • Admin dashboard
  • Rate limiting and logging

Tech Stack

  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • Alembic
  • JWT Authentication
  • Docker
  • Pytest

Setup

  1. Clone the repository:
git clone <repository-url>
cd cab-booking
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
  1. Run with Docker:
docker-compose up --build

Or run locally:

uvicorn app.main:app --reload

API Documentation

Once the server is running, visit:

Testing

Run tests with pytest:

pytest

Database Migrations

Create a new migration:

alembic revision --autogenerate -m "description"

Apply migrations:

alembic upgrade head

Project Structure

cab-booking/
├── alembic/
├── app/
│   ├── api/
│   ├── core/
│   ├── db/
│   ├── models/
│   ├── schemas/
│   └── services/
├── tests/
├── .env
├── docker-compose.yml
├── Dockerfile
└── requirements.txt

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%