One of my most recent projects is an E-commerce API that has helped me solidify more advanced concepts in Django and Django Rest Framework. I learned to work in a
dockerized environment and use
Gunicorn ... inside
Docker to make my application production ready.
- Registration using either phone number or email
- Basic E-commerce features.
- Payment integration using Stripe.
- Caching using a Redis backend.
- Sending emails asynchronously using Celery and Redis as a message broker.
- Custom permissions set for necessary endpoints.
- Documentation using DRF Spectacular
- Dockerized for local development and production
- Django Rest Framework
This project makes use of:
- Custom permissions
- Nested serializers and so on. If you would like to strengthen your skills, I highly recommend you to check it out
I used Docker for local development and it has been so great! And then, with some adjustments, the application is production ready.
Tip: you can export your database schema to a
SQL file using the command below:
docker exec -i [container_id] pg_dump -U [postgres_user] --schema-only [database_name] > [target_path]
And then use this tool https://dbdiagram.io/ to generate ER diagram while playing around with the SQL code.
Link to GitHub repo: https://github.com/earthcomfy/django-ecommerce-api
I welcome any suggestion. Follow me to get upcoming tutorials.