A web application for tracking CTA buses in real-time.
The project consists of two main components:
frontend/
: Contains the web interfacebackend/
: Contains the Flask API server
-
Navigate to the backend directory:
cd backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the backend server:
python app.py
The server will start on
http://localhost:5000
The frontend is a static web application that can be served using any web server. For development, you can use Python's built-in HTTP server:
-
Navigate to the frontend directory:
cd frontend
-
Start a simple HTTP server:
python -m http.server 8000
The frontend will be available at
http://localhost:8000
The frontend is already configured to connect to the backend API at http://localhost:5000
. Make sure both servers are running:
- Backend server on port 5000
- Frontend server on port 8000
Open your web browser and navigate to http://localhost:8000
to use the application.
- Backend API endpoints are available at
http://localhost:5000/api/
- Frontend static files are served from the
frontend/
directory - The main application logic is in
backend/app.py
- Frontend JavaScript files are in
frontend/js/
- Frontend styles are in
frontend/css/
- Python 3.7 or higher
- Modern web browser with JavaScript enabled
- Internet connection for CTA API access