Foodtasker is an UberEats clone in which customers can order takeaway food on through the customer mobile app, restaurants can accept and track orders
Click here for the demo
Python Django, SQLite 3, Bootstrap 3 and Stripe for payments
The combined application consists of 4 components:
- Back-end (part of this code base): A back end that handles CRUD operations with an api specified in the
api_spec folder
. - Restaurant Front-end (part of this code base): A web-based administrative front-end for restaurant employees to manage orders
- Customer Front-end separate repository: An android mobile app for customers to use to place and pay for orders
- Driver Front-end separate repository: An android mobile app for drivers to use to accept and deliver orders
This code is for the back end which includes databases and APIs, and web based administration site for restaurant employees.
Code4Startup tutorial on building an UberEats clone based on the foodTasker app tutorial.
- Authenticate users using JWT
- CRU* users (sign up & settings page - no deleting required)
- CRUD on Restaurants and Meals
- Sign in page (URL:
api_baseURL/restaurant/sign-in
) - Sign up page (URL:
api_baseURL/restaurant/sign-up
) - Settings page (URL:
api_baseURL/restaurant/account
)
- Home page (URL:
api_baseURL/restaurant/order/
)- List of orders and their status
- Restaurants can change the status of orders from 'Cooking' to 'Ready'
- Meals page to view/create/edit meals (URL:
api_baseURL/restaurant/meal/
)- View the menu of meals
- Add meals to the menu (URL:
api_baseURL/restaurant/meal/add
) - Edit meals after clicking on a meal name (URL:
api_baseURL/restaurant/meal/edit/
)
- Report page where restaurants can view revenue and other statistics (URL:
api_baseURL/restaurant/report/
) - Customers page where restaurants can view customers by order volume (URL:
api_baseURL/restaurant/customers/
) - Drivers page where restaurants can view drivers by order volume (URL:
api_baseURL/restaurant/drivers/
)
The back end API is deployed on Heroku, and the front end is deployed on ??. Here is the demo, and here is the production api link https://arcane-spire-07518.herokuapp.com/
that can be used with any front end for requests
- Create a top level (1) folder called foodTasker
- Create a second level (2) folder called foodtasker and download this repository code into this folder
- To set up a virtual environment, run
python3 -m venv myvirtualenv/foodtasker-virtualenv
- Install dependencies by moving (cd) into the foodtasker folder and running
pip install -r requirements.txt
Navigate(cd) to the top level (1) foodTasker folder and run source foodtasker-virtualenv/bin/activate
Run python manage.py runserver
Open up http://localhost:8000/
in your browser
Download the repository and navigate to the project root folder locally.
- Build and run locally with
docker-compose up
- Or just pull the image from my repository with
docker pull kgotsok/optimus-thee-prime:foodtaskerwebapp_web
, and then run it withdocker-compose up
2: Open the app (be sure to also check which IP address is being used in the case of virtual machines)
And if you now enter http://localhost:8000/ you’ll see that it’s running!
foodtasker/
where key settings are specifiedsettings/
where all the key settings have been specifiedurls/
handles application routing
foodtaskerapp/
for the main applicationmigrations/
for all the database migrationsmodels.py
for all the database table/collection modelsviews.py
for key views and related datatemplates/
for html templates and static assets such as Bootstrap 3 files and custom cssruntime.txt
specify which version of python to use in runtimerequirements.txt
specify all packages/dependencies to be downloaded before running the application
db.sqlite3
database
Requests are authenticated using the Authorization
header with a valid JWT. Authentication is handled by djangoauth and django-rest-framework-social-oauth2
Stripe payment API was used (using test keys and test tokens)
-
Back end
- Version 1 (Code4Startup Tutorial): 31 hours
- Version 2 (personal modifications): 5 hours
Special thanks to Leo Trieu's Code4Startup for a great tutorial. I had been looking for a tutorial for a real world 2 sided market application with geo-location features and I found one with thanks to Code4Startup. We need more of this kind of tutorial and less of 'Foo Bar'.
The codebase is MIT licensed unless otherwise specified.
To be modified further by Kgotso Koete
Johannesburg, South Africa