Sidewinder
Sidewinder is an open-source Django starter kit that focuses on good defaults, developer experience, and deployment. Also, a snake.
You can start a new Django project without worrying about the correct project structure, or what development and testing tools to install and how to configure them. You can also deploy your new project right away with provided Ansible playbook in a few minutes.
Philosophy
Sidewinder is opinionated to provide smooth experience from starting a new project to deploying it on a single Virtual Private Server (VPS). It is ideal for indie hackers, educators, students and the like.
Main features
Configuration
- Good default project structure
- Dependency management with Poetry that makes it straightforward to manage virtual environments
- Project configuration via environment variables thanks to django-environ
- Pre-configured for GeoDjango
Authentication
- Custom
User
model to allow future extensibility - Configured django-allauth for email login and 3rd party authentication
- Stronger password hashing with argon2-cffi
Frontend
- It is expected that you bring your own CSS/CSS framework
- Basic one-file CSS is included to style authentication-related and example pages
- Configured htmx for smoother frontend interactions
HTTP APIs
- Django REST Framework for writing REST APIs with configured token authentication
- drf-spectacular for HTTP API documentation
- drf-standardized-errors for standardized API responses, including configuration for drf-spectacular
- django-cors-headers to allow cross-origin requests (restricted to HTTP API endpoints)
Task queue
- huey for executing background and periodic tasks
- django-huey-monitor for monitoring huey task queue in Django admin
Development Tools
- ruff for automatic code formatting, linting, and import sorting
- django-extensions for additional Django commands like
shell_plus
- django-browser-reload and django-watchfiles for auto reloading
- django-debug-toolbar for debugging
- django-silk for profiling requests and db queries
- snoop for ad-hoc debugging
- pre-commit hook
- bandit for finding security issues
- Logging with structlog via django-structlog
Testing
- pytest test runner via pytest-django
- Useful pytest plugins like
pytest-sugar
,pytest-icdiff
,pytest-randomly
,pytest-xdist
,pytest-cov
- factoryboy for defining fixtures
- Faker for generating fake data
- Playwright for end-to-end UI testing
- openapi-spec-validator for validating the generated API specs
Deployment
- Prepared deployment to a single Virtual Private Server (VPS) with reverse proxy and PostgreSQL database
- Ansible playbook that deploys the project in one go
- Fedora as the compatible operating system
- PostgreSQL as the database
- Caddy as the reverse proxy server
- gunicorn as the WSGI HTTP Server
systemd
service- Backup and restore commands