Skip to content

manti-by/odin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

196 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ODIN server core application

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.

Python 3.13 Code style: ruff License

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

Quick Start

  1. Install Python 3.13 and UV tool

  2. Clone sources, switch to working directory and setup environment:

git clone https://github.com/manti-by/odin.git
cd odin/
uv sync --all-extras
  1. 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
  1. Run development server:
uv run python manage.py runserver

Makefile Commands

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

Deployment

make deploy

This will: pull changes, sync dependencies, run migrations, collect static, and restart services.

Testing

make test

Code Quality

make 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 analysis

Database Operations

make dump       # Backup database to odin.sql
make restore    # Restore database from odin.sql

Project Structure

odin/
β”œβ”€β”€ 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

About

Home server with IoT dashboard

Topics

Resources

License

Stars

Watchers

Forks

Contributors