Skip to content

Food delivery project with backend DRF and frontend React (future addition)

Notifications You must be signed in to change notification settings

AlexMiller93/Food_delivery_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Food_delivery_project

This project made with Django REST Framework on backend and will be added with React on frontend (future addition).

User can register, create your account and choose user_type - Customer, Courier, Cook or Manager. For booking purpose user can add your card with validate card number.

Manager can add new menu items, update and delete ones.

Future plans:
I want to implement orders logic, user can order some food and couriers can deliver it to users.

Table of Contents

About

The main goal is to learn how to build RESTful API with DRF. Test all urls with services Postman and Insomnia, and also with TestCase.

Technologies

Project is created with:

  • Django: 4.2.4
  • Django Rest Framework: 3.14.0
  • Faker

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Clone project to your local machine
git clone https://github.com/AlexMiller93/Food_delivery_project.git

cd Food_delivery_project

For Windows

Creating virtual env
python3 -m venv venv

Activating virtual env
.venv\Scripts\activate

For Linux/Mac

Creating virtual env
python3 -m venv venv

Activating virtual env
source venv/bin/activate

Installing

Install all needed packages
pip install -r requirements.txt

Usage

To synchronize the database sqlite3
python manage.py migrate

To run server
python manage.py runserver

To test accounts app
python manage.py test accounts

Authentication staff

Create superuser python manage.py createsuperuser

To register new user run
http://localhost:8000/users/register

To login user run
http://localhost:8000/users/login

Admin urls

Login as superuser and watch all users:
http://localhost:8000/users/admin

To watch all accounts run:
http://localhost:8000/users/admin/accounts/

To watch one account run using pk
http://localhost:8000/users/admin/accounts/<int:pk>

To watch all user's cards
http://localhost:8000/users/admin/cards/

Menu urls

To read all menu items and add new one run:
http://localhost:8000/menu

To read menu item via pk run:
http://localhost:8000/menu/<int:pk>

Accounts urls

To add new account run:
http://localhost:8000/users/accounts/add

To watch user account run:
http://localhost:8000/users/accounts/<int:pk>

Cards urls

To add new card run:
http://localhost:8000/users/cards

To read, update and delete user card run:
http://localhost:8000/users/cards/<int:pk>

Contributing

About

Food delivery project with backend DRF and frontend React (future addition)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages