Skip to content

Alizaaaja4/CarCheese

Repository files navigation

Requirements

Instalasi & Setup

  1. Clone the Repository

    • bebas git clone aja dimana aja wkwkwk, nanti copas FE kamu
      git clone https://github.com/Alizaaaja4/CQUET_Parking.git
      cd CQUET_Parking
  2. Set Up Backend

    • Navigate to the backend folder:
      cd backend
    • Create a virtual environment and activate it:
      python -m venv venv
      source venv/bin/activate  # On Windows: venv\Scripts\activate
    • Install dependencies:
      pip install -r requirements.txt
  3. Build and Run Using Docker Compose

    • Navigate back to the root directory:
      cd ..
    • Build and start the services:
      docker compose up --build -d
    • Cek Semua Container Berjalan
      docker compose ps
    • Cek Log Backend (Debugging)
      docker compose logs -f backend
    • Migrasi Dummy Data ke DBeaver
      docker compose exec backend bash
      python init_db.py

API Endpoints

Dokumentasi ERD & Dokumentasi API

Testing Flow

Step Endpoint / Action Keterangan
Setup Admin User Manual Create admin user in database
Login POST /api/users/login Get access token
Create Slots POST /api/slots/ Create parking slots
Test Entry Flow 1 GET /api/slots/available Check available slots
Test Entry Flow 2 GET /api/slots/recommend Get slot recommendation
Test Entry Flow 3 POST /api/payments/entry Record entry
Test Exit Flow 1 POST /api/payments/exit Process exit & get QR
Test Exit Flow 2 POST /api/payments/confirm Confirm payment
Admin Monitoring 1 GET /api/payments/history View payment history
Admin Monitoring 2 GET /api/payments/statistics View statistics
Admin Monitoring 3 GET /api/payments/active View active sessions

Database Schema Notes

Table Fields
Users id, username, password_hash, email, role
Slots id, slot_id, level, zone, status
Payments id, payment_id, user_id, slot_id, vehicle_plate, vehicle_type, entry_time, exit_time, duration, amount, status, qr_code

About

The solution for ticketless parking system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •