⚜️ This OnlineShop API has all the features that a store should have.
- Django ➡️ Django is a Python framework that makes it easier to create web sites using Python.
- DRF ➡️ Django REST Framework (DRF) is a widely-used, full-featured API framework designed for building RESTful APIs with Django.
- Docker ➡️ Docker is an open platform for developing, shipping, and running applications.
- Nginx ➡️ NGINX is open-source web server software used for reverse proxy, load balancing, and caching.
- Celery ➡️ Celery is an open source asynchronous task queue or job queue which is based on distributed message passing.
- Swagger ➡️ Swagger API is a set of open-source tools built to help programmers develop, design, document, and use REST APIs.
- Rabbitmq ➡️ RabbitMQ is a reliable and mature messaging and streaming broker, which is easy to deploy on cloud environments, on-premises, and on your local machine. It is currently used by millions worldwide.
- Redis ➡️ Redis is an in-memory key–value database, used as a distributed cache and message broker, with optional durability.
- OTP Authentication
- JWT Authentication
- Cart
- Discount code
- Payment gateaway
- Filter products
- Search products
- Comment and Rating(Like)
- Session Caching
- SQLite(Development mode)
- Postgresql(Production Mode)
-
💠 Clone Repository
$ git clone https://github.com/Abolfazlsi/OnlineShop_API.git $ cd OnlineShop_API
-
💠 Install Virtualenv
$ pip install virtualenv $ virtualenv venv
-
Windows
> cd venv/Script/ > activate > cd ../.. (Back to OnlineShop_API folder)
-
Linux
$ source venv/bin/activate
-
💠 Install Packages
$ pip install -r requirements.txt
-
💠 Migrate
$ python manage.py migrate
-
💠 create super user (you can enter the admin panel)
$ python manage.py createsuperuser
- set phone number and password for yourself.
-
💠 Run Project
$ python manage.py runserver
-
you will see this url
http://127.0.0.1:8000/
➡️ Enter this url in a Browser or test api apps, like Postman and HTTPie. -
Aloso you can go to this url
http://127.0.0.1:8000/api/schema/swagger-ui/
for see all of the urls. -
you can go to this url
http://127.0.0.1:8000/admin/
to enter the admin panel.(enter the phone and password you set in the previous step)
-
💠 Run Celery
$ celery -A core worker -l info
- or
$ celery -A core worker -l info --pool=solo
- run celery beat
$ celery -A core beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseSchedule