FindMySpot is an intelligent parking management system designed to help users locate their vehicles within parking structures using AI-powered license plate recognition. The system automatically scans and records a vehicle’s location when it is parked, allowing users to quickly retrieve their parking spot and directions by searching their plate number. The project integrates a Node.js/Express backend, a PostgreSQL database, a Python-based computer vision pipeline, and a lightweight browser/mobile-style frontend to deliver a seamless and efficient parking experience.
When a vehicle enters or moves through a monitored parking area, the camera pipeline reads the plate, associates it with a configured camera location, and reports the detection to the backend. Users can then:
- register and log in
- register one or more vehicles
- search for a parked vehicle by license plate
- view parking history and notifications
- request directions to the last detected parking location
- fall back to manual workflows when automatic recognition is unavailable
The backend also exposes parking statistics, occupancy-related endpoints, security scanning endpoints, and notification APIs.
This repository includes several implementation details to support development and testing:
- The backend is implemented with Express and the committed dependency list includes
express,cors,dotenv, andpg. - The checked-in
mobile-app/folder is currently a static HTML/CSS frontend rather than a React Native codebase. - The root-level
app.pyis the active camera/OCR script in the repository. It uses OpenCV and EasyOCR and posts detection data to the backend. - The
ai-service/directory contains a reusable Python integration service (detection_service.py) plus its own requirements file and tests. - The repository includes a tracked
backend/.envfile andbackend/node_modules/, which is not typical for production repositories. For portability and security, local setups should still rely onbackend/.env.exampleand a fresh dependency install.
- User registration and login
- Token-based profile access
- Vehicle registration and management
- Vehicle history retrieval
- Parking spot lookup
- Available and occupied spot queries
- Parking statistics and usage reporting
- Vehicle locate endpoint
- Directions endpoint
- Auto-checkout timer recovery after server restart
- License plate detection reporting endpoint
- Detection history, count, and recent detections
- OCR-based plate extraction in the root Python pipeline
- Camera-to-floor/lot mapping using
camera_config.json - Simulated detection generation through the AI integration service
- Notification retrieval and unread counts
- Mark-one and mark-all-as-read flows
- Notification deletion
- Security flag retrieval
- Security scan endpoint for suspicious or overstayed vehicles
Camera / CV Pipeline (Python)
|
v
Detection POST -> Node.js / Express API -> PostgreSQL
| |
| +-> business logic/controllers/models
|
+-> static frontend pages consume backend endpoints
The backend is the system’s core service. It:
- initializes the database
- registers all API routes
- exposes health and root documentation endpoints
- restores active parking-session auto-checkout timers on startup
- handles authentication, parking, vehicles, detections, and notifications
The database schema is created through three migration files:
001_init.sql002_license_plate_detection.sql003_security_flags.sql
There are two Python-related pieces:
- Root
app.py: live camera/OCR script usingcv2,easyocr, andcamera_config.json ai-service/detection_service.py: helper/integration service for posting detections to the backend and simulating camera events
Despite the folder name, this part of the repo currently contains browser-deliverable UI pages such as:
index.htmllogin.htmlsignup.htmlvehicles.htmlvehicles-new.htmlnotifications.htmlhistory.htmlterms.htmlstyle.css
FindMySpot/
├── backend/ # Node.js API server
│ ├── routes/ # API endpoints
│ ├── controllers/ # Business logic
│ ├── models/ # Database models
│ └── middleware/ # Auth, validation, etc.
├── ai-service/ # Python AI/ML service
│ ├── models/ # YOLO model files
│ ├── ocr/ # License plate OCR
│ └── api/ # Flask API
├── mobile-app/ # Static HTML/CSS/JS frontend
│ ├── screens/ # App screens
│ ├── components/ # Reusable components
│ └── services/ # API calls
├── database/ # Database schemas & migrations
└── docs/ # Documentation
The backend root endpoint documents the API groups below.
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/profile/:token
POST /api/vehicles/register/:tokenGET /api/vehicles/:tokenGET /api/vehicles/:token/historyPUT /api/vehicles/:token/:vehicleIdDELETE /api/vehicles/:token/:vehicleId
POST /api/detection/recordGET /api/detection/history/:licensePlateGET /api/detection/count/:licensePlateGET /api/detection/recent
GET /api/notifications/:tokenGET /api/notifications/unread/:tokenGET /api/notifications/count/:tokenPUT /api/notifications/:token/:notificationId/readPUT /api/notifications/:token/mark-all-readDELETE /api/notifications/:token/:notificationId
GET /api/parking/spotsGET /api/parking/spots/availableGET /api/parking/spots/occupiedGET /api/parking/statsGET /api/parking/locate/:plateGET /api/parking/directions/:plateGET /api/parking/reports/usage?hoursBack=24GET /api/parking/security/flagsPOST /api/parking/security/scan?maxDurationHours=24
app.pyopens the configured camera usingCAMERA_ID.- The script loads
camera_config.json. - The selected camera is mapped to a fixed floor and lot.
- Frames are processed with OpenCV.
- OCR is performed with EasyOCR.
- A cleaned plate string and metadata are posted to
http://localhost:3000/api/detection/record.
ai-service/detection_service.py can simulate detections for test plates and submit them to the same backend detection endpoint.
The repository includes camera_config.json with camera IDs 0 through 9. Each camera is mapped to a specific floor and lot, covering floors 1 through 5 with two lot positions per floor. This lets the OCR pipeline assign real parking metadata based on which camera is running, instead of using random floor/lot values.
The backend .env.example defines:
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=findmyspot
PORT=3000
Recommended additions for local development: NODE_ENV=development
For camera-specific local runs, you can also set a Python-side environment variable before launching app.py:
CAMERA_ID=0
On Windows PowerShell:
$env:CAMERA_ID=0
cd backend npm install npm run dev
- Create PostgreSQL database
findmyspot - Run repository migrations
- Confirm tables were created successfully
pip install -r ai-service/requirements.txt python app.py
From the repo root or mobile-app/ directory, serve files locally:
python -m http.server 8080
Then open the appropriate page in a browser.
python test_system.py
The repository includes:
test_system.pyfor API-level integration/system checksai-service/test_detection_service.pyfor detection service testing
The system test script is configured to use:
- API base URL:
http://localhost:3000 - user registration flow
- vehicle retrieval flow
- detection recording flow
- notification-related flows
Before running tests, make sure:
- PostgreSQL is running
- the backend server is running on port 3000
- required schema exists
- Asmita Bhandari
- Mirza Sneha
- Jennifer Lopez
- Varun Kodikal
- Tristan Mejia