LANES is a real-time, flood-adaptive alternative navigation platform designed for commuters in Pasig City. By leveraging crowdsourced community flood reports, real-time admin verification, and interactive map displays, the system dynamically recalculates driving routes to bypass active inundation zones.
Developed in partial fulfillment of the requirements for the degree of Bachelor of Science in Information Technology at the College of Computer Studies, Pamantasan ng Lungsod ng Pasig (PLP).
Authors:
- Bellen, Jace H.
- Cambe, Roi Yvann M.
- Folloso, Chris Nicolai Z.
Adviser: Noreen A. Perez, DIT
Target Region: Pasig City, Philippines (localized commuting sectors)
- For AI Agents & Developers:
AGENTS.mdcontains all collaboration protocols, operational boundaries, and coding standards. AI agents must consult this file for interaction rules. - For System Architecture:
DESIGN.mdserves as the single source of truth for technical design, database schemas, processing flows, and non-functional requirements.
- Node.js (v18 or higher)
- Python (v3.11 or v3.12)
- Docker Desktop (For running the local PostGIS spatial database).
LANES uses a local Valhalla engine to calculate dynamic flood-adaptive routes. You need to download the map data and compile the routing graph first.
- Open a PowerShell terminal at the root of the project.
- Run the automated setup script to download the Philippines OpenStreetMap data and build the Valhalla routing graph:
(Note: This downloads ~200MB of data and may take a few minutes. Wait for it to say "Valhalla Graph successfully built!" before proceeding).
.\setup_valhalla.ps1
Spin up the pre-configured PostgreSQL + PostGIS database and the local Valhalla routing engine using Docker:
docker-compose up -dThis starts the database on port 5432 and the Valhalla engine on port 8002.
(Note: Docker Desktop must be open and running).
- Open a new terminal and navigate to the
backendfolder:cd backend - Set up and activate the virtual environment:
# On Windows py -3.12 -m venv venv .\venv\Scripts\Activate.ps1 # On Mac/Linux python3.12 -m venv venv source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Ensure you have your
.envfile set up (copy from.env.example). - Run the database migrations to build the tables (Ensure Docker is running first):
(Note: If you are pulling new code on a computer that already has an existing LANES database, run
alembic upgrade head
alembic stamp headinstead to sync the history). - Start the development server:
The backend server runs at
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
http://localhost:8000(and is accessible via your network IP).
- Open a third terminal window and navigate to the
frontendfolder:cd frontend - Install dependencies (if you haven't yet) and start the dev server:
The interactive dashboard will be available at
npm install npm run dev
http://localhost:3000.
Since Step 1 is a one-time setup, your daily development routine is just:
- Turn on background services:
docker-compose up -d - Start the backend:
cd backend-> Activatevenv->uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload - Start the frontend:
cd frontend->npm run dev
- setup_valhalla.ps1 Connection Timeout: If the script fails to download the map data (e.g.,
Connection timed out), it is likely being blocked by your firewall or network proxy. Try temporarily disabling your firewall, disconnecting from a VPN, or using a different network. Alternatively, you can download the file manually from https://download.geofabrik.de/asia/philippines-latest.osm.pbf, place the.pbffile inside thedata/valhalla/custom_files/directory, and run the script again. - TypeError: Failed to fetch (Frontend): Check that the backend server is running at
http://localhost:8000. - Database Connection Warnings: If PostgreSQL is offline, the backend logs a startup warning and operates in fallback mode, letting you test routing options using Valhalla without crashing the server.