How isaiahharvi/orion works
Project type and purpose
• Full-stack, containerized web application for real-time observation and intelligence gathering.
• Frontend: SvelteKit SPA (src/app).
• Backend/API: Python service exposing endpoints (src/services/api).
• Data pipeline pieces: model logic (src/services/model), scan utilities (src/services/scans), and Postgres persistence (src/services/postgres).
• Docker Compose orchestration for GUI, API, and Postgres.
File structure
• Top-level: devcontainer for local dev, deploy for production Dockerfiles and compose files, data for static assets/checkpoints, scripts for helpers, src/app for UI, src/services for backend logic, tests.
• The presence of multiple src/services subfolders hints at a layered backend (API controllers, ML model logic, data scans, DB adapters).
• compose.yml and deploy/compose.yml define three main services: gui, api, postgres.
• Scripts like get_data.sh, setup_dev.sh indicate data ingestion/setup pipelines.
Extract key architecture info from README
• Docker Compose profile “gui” brings up both frontend and backend.
• Environment variable VITE_API_URL for pointing the frontend at the API.
• API docs exposed under /api/docs.
• External data sources: UAV telemetry, NEXRAD radar, AIS tracking.
Main components
a. Frontend (GUI) container
– SvelteKit application (port 5173)
– Fetches data via REST/WebSocket from API
b. API container
– Python service (FastAPI or similar)
– Routes in src/services/api/api.py
– Invokes model logic (src/services/model) and scan utilities (src/services/scans)
– Orchestrates data ingestion and transformation
c. Database (Postgres) container
– Persistent store for raw and processed data (deploy/postgres)
– DB migrations or seed data scripts (get_db_sample.py, start_db.sh)
d. Data sources (external)
– UAV feed
– NEXRAD stations (CSV + live)
– AIS vessel tracking
e. Data folder (local)
– Checkpoints folder with Keras ML model
– Static files (nexrad_stations.csv)
Interactions and data flow
• User → Browser → Frontend (HTTP/WS)
• Frontend → API (HTTP)
• API → Postgres (SQL via store.py)
• API → Model logic (local ML inference using checkpoints)
• API → Scan modules (fetch/parse NEXRAD, AIS, UAV feeds)
• Scheduled or on-demand scripts (get_data.sh) populate raw data directory / DB
• Optionally background tasks in the API container trigger model retraining or inference
Architectural patterns & design principles
• Layered backend: API (controllers) → services/model & services/scans (business logic) → services/postgres (data access)
• Container-per-concern: GUI, API, Postgres
• Infrastructure as code: Docker Compose and deploy scripts govern deployment.
• Dev container for reproducible local development.
• Clear separation of concerns: UI vs domain logic vs persistence.
Technologies & frameworks
• Frontend: SvelteKit, Vite, Tailwind, TypeScript
• Backend: Python 3.x, FastAPI (implied), PyTorch/Keras for ML
• Database: PostgreSQL
• Orchestration: Docker Compose, Devcontainer
• CI: GitHub Actions (lint and unit tests for both TS and Python)