This is the backend code for the DlvrMe project the frontend of the mobile app can be found here
Library/Framework | Purpose |
---|---|
Flask | Backend Api |
MySQL | Database |
Flutter | Frontend UI |
Requires python 3 Requires Flutter(For Mobile Frontend) Android Studio
There are many dependencies for DlvrMe which can be downloaded via this command:
Windows:pip3 install -r requirements.txt
Mac&Linux:pip install -r requirements.txt
python3 app.py
python app.py
DlvrMe runs on a MySQL databases There is a need for two tables Users and Deliveries
The user's table will look like this:
VALUE | TYPE |
---|---|
Username | VARCHAR |
Password | VARCHAR |
VALUE | TYPE |
---|---|
Username | VARCHAR |
Address | VARCHAR |
Latitude | FLOAT |
Longitude | FLOAT |
Item | VARCHAR |
Price | FLOAT |
User_info | VARCHAR |
First make Schema called dlvrme
Next run models.py
In order to run you can either write in the file this line:
db.create_all()
OR run this terminal script:
from models import db
db.create_all()
In order for the database to move smoothly environment variables must be generated.
Generate a file called .env
After this fill out the fold with this data:
HOST=YOUR_HOST
USERNAME=USERNAME
PASSWORD=DATABASE_PASSWD
DATABASE=DATABASE_NAME
Before opening a pull request make sure your code is tested, instructions in order to test your code can be found here.
Make sure the latest version of docker is installed on your system. Run the following:
sudo docker build -t <CONTAINER_NAME> .
sudo docker run -d -p 5000:5000 CONTAINER_NAME
Now find the container ID by running this script and copying the ID OR Name of container
sudo docker ps -a
Then run:
sudo docker logs <CONTAINER ID OR CONTAINER NAME>
Now check to see if it works NOTE: Make sure your database is running on the same host as the app itself For more info check here
Read CODE_OF_CONDUCT.md
for proper rules
Instructions will come soon regarding what needs
to be improved.
Things to be done can be viewed at CONTRIBUTING.md
but do notify what
you will be doing before hand to prevent overwritten code.
Currently DlvrMe is not making new features rather improving current features.