A full-featured ride-sharing system built with FastAPI, SQLAlchemy, and PostgreSQL.
- 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
- FastAPI
- SQLAlchemy
- PostgreSQL
- Alembic
- JWT Authentication
- Docker
- Pytest
- Clone the repository:
git clone <repository-url>
cd cab-booking
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Run with Docker:
docker-compose up --build
Or run locally:
uvicorn app.main:app --reload
Once the server is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Run tests with pytest:
pytest
Create a new migration:
alembic revision --autogenerate -m "description"
Apply migrations:
alembic upgrade head
cab-booking/
├── alembic/
├── app/
│ ├── api/
│ ├── core/
│ ├── db/
│ ├── models/
│ ├── schemas/
│ └── services/
├── tests/
├── .env
├── docker-compose.yml
├── Dockerfile
└── requirements.txt
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.