A fully functional API backend for an online store built with Django and using Django-Rest-Framework for serving endpoints.
- The user is able to register through an endpoint
- The user is able login through an endpoint after registering
- A user is able to see product list.
- A user is able to see product details
- View products reviews
- Add items to cart
- make orders
- Celery Workers for running background apps
- Redis for caching rarely updated but frequently accessed endpoints
Follow the steps below to make sure the application running in the correct way:
- Makes sure you have installed
Mysql,Redis,NodeJs,PM2on your local machine before starting the application - Otherwise, you should use
Docker Containerto host the application.
- Run the command
pipenv installto install all the application dependencies. - Run the command
python manage.py makemigrationto create a database migration file. - Run the command
python manage.py migrateto run all the current database migration. - Run the command
python manage.py runserverto starting development the application. - Run the command
pytestto performs the all the test.
- Make sure your local machine has been installed the Docker container.
- Run the command
docker-compose upto starting development the application. - Run the command
docker-compose downto stop development the application. - Run the command
docker-compose up --buildto rebuild the application. - Run the command
docker-compose up -dto build the application in the background. Note*: There are some other docker command need to hand on by your self.
- Landing on
http://127.0.0.1:8000/store/documentionto open the Open API docs for local environment.