Social network built with Django Framework.
- Multi-language (currently English and Russian). Selected based on browser settings.
- Light and dark theme support with a switch. The browser theme is selected by default.
- Progressive Web App (PWA) support.
- Register and confirm their account by email
- Sign in
- Add backup email addresses in case they lose access to the primary address
- Reset and change their password
- Use two-factor authentication with time-based one-time passwords (TOTP)
- Provide information about themselves in their profile
- Write real-time messages with Markdown and HTML support to other users using WebSockets
- Create, edit, like and delete posts and comments with Markdown and HTML support
- View images in posts, comments and messages as a gallery using viewerjs
- Subscribe to other users to see their posts in their news feed
- Inexact search for posts by text
- Inexact search for messages by text
- Inexact search for users by selectable fields
- Delete their account
- And a lot of other little things
- All of the above
- Use Django admin panel
- Use a REST API that has a Swagger UI and supports all CRUD operations and filtering
- Receive error notifications in Sentry or by email
Copy the .env.example
file to .env
. Set the settings you need in the .env
file.
# Pull service images
docker compose pull --ignore-buildable
# Build services
docker compose build --pull
# Run DB migrations
docker compose run --rm django python3 manage.py migrate
# Create a superuser if you want
docker compose run --rm django python3 manage.py createsuperuser
# Compile translations
docker compose run --rm django python3 manage.py compilemessages --locale en --locale ru
# Run without debugpy
docker compose up
# Or run with debugpy
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.debugpy.yml up
To run this in production, you need to specify the production settings in .env
.
# Pull service images
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull --ignore-buildable
# Build services
docker compose -f docker-compose.yml -f docker-compose.prod.yml build --pull
# Run DB migrations
docker compose -f docker-compose.yml -f docker-compose.prod.yml run --rm django python3 manage.py migrate
# Create a superuser if you want
docker compose -f docker-compose.yml -f docker-compose.prod.yml run --rm django python3 manage.py createsuperuser
# Run
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
- Docker
- Docker Compose
- Python 3.12
- Django 5.1
- django-allauth
- django-bootstrap5
- django-cleanup
- django-environ
- django-filter
- django-logentry-admin
- djangorestframework
- drf-spectacular
- channels
- channels-redis
- sentry-sdk
- websockets
Markdown parsing, HTML minification and sanitization, and a few other things are implemented in Rust in the socnet_rs
package using the following libraries:
- ammonia
- minify-html
- pulldown-cmark
- pyo3
- PostgreSQL 17 for persistent data
- Valkey 8 (FOSS Redis fork) for cache and as a layer for Channels
- HTML with Django Template language
- HTMX 2
- Bootstrap CSS 5.x
- Font Awesome 6
- TypeScript (compiled and minified with esbuild)
- viewerjs
- luxon
- Caddy
- gunicorn
- uvicorn
- pytest
- factory-boy
- mypy
- ruff
- eslint
- stylelint