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
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:
- Build the web:
docker compose build web
- Assign the database
docker compose up -d database_default
- Migrate the database
docker compose run web python manage.py migrate
- create the super user
docker compose run web python manage.py createsuperuser
- 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
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/
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 !!!!
🎉🎉 Super 🎉🎉
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.
🎉 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 :) ...