ODIN is a Django-based backend application delivering comprehensive RESTful APIs and management interfaces. It powers data ingestion, processing, and visualization for the Coruscant Raspberry Pi-based heating control system, exposes endpoints for Centax satellite sensor telemetry (including real-time IoT data streams), and features an interactive dashboard with customizable graphs and historical analytics.
Author: Alexander Chaika manti.by@gmail.com
Source link: https://github.com/manti-by/odin/
Requirements: Python 3.13, PostgreSQL 18, Redis 7, UV.
Version: v1.6.0
-
Install Python 3.13 and UV tool
-
Clone sources, switch to working directory and setup environment:
git clone https://github.com/manti-by/odin.git
cd odin/
uv sync --all-extras- Collect static, run migrations and create superuser:
uv run python manage.py collectstatic --no-input
uv run python manage.py createsuperuser
uv run python manage.py migrate- Run development server:
uv run python manage.py runserver| Command | Description |
|---|---|
make run |
Start development server |
make migrate |
Run database migrations |
make messages |
Generate translation files (ru) |
make locale |
Compile translation files (ru) |
make static |
Collect static files |
make test |
Run test suite |
make check |
Run pre-commit hooks |
make django-checks |
Run Django checks |
make pip |
Install dev dependencies |
make update |
Update dependencies and pre-commit hooks |
make ci |
Run pip, checks, and tests |
make dump |
Backup database to odin.sql |
make restore |
Restore database from odin.sql |
make deployThis will: pull changes, sync dependencies, run migrations, collect static, and restart services.
make testmake check # Run all pre-commit hooks
uv run ruff check . # Lint only
uv run ruff format . # Format only
uv run bandit -c pyproject.toml . # Security analysismake dump # Backup database to odin.sql
make restore # Restore database from odin.sqlodin/
βββ api/ # REST API endpoints
βββ apps/ # Django apps (core, relays, sensors, weather)
βββ tests/ # Test suite
βββ static/ # Static files (CSS, JS, images)
βββ templates/ # Django templates
βββ locale/ # Translation files
βββ settings/ # Django settings (base, dev, prod, test, sqlite)
βββ configs/ # Nginx and other configs
βββ opencode.json # Opencode configuration
βββ manage.py # Django management script