Skip to content

Shopping Online Full-fledge Project .. i developed the frontend in ReactJS / Javascript and the backend in Django and Python

Notifications You must be signed in to change notification settings

samerkhateeb/ShoppingOnline-Full-fledge

Repository files navigation

Welcome to Shopping Project (ReactJs / Django)

it is me Samer, i am working as a FullStack developer, and i've developed this application using ReactJs-Context for the Frontend and Django-Postgresql for the Backend and containarize them with Docker.

This guide is for Mac Users

Run The Backend

image

To run the backend, you should have at least docker installed in your machine in the url: http://localhost:8000/admin , then navigate to the backend folder server\mvp-docker, and type the following commands:

  1. Build the web:
docker compose build web
  1. Assign the database
docker compose up -d database_default
  1. Migrate the database
docker compose run web python manage.py migrate
  1. create the super user
docker compose run web python manage.py createsuperuser
  1. let the container waming up :)
docker compose up -d

** NOTE: ** you have to to stop postgresql in. your machine if it was installed, you can stop it by the following command:

sudo -u postgres pg_ctl -D/Library/PostgreSQL/12/data stop

Run The Fronend

After you clone the repository in your machine, go to the directory client\mvp-reactjs-context, then you have to install the packages using yarn, then after the packages are successfully installed, please type yarn start, this will activate the environment in your local machine in the URL: http://localhost:3000/

image

image

Django Test Cases:

You can run the Test cases for Product CRUD, deposite as well as buy products API's, the test contains 14 test case for 7 API's, you have to go to the server folder cd server and run the following command on it:

docker compose run web python manage.py test

The result will be Ran 14 tests in 5.278s

OK !!!!

image

🎉🎉 Super 🎉🎉

Postman:

Here you can refer to the file Postman Collections, it includes 10 methods to test the API's one by one, i put also test values on it, you can change it and try to send requests in your local machine.

image

🎉 Congratulations! You have launched the application successfully !! please refer to me for any concern related to the technical details 🎉

Thanks and Have a Good Day :) ...

About

Shopping Online Full-fledge Project .. i developed the frontend in ReactJS / Javascript and the backend in Django and Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published