EALPR_FLASK / README.md
Pant0x's picture
Final synced deploy v2 - Fix session and timeouts
cd01269
|
Raw
History Blame Contribute Delete
2.09 kB
---
title: EALPR FLASK
emoji: πŸš—
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# Ain El Aql - Security & Admin Webpage
This is the Security and Administration dashboard for the **Ain El Aql** Parking Management System. It provides real-time license plate recognition (LPR), garage occupancy tracking, and manual gate control.
## πŸš€ Deployment (Render)
This application is designed to be deployed on **Render**.
### 1. Requirements
* A Render account.
* The code pushed to a GitHub repository.
### 2. Environment Variables
Add the following variables in the Render "Environment" tab:
* `FLASK_SECRET_KEY`: A secret key for session security.
* `BACKEND_API_URL`: `https://ain-el-aql-backend-production.up.railway.app`
* `CAMERA_SOURCE`: The URL of your IP camera stream (e.g., `http://.../video`) or `0` for local testing if running locally.
### 3. Build & Start Commands
* **Build Command**: `pip install -r requirements.txt`
* **Start Command**: `gunicorn "app:create_app()"`
---
## πŸ› οΈ Technology Stack
* **Frontend**: HTML5, CSS3 (Vanilla), JavaScript.
* **Backend**: Flask (Python).
* **OCR Engine**: YOLOv8 models hosted on **Hugging Face** via the Railway backend.
* **Database**: Supabase (via the Railway backend).
---
## πŸš— Features
* **Real-time Monitoring**: Live camera feed with periodic remote OCR polling.
* **Manual Override**: Open the gate manually from the dashboard.
* **History Ledger**: View complete records of all vehicles that entered or left the facility.
* **Garage Management**: Track currently inside vehicles and parking occupancy.
---
## πŸ”’ Security
* Role-based access control (Security vs Admin).
* Encrypted session tokens.
* CORS configured for cross-origin API calls.
---
## πŸ“ Usage
1. **Login** with your security or admin credentials.
2. **Start Camera** to begin monitoring the entrance/exit.
3. **Scan & Process** an image to register a vehicle event (entry/exit).
4. **Confirm Payments** in the Admin/Garage view for manual cash transactions.