Sick of refreshing the app or the web app for a close-by car? This application tracks nearby Communauto flex cars on a loop, plots them on an interactive map, dynamically routes your walking distance, and pops up a desktop notification when it finds a car that matches your criteria!
- Smart Location Widget: A color-coded GPS button — 🔵 blue when your location is found, 🔴 red when GPS is unavailable. If GPS fails, an address autocomplete field appears and uses Nominatim to geocode your address with no API key required.
- Google Maps-style Layout: Results panel sits side-by-side with the interactive map at full equal height, just like Google Maps search results.
- Interactive Leaflet Map: Visually tracks your location, your search radius bounds, and real-time car pins.
- Smart Routing: Click any car card to instantly draw a walking route and display the exact distance and travel time using OSRM data.
- Auto-Geolocation: Grants browser permission once; the app automatically boots and starts searching your GPS coordinates on every load.
- Background Notifications: Get native OS desktop alerts the moment a vehicle is found.
- Responsive Design: Adapts to mobile screens — the results panel collapses above the map on small viewports.
You can run this application either directly via Node.js or via Docker.
Requires Node.js > 17.5
- Clone the repository, navigate into the directory, and install dependencies:
npm install- Start the local server proxy:
npm start- Open your browser and navigate to:
http://localhost:8000
This repository automatically builds and publishes its Docker container to the GitHub Container Registry (ghcr.io).
- Pull and run the latest published container directly from GitHub:
docker run -d -p 8000:8000 --name communauto-notify ghcr.io/jeromelefeuvre/communauto-flex-webnotifier:latest(Optional: If you are hosting the app behind a reverse proxy in a sub-directory, pass the BASE_URL environment variable so the internal Node server routes static files correctly)
docker run -d -p 8000:8000 -e BASE_URL=/flex --name communauto-notify ghcr.io/jeromelefeuvre/communauto-flex-webnotifier:latest- Open your browser and navigate to
http://localhost:8000(or your proxy URL).
(If you prefer to build the image manually yourself, use docker build -t communauto-flex-webnotifier .)
(To stop the server later, simply run docker stop communauto-notify)
This project includes a fully automated End-to-End browser testing suite powered by Playwright to ensure features like dynamic map bounding, automated UI toggles, and search loops don't break during future development.
If you are modifying the codebase and want to verify your changes haven't broken any core functionality:
- Install the testing dependencies:
npm install- Run the automated test suite:
npm testThe test framework will invisibly launch a headless browser, start the local server, mock Montreal geolocation coordinates, interact with the map DOM elements, and verify the frontend logic is completely stable.
The original idea and core concept for this project started with the excellent command-line tool built by Evert: https://github.com/evert/communauto-car-notify
The app proxies the official Communauto vehicle availability endpoint:
GET https://www.reservauto.net/WCF/LSI/LSIBookingServiceV3.svc/GetAvailableVehicles
| Parameter | Description | Values |
|---|---|---|
BranchID |
Type of search | 1 = flex cars, 2 = station cars |
LanguageID |
Response language | 1 = English, 2 = French |
Example request:
/api/cars?BranchID=1&LanguageID=2
