Full-stack commute rating app with a Flask backend and React frontend.
- Clone this repo.
- Create and activate a virtual environment.
- Install dependencies:
cd backend
pip install -r requirements.txt- Create your local env file from the template:
cp .env.example .env- Add your TomTom API key to
backend/.env:
TOMTOM_API_KEY=your_tomtom_api_key_here- Run the backend API:
python run.py- In a new terminal, run the frontend:
cd frontend
npm install
npm start- Go to the TomTom Developer Portal.
- Sign in or create an account.
- Create a new application/project.
- Generate an API key and copy it.
- Paste it into
backend/.envasTOMTOM_API_KEY=....
Do not commit your real .env file.
- Real-time travel time and delay calculations
- Traffic congestion and incident retrieval
- Commute rating algorithm
- Flask REST API backend
- React frontend interface
- Modular service-based architecture
- Frontend: React, JavaScript
- Backend: Python, Flask
- APIs: TomTom Routing/Traffic, 511NY/NJ
- Tools: Git, GitHub, virtual environments, Axios, requests
POST /api/commute
{
"origin": "40.755,-73.986",
"destination": "40.730,-73.999"
}{
"travel_time": 1340,
"delay": 210,
"incident_count": 3,
"rating": 72
}