A Flask web app interactive program that gives you a list of directions between places located in the campus at EAFIT University.
- 🗺 Get directions from one place to another
- ⭐️ Choose destination from your favorite places
- 💯 See steps and time estimates for the trip
- 📝 Edit your favorite places (add or remove)
- 🧐 See all-time stats (steps and time)
Audiovisual content of project development can be found in screencasts and screenshots folders.
Project to test our knowledge and also learn new technologies and tools.
Project originally developed by Luis M. Torres-Villegas for a course project, from there was born the intention to improve it and create a more user-friendly product.
The main aim of this documentation is to give the project maintainability in the future and to be able to work in a more agile way.
This project can be installed and executed in Windows, MacOS and Linux-Debian Distros. In these operating systems it was tested.
Note: It is recommended to use a Virtual Python Development Environment to avoid possible version or dependency conflicts.
networkxfor Dijkstra's algorithm.flaskfor full-stack development.Bootstrap-Flask,flaskwtfandWTFormsfor UI and UX design in the project structure.
# clone the repo
git clone https://github.com/LuisForPresident/whereafit.git
# change directory
cd whereafit
# create venv
python3 -m venv venv
# activate venv
source venv/bin/activate
# install dependencies
pip install -r requirements.txt
# run (PORT: 5000)
flask --app main.py --debug run-
It is clear on the part of the authors that the source code of the project will be maintained private for the moment and there will be no external contribution.
-
Bugs and issues will be resolved over time to support the project and possible features will be added. All this through the issues and the Pull Requests sections.
-
Create a new branch for issues or pull requests. Avoid making changes directly from the
masterbranch. Keep the conventions used as far as possible -
If this is the case, do not forget to update the requirements file.
# update dependencies pip freeze > requirements.txt
We are clear that the project will undergo multiple modifications and improvements in terms of locations, coordinates and paths. Thus, a Python script was created to add the respective information in a more easily way.
With the add_data_script.py script you will be able to add coordinates of an specific place with a name. See the script for more details of operation.
-
Add the name of the place and then the coordinates of this, in the format:
lat, lon. The script will be in charge of separating each data and storing it in the respective way as the data is handled in the.jsonfile. This is an example of how this is store:"places": [ { "name": "Idiomas EAFIT", "coordinates": { "latitude": 6.201676624825496, "longitude": -75.57686942363574 } }, ]
-
Add the new location to the edge list. This list is working as the main graph of the Dijkstra path, so is necessary to specify the respective connections and distances with those places. This is an example of how this is store:
Bloque 17;La Bodeguita Minimarket;10 Bloque 17;Sala de descanso;6 Laboratorio financiero;Bloque 17;7
With the previous steps, it will be possible to add a new location to both, the map and the Dijkstra graph.
The instructions to carry out a correct deploy and update new versions in the future are described below.
As the Deployment Environment is linked with the GitHub repository directly, is not necessary to use specific commands to build the project on Vercel. However, take into account the following points:
-
The
masterbranch will be use for Production Deployment, i.e, in themasteralways will be a stable version of the project, to mantain the project correctly working on the Vercel server. -
In the repository, there will be a
developmentbranch. This branch will work as the branch where issues, pull requests and other modifications of the project will be merged or will have a main place to be stored. -
If you are allow to use Vercel CLI directly with this repository, you can build the project on Vercel with:
vercel build --prod
-
In the
vercel.jsonfile will be store all the configuration for the deployment on Vercel. The entry poins, routes, github configuration and the framework version. For more details, read the Vercel Docs. -
All commits made in the
masterbranch will be reviewed by Vercel's Production Assistant. This branch is directly connected to be constantly checked when a change is made to the project in themasterbranch.
-
There may be certain limitations or bugs produced by the browser used or by possible restrictions imposed by the navigation environment.
-
The map may suffer failures in displaying the path. We are using the OpenStreetMap free API, which can fails sometimes.
-
If conflicts occur when doing
mergein the code, if is necessary, share it with the members to take a decision together and avoid incorrect decisions.