/awesome_recipes

Recipe web app developed using React/Redux frontend and Django Rest framework as backend

Primary LanguageJavaScript

awesome_recipes

Recipe web app developed using React/Redux for frontend, and Django rest framework for backend api.

Requirements

  • Python 3.10
  • virtualenv
  • Node ^v16.16.0

Install project dependencies

create virtualenv

virtualenv recipe
source recipe/bin/activate
pip install -r awesome_recipes/requirements.txt

Install node modules

cd awesome_recipes
npm install 

Database

I have used SQLite database which is included in the root. If you want to use a different database then update the settings.py and execute the following command to create tables.

python manage.py migrate

Running locally

cd awesome_recipes
python manage.py runserver

If everything goes smooth the site will be up at http://127.0.0.1:8000/

Django Unit testing

python manage.py test

Frontend testing

yarn test

Local frontend development

The app uses compiled 'app/index.js' file. If you want to make any React code change you need to run the below command to see the changes in the app.

npm install --global yarn
yarn serve

yarn serve command will build the React code. Files are watched, and it will recompile automatically after any code change.

API Endpoints used by frontend

[GET, POST, PUT, PATCH, DELETE] /api/categories/
[GET, POST, PUT, PATCH, DELETE] /api/recipes/
[GET] /api/recipe_categories/
[GET, POST, PUT, PATCH, DELETE] /api/ingredients/
[GET, POST, PUT, PATCH, DELETE] /api/instructions/

Screenshots

screenshot1 screenshot2 screenshot3 screenshot4