https://github.com/mushfiqur-rahman/ecommerce
This is an Advance ecommerce project
https://github.com/mushfiqur-rahman/ecommerce
django django-orm mysql-database postgresql python
Last synced: about 1 year ago
JSON representation
This is an Advance ecommerce project
- Host: GitHub
- URL: https://github.com/mushfiqur-rahman/ecommerce
- Owner: mushfiqur-rahman
- License: mit
- Created: 2023-07-08T02:25:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-19T09:47:32.000Z (over 2 years ago)
- Last Synced: 2023-12-19T14:31:26.842Z (over 2 years ago)
- Topics: django, django-orm, mysql-database, postgresql, python
- Language: Python
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/rnwood/smtp4dev)
- Running background tasks
- Performance testing
- Caching
- Schedule SMS send
- Automated Testing
---
**Dummy data populate from [mockaroo](https://www.mockaroo.com/)**
**Serializing Relationship**
> Primary Key
> String
> Nested Object
> Hyperlink
### \* [To know HTTP STATUS code](https://httpstatuses.io/)
---
Token create
```bashscript
http://127.0.0.1:8000/auth/jwt/create
```
```bashscript
http://127.0.0.1:8000/auth/jwt/refresh
```
#### MOD Hear
```bashscript
JWT refresh token
```
**Dashboard**

**Collection**

- 
**Customer**

- Add Customer

**Orders**

Add Order

**Products**

- **Add product**

## Django Rest API
_URL: http://127.0.0.1:8000/store/_

- **Product list**
_url:http://127.0.0.1:8000/store/products/_

- **product add**

- **Product Filtering**

- **Product Details**
_url:http://127.0.0.1:8000/store/products/423/_

- **Collection list API**

- **Cart List**

- **User Create**
**http://127.0.0.1:8000/auth/users/**

- **Customer List**

---
### 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
```bash
locust -f locustfiles/browse_products.py
```
> Open Browser
```bash
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
```bash
docker run -d -p 6379:6379 redis
```
### Severity
- DEBUG
- INFO
- WARNING
- ERROR
- CRITICAL
### Production server
```bash script
gunicorn core.wsgi
```
### Dockerizing the App
```bash script
docker-compose up --build
```