An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          





Stepik



Store



Store shop. The project for study Django



Stepik | Backend development on Django: from scratch to a specialist



❗Note: Project not supported❗

[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Stepik](https://img.shields.io/badge/stepik-course-green)](https://stepik.org/course/101042/info)


[![Builde Status](https://github.com/mrKazzila/mini_online_store/actions/workflows/basic_code_style_checks.yml/badge.svg?)](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)






GitHub
Resume
LinkedIn