Skip to content

mushfiqur-rahman/Storefront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecommerce

This is Advance ecommerce project

Goal:

Minimal Coupling

High Cohesion (Focus)

I am trying to avoid Monolith because it's hard to maintain.

Features

  • RESTfull API
  • Token based authentication
  • Uploading files
  • Sending emails, Fake SMTP for dev
  • Running background tasks
  • Performance testing
  • Caching
  • Schedule SMS send
  • Automated Testing

Dummy data populate from mockaroo

Serializing Relationship

Primary Key

String

Nested Object

Hyperlink


Token create

http://127.0.0.1:8000/auth/jwt/create
http://127.0.0.1:8000/auth/jwt/refresh

MOD Hear

JWT refresh token

Dashboard 1

Collection 2  collection

  • 3  add collection

    Customer 4  Customer with membership plan

  • Add Customer 5  add customer

Orders 6  orders

Add Order 7  add order

Products 8  products

  • Add product 9  add product

Django Rest API

URL: http://127.0.0.1:8000/store/ api home


Configuring Email Back-end

Type of backend for email:

  • SMTP(default)
  • Console
  • File
  • Locmem
  • Dummy

Celery

Long Running tasks:

  • Processing Images and videos
  • Generating reports
  • Sending Emails
  • Running machine learning models

Test Frameworks

  • unittest
  • pytest
    • More Features
    • Tone of plugins
    • Less boilerplate

      Tests should have a single responsibility That can be multiple assertion

Performance Test

locust -f locustfiles/browse_products.py

Open Browser

http://localhost:8089/

Optimizations

  • Optimize the Python code
  • Re-write the query
  • Tune the database
  • Cache the result
  • Buy more hardware

Caching

  • Redis install on docker
docker run -d -p 6379:6379 redis

Severity

  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • CRITICAL

Production server

gunicorn core.wsgi 

Dockerizing the App

docker-compose up --build

About

About This is the step by step code from The Ultimate Django Course by Code With Mosh

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published