Skip to content

FirdevsTorlak/wehrtechnik-mini-procurement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rugged IoT Sensor Kit — Mini Procurement Demo

Repository Root: "wehrtechnik-mini-procurement/"
Author: Firdevs Torlak

This repository is a compact, end-to-end demo of a defense-style procurement and lifecycle workflow. It walks through requirements (Lastenheft), technical specification (Pflichtenheft), a working prototype (FastAPI + SQLite + HTML dashboard), automated acceptance tests (pytest), a quality plan/report template (Güteprüfplan), and a simple usage-support dashboard (Nutzungsbetreuung).

Why this project fits the role • Requirements → Specification: Clear customer requirements and a technical specification that map one-to-one. • Prototype & Acceptance: FastAPI backend + dashboard prove feasibility and allow automated acceptance tests. • Quality Assurance: A Güteprüfplan defines incoming/in-process/final checks and a report template. • Usage Support (Nutzungsbetreuung): A small UI shows inventory, firmware versions, and latest readings—demonstrating “keeping equipment up to date.” • Engineering Discipline: Dockerized services and CI (GitHub Actions) enforce repeatability.

System overview Edge (simulated)FastAPI APISQLite storageDashboard (HTML/JS)

• Devices can be registered and send readings (temperature, humidity). • API validates ranges and timestamps, and stores data. • Dashboard shows inventory, firmware distribution, and latest readings.

wehrtechnik-mini-procurement/ ├─ docs/ │ ├─ 01_Lastenheft.md │ ├─ 02_Pflichtenheft.md │ ├─ 03_Testplan_und_Abnahmecheckliste.md │ └─ 04_Guetepruefplan_und_Bericht.md ├─ sim/ │ └─ sensor_simulator.py ├─ app/ │ ├─ api/ # FastAPI application │ ├─ db/ # SQL schema and (demo) migrations │ └─ tests/ # pytest acceptance scenarios ├─ dashboard/ # Static HTML/JS dashboard served at /ui └─ ops/ ├─ Dockerfile ├─ docker-compose.yml └─ ci.yml # GitHub Actions pipeline

Quickstart

Option A — Local (no Docker)

  1. Install dependencies: python -m pip install fastapi uvicorn pydantic requests pytest
  2. Start API (from repo root): uvicorn app.api.main:app --reload
  3. Open: • Dashboard: http://localhost:8000/ui • API docs: http://localhost:8000/docs

Option B — Docker (recommended) cd ops docker compose up --build -d

Register a device and stream readings

  1. Register a device curl -X POST http://localhost:8000/devices
    -H "Content-Type: application/json"
    -d '{"name":"Hangar Sensor A","serial":"HANG-A-0001","firmware_version":"1.0.0"}' Take the returned ""id"" field for the next step.

  2. Run the simulator python sim/sensor_simulator.py --device-id 1 --base-url http://localhost:8000 --interval 2

API summary • POST /devices — register a device { name, serial, firmware_version }201 { id, ... }GET /devices — list devices • PATCH /devices/{id}/firmware — update firmware version • POST /readings — submit a reading { device_id, timestamp, temperature_c, humidity_pct } Valid ranges: "temperature_c in [-40, 85]", "humidity_pct in [0, 100]". Server checks time drift. • GET /dashboard/summary — counts, firmware distribution, and latest readings • GET /ui — static dashboard

Testing & CI • pytest acceptance tests cover device registration, valid/invalid reading ingestion, and the summary endpoint. • GitHub Actions (ops/ci.yml) runs linting and tests on each push/PR.

Run locally: pytest -q

Quality Plan & Acceptance • Test Plan & Checklist: docs/03_Testplan_und_Abnahmecheckliste.mdGüteprüfplan & Report Template: docs/04_Guetepruefplan_und_Bericht.md

Acceptance highlights: • Device registration and reading ingestion • Input validation (range, missing fields) • Summary correctness • CI green

Security (demo scope) • Recommend TLS offload via reverse proxy (not included in the demo compose). • Each reading is server-timestamped; basic rate-limiting can be added at the proxy. • Minimal PII; environmental data only.

Roadmap (ideas) • Token-based device auth and mutual TLS. • Firmware rollout orchestration and audit events. • Postgres + Alembic migrations for production. • Charts on the dashboard and alerting rules.

License & Author • Author: Firdevs Torlak • License: MIT (or choose a suitable license for your context).

About

Erstellung von Lasten- & Pflichtenheft; Definition von Leistungsbeschreibung und Schnittstellen. Prototyp (FastAPI + SQLite) mit Mess-datenerfassung, Validierung und Dash-board; Docker-Deployment. QA: automatisierte Abnahmetests (py-test), Güteprüfplan, Akzeptanz-Checkliste; CI (GitHub Actions).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages