Skip to content

Tourisoo/AirbCar

Repository files navigation

AirbCar

Simple car rental app. Frontend is Next.js. Backend is Django REST API.

Python Django Docker GitHub Actions PostgreSQL

Technologies: Python, Django, Django REST Framework, PostgreSQL, Docker, GitHub Actions, Supabase, Git

Screenshots

Deployment Diagram Booking flow Running Project in terminal

Landing page Search Admin Dashboard

User Dashboard Partner Dashboard 1 Partner Dashboard 2

  • Designed and built complete backend API from scratch using Django and PostgreSQL, serving RESTful endpoints for user management, vehicle booking, and role-specific dashboard data.
  • Implemented robust Role-Based Access Control (RBAC) system with custom permissions for Owners, Renters, and Admins, ensuring secure multi-tenant data access
  • Developed core booking flow with complex business logic: availability checking, conflict resolution, pricing calculation, and booking state management
  • Created secure authentication system with JWT tokens and refresh token mechanism
  • Designed normalized database schema with tables, foreign key relationships, and optimized queries for performance.
  • Set up complete CI/CD pipeline using GitHub Actions for automated testing, linting, and deployment
  • Configured Docker and Docker Compose for consistent development and production environments
  • Integrated Supabase for hosting database and data storage.


You can run it in two ways:

  • Local mode: uses a local Postgres in Docker. This is for anyone who wants to try the app. No private keys needed.
  • Remote mode: uses a remote Supabase database. This is only for owners who have the private .env.local file.

Quick start (visitors)

If you just want to test the app, use local mode.

Note: Ensure Docker (e.g., Docker Desktop) is installed and running before you start.

git clone https://github.com/Tourisoo/AirbCar.git
cd AirbCar
make local

This will:

  • Copy .env.local.example to .env.local for you
  • Start the frontend, backend, and a Postgres container
  • Open the app on your machine

Open these URL:

Users to test with:

Note: when local mode starts, the temporary .env.local file is created and later removed by the command. You do not need to manage it.

Requirements

  • Docker and Docker Compose
  • Git

Commands

  • Start local mode:

    make local
  • Start remote mode (owners only, needs private .env.local):

    make run
  • Check running containers:

    make status
  • Follow logs:

    make logs
  • Stop services:

    make stop
  • Clean containers and volumes:

    make clean
  • Full clean (also remove images):

    make fclean
  • Rebuild images:

    make build

Remote mode (owners)

Remote mode runs the frontend and backend in Docker, and connects to a Supabase Postgres database. Only owners with the private .env.local can use this.

Steps:

  1. Place your owner .env.local at the project root (same folder as Makefile). Do not commit this file.

  2. Start remote mode:

    make run

What runs:

  • Next.js on port 3000
  • Django on port 8000
  • Database is remote in Supabase (not a local container)

Services and ports

Project layout (short)

AirbCar/
  backend/                # Django project and app code
  frontend/               # Next.js app
  docker-compose.yml      # Services and networks
  Makefile                # Commands listed above
  images/                 # Screenshots

Tips

  • If ports 3000 or 8000 are busy, stop the other app that uses them or change ports locally.
  • Use make logs and make status to debug.
  • If you want a fresh start, run make clean or make fclean.

Use Policy & Status

Status: This repository is PUBLIC for demonstration and portfolio viewing purposes only.

License: ALL RIGHTS RESERVED. No license is granted for reproduction, modification, distribution, or commercial use of the source code contained herein.

Testing: You are permitted to clone and run the application locally (via make local) solely for testing, review, and personal assessment of the project's functionality.

About

Airbcar: Morocco’s top car rental platform linking customers and agencies with multilingual bookings (Arabic, French, English) and advanced dashboards for CEOs, partners, and clients.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors