MałoSAFECycling is a cutting-edge application designed to make cycling safer by leveraging the power of AI and real-time road safety data. Whether you're commuting or exploring new routes, our app provides cyclists with up-to-date information on road conditions and potential risks. With MałoSAFECycling, you can enjoy your ride with greater peace of mind, knowing you're equipped with intelligent insights to keep you safe on the road.
Follow the steps below to set up and run the MałoSAFECycling application on your local machine.
git clone https://github.com/Rusiek/HackYeah2024.git
cd HackYeah2024Move to the backend directory and set up a Python virtual environment. Then, activate the environment:
cd backend
python3 -m venv venv
python3 -m venv/Scripts/activateInside the backend directory, create a .env file with the following content, replacing <HERE_API_KEY> with your own HERE API key:
HERE_API_KEY=<your-api-key>Install the required Python packages:
pip install -r backend/requirements.txtOpen a new terminal, navigate to the backend folder, and run the main application server:
py ./server/run.pyIn a new terminal, start the routing microservice server to handle pathfinding:
py ./route_risk/find_path.pyNavigate to the frontend directory and install the necessary packages using npm:
cd frontend
npm installInside the frontend directory, create a .env file with your Mapbox API key. Replace <VITE_MAP_KEY> with your own key:
VITE_MAP_KEY=<your-api-key>In a new terminal, start the frontend application:
npm run devOnce the frontend server starts, a URL will be provided in the terminal output. Open this URL in your web browser to access the MałoSAFECycling application.
Note: Make sure all the servers are running in separate terminals for the backend and frontend to function correctly.