This back-end provides endpoints for working with e-commerce website, including registration, phone verification and authorisation with JWT-tokens, searching products, adding them to cart, using promocedes and creating orders. Also it provides admin-panel, that allows to create new products or categories, and also verify clients by their Id. App has next roles:
- any
- authorised
- admin
what has been developed:
- JWT-aythentication
- user verification by phone and passport/id
- CRUD for categories and products (Non-admin users can only read)
- Searching filters and sting search
- Creating promocode (for admin)
- Cart CRUD and promocode applying (for authenticated)
- Order creating
- Notifications for admin
Back-end part was developed with Django Rest Framework
Postgresql was used as dbms
For copying catalog was used beautifulsoup for websccrapping and aiohttp for requests
Docker and docker compose were used for containerisation
Nginx was used as a web server
create .env-app file with
SECRET_KEY
DEBUG
ALLOWED_HOSTS
POSTGRES_HOST
TWILIO_VERIFY_SERVICE_SID
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
and .env-db file with
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
then use comands:
pip install -r requirements.txt
docker build -t ss_web .
docker compose up