https://github.com/mrkazzila/mini_online_store
Stepik course. Mini e-commerce shop using django3
https://github.com/mrkazzila/mini_online_store
celery course django docker docker-compose nginx poetry postgresql python3 redis stepik
Last synced: 11 months ago
JSON representation
Stepik course. Mini e-commerce shop using django3
- Host: GitHub
- URL: https://github.com/mrkazzila/mini_online_store
- Owner: mrKazzila
- Created: 2023-01-09T18:16:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-27T17:09:50.000Z (almost 2 years ago)
- Last Synced: 2024-07-27T18:35:25.126Z (almost 2 years ago)
- Topics: celery, course, django, docker, docker-compose, nginx, poetry, postgresql, python3, redis, stepik
- Language: Python
- Homepage: https://mrkazzila.github.io/mini_online_store/
- Size: 13.4 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Store
Store shop. The project for study Django
Stepik | Backend development on Django: from scratch to a specialist
❗Note: Project not supported❗
[](https://conventionalcommits.org)
[](https://github.com/pre-commit/pre-commit)
[](https://stepik.org/course/101042/info)
[](https://github.com/mrKazzila/mini_online_store/actions/workflows/basic_code_style_checks.yml)
Features •
Tech stack •
How To Use •
Additional material •
GitHub Pages
## Features
* Registration new user
- Verification with e-mail
* Authorisation
- Also, authorisation with GitHub account
* Change profile settings
* Add goods into cart
* Fake buying
* History orders
## Tech stack
- [Django 3](https://www.djangoproject.com/)
- [PostgreSQL](https://www.postgresql.org/)
- [Sprite](https://stripe.com/)
- [Redis](https://redis.io/)
- [Celery](https://docs.celeryq.dev/en/stable/index.html)
## How To Use
To clone and run this project, you'll need:
- [Git](https://git-scm.com)
- [Python](https://www.python.org/downloads/)
- [Poetry](https://python-poetry.org/docs/#installation)
Step-by-step commands or use [Docker](readme/DOCKER.md)
commands
1. Firstly clone repo
```bash
git clone git@github.com:mrKazzila/mini_online_store.git
```
2. Copy an example .env file because the real one is git ignored
```bash
cp env/.env.example env/.env.project
```
3. Add env file for db
```bash
touch env/.env.db && echo -e \
"POSTGRES_DB=store_db\nPOSTGRES_USER=store_username\nPOSTGRES_PASSWORD=store_password" > env/.env.db
```
4. Settings Poetry
```bash
poetry config virtualenvs.in-project true
```
5. Activate venv
```bash
poetry shell
```
6. Install packages
```bash
poetry install
```
7. Install pre-commit
```bash
pre-commit install
```
8. Move to app dir
```bash
cd app
```
9. Run project dependencies, migrations, fill the database with the fixture data etc
```bash
python manage.py migrate
python manage.py loaddata
python manage.py runserver
```
10. Run [Redis Server](https://redis.io/docs/getting-started/installation/)
```bash
redis-server
```
11. Run Celery
```bash
celery -A config worker --loglevel=INFO
```
12. Test purchase webhook
```bash
stripe listen --forward-to 127.0.0.1:8000/webhook/stripe/
```
13. Start yapf (manual)
```bash
yapf --style=.style.yapf -ir -vv app/
```
14. Start pre-commit (manual)
```bash
pre-commit run --all-files
```
15. Start bandit (manual)
```bash
bandit -c style/bandit.yaml -r app/ -f json -o bandit_report.json
```
## Additional material
[how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04#further-troubleshooting)