1
0
Fork 0
mirror of https://github.com/EDeev/deev.space.git synced 2026-10-07 20:49:59 +03:00
Сайт-портфолио Python-разработчика на Django: проекты, блог, оценки без регистрации. Исходный код deev.space https://deev.space
Find a file
Egor Deev a696d996b9 README на русском и английском, документация, скриншоты, лицензия MIT
- README.md и README.en.md: что это, статус, скриншоты, быстрый старт в Docker,
  установка без Docker, переменные окружения, схема, развёртывание, разработка;
- docs/architecture.md (модели, оценки без регистрации, антинакрутка, безопасность)
  и docs/deploy.md (Docker и устройство боевого сервера) вместо описания моделей в README;
- файл LICENSE (MIT), который раньше был заявлен только в README.
2026-10-02 12:23:09 +00:00
.github/workflows CI: ruff, проверка миграций и тесты на каждый push; сборка Docker-образа по тегу 2026-10-02 12:11:17 +00:00
docs README на русском и английском, документация, скриншоты, лицензия MIT 2026-10-02 12:23:09 +00:00
dspace Тесты: голосование без регистрации, антинакрутка, формы, защита от XSS/SSRF, страницы 2026-10-02 12:03:30 +00:00
main populate_demo приведена к текущим моделям, устаревшая load_initial_data удалена 2026-10-02 12:23:08 +00:00
static Версия 2.0: код с продакшена deev.space 2026-10-02 11:58:54 +00:00
templates «Обо мне»: исправлена ссылка на несуществующую картинку-заглушку 2026-10-02 12:10:57 +00:00
.dockerignore Docker: образ на python:3.12-slim, compose с томом для базы и media 2026-10-02 12:10:57 +00:00
.env.example Docker: образ на python:3.12-slim, compose с томом для базы и media 2026-10-02 12:10:57 +00:00
.gitattributes Версия 2.0: код с продакшена deev.space 2026-10-02 11:58:54 +00:00
.gitignore Версия 2.0: код с продакшена deev.space 2026-10-02 11:58:54 +00:00
compose.yaml Docker: образ на python:3.12-slim, compose с томом для базы и media 2026-10-02 12:10:57 +00:00
Dockerfile Docker: образ на python:3.12-slim, compose с томом для базы и media 2026-10-02 12:10:57 +00:00
LICENSE README на русском и английском, документация, скриншоты, лицензия MIT 2026-10-02 12:23:09 +00:00
manage.py Версия 2.0: код с продакшена deev.space 2026-10-02 11:58:54 +00:00
pyproject.toml Тесты: голосование без регистрации, антинакрутка, формы, защита от XSS/SSRF, страницы 2026-10-02 12:03:30 +00:00
README.en.md README на русском и английском, документация, скриншоты, лицензия MIT 2026-10-02 12:23:09 +00:00
README.md README на русском и английском, документация, скриншоты, лицензия MIT 2026-10-02 12:23:09 +00:00
requirements-dev.txt Зависимости: закреплены версии, добавлены недостающие, убраны лишние 2026-10-02 11:59:07 +00:00
requirements.txt Зависимости: закреплены версии, добавлены недостающие, убраны лишние 2026-10-02 11:59:07 +00:00
robots.txt Версия 2.0: код с продакшена deev.space 2026-10-02 11:58:54 +00:00

deev.space

Русский · English

CI Docker Release License

Personal portfolio website of a Python developer: projects, blog, experience and tech stack, article ratings without sign-up. Source code of deev.space.

Status: personal project, actively developed · live at deev.space

deev.space home page

Stack: Python 3.12 · Django 4.2 · SQLite · bleach · Yandex SmartCaptcha · gunicorn + nginx · Docker

Features

  • Home page with a profile card, tech stack by category and a "by the numbers" block
  • Blog: categories, galleries, attachments, links with automatic previews, threaded comments
  • Likes and dislikes without sign-up, based on a signed cookie and limited per IP
  • Unique article views with bot filtering
  • Projects, achievements, experience and education, all editable in the admin
  • Contact form with captcha and a Telegram notification to the owner
  • sitemap.xml, readable URLs, custom 404 and 500 pages

Quick start

git clone https://github.com/EDeev/deev.space.git && cd deev.space
cp .env.example .env      # set DJANGO_SECRET_KEY
docker compose up -d
docker compose exec web python manage.py createsuperuser

The site runs at http://localhost:8000, the admin at /admin/. Prebuilt image: docker pull ghcr.io/edeev/deev.space or docker pull dcr.deev.su/edeev/deev.space.

Installing without Docker

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env      # for development: DJANGO_DEBUG=True
python manage.py migrate
python manage.py populate_demo     # demo content, optional
python manage.py createsuperuser
python manage.py runserver

Configuration

All settings are environment variables (full list in .env.example):

Variable Purpose
DJANGO_SECRET_KEY Django secret key, required with DJANGO_DEBUG=False
DJANGO_DEBUG debug mode, False by default
DJANGO_ALLOWED_HOSTS, DJANGO_CSRF_TRUSTED_ORIGINS comma-separated site domains
DJANGO_DB_PATH, DJANGO_MEDIA_ROOT location of the SQLite database and uploaded files
SMARTCAPTCHA_CLIENT_KEY, SMARTCAPTCHA_SERVER_KEY Yandex SmartCaptcha for the contact form
EMAIL_*, CONTACT_EMAIL sending contact form messages by email
ALERTBOT_TOKEN, ALERTBOT_CHAT_ID Telegram notification to the owner about a new message
SOCIAL_AUTOPOST, TELEGRAM_*, VK_* auto-posting new articles, off by default

Important

With DJANGO_DEBUG=False the site enables HSTS and redirects to HTTPS. To run without TLS (locally or behind a proxy that terminates HTTPS), set DJANGO_SECURE_SSL_REDIRECT=False.

Screenshots

About Projects
About Projects
Blog Mobile
Blog Mobile

How it works

flowchart LR
    B[Browser] --> N[nginx<br/>TLS, static, media]
    N --> G[gunicorn]
    G --> D[Django: main]
    D --> S[(SQLite)]
    D -.-> T[Telegram / AlertBot]
    D -.-> C[Yandex SmartCaptcha]

A single main app: models for content, ratings and site settings, class-based views, a JSON API for ratings and comments, and an anonymous visitor middleware. Details (in Russian):

Deployment

deev.space runs on a VPS: gunicorn under a dedicated user behind nginx with a Let's Encrypt certificate; nginx serves static files and uploads. Prometheus monitors availability and certificate expiry. GitHub Actions builds the Docker image on every v* tag and publishes it to GitHub Packages and to the dcr.deev.su registry.

Development

pip install -r requirements-dev.txt
ruff check . && pytest

The tests (pytest-django) run in production mode and cover voting and anti-abuse, forms, escaping, pages and static files. CI runs the same checks on every push and pull request.

License

MIT — see LICENSE.

Author

Egor Deev — GitHub · Telegram · egor@deev.space


⭐ If you find this project useful, give it a star on GitHub!

Made with ❤️ — deev.space