feat: implement StaySense MVP backend, frontend, imports, and deployment docs

This commit is contained in:
Oliver 2026-02-15 13:08:56 +01:00
commit 902988276c
No known key found for this signature in database
24 changed files with 2536 additions and 0 deletions

View file

@ -0,0 +1,18 @@
[Unit]
Description=StaySense API Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/staysense/backend
Environment=STAYSENSE_SERVER_SALT=CHANGE_ME
Environment=STAYSENSE_SIGNAL_COOLDOWN_HOURS=24
ExecStart=/usr/bin/python3 /opt/staysense/backend/server.py
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,11 @@
[Unit]
Description=StaySense Data Import Job
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=www-data
Group=www-data
WorkingDirectory=/opt/staysense/backend
ExecStart=/usr/bin/python3 /opt/staysense/backend/run_import_jobs.py --config /opt/staysense/docs/open_data_sources.json --prune-legacy

View file

@ -0,0 +1,11 @@
[Unit]
Description=Run StaySense import every 6 hours
[Timer]
OnBootSec=5min
OnUnitActiveSec=6h
Unit=staysense-import.service
Persistent=true
[Install]
WantedBy=timers.target