Initial commit: Infrastructure host tracking app
build-and-push / build-and-push (push) Successful in 1m26s

Fastify + node:sqlite single-process app with vanilla JS UI for
looking up hosts by hardware ID, hostname, or asset ID. Includes
per-host network interface tracking, sites/rooms/server-types CRUD,
Docker packaging, and a Gitea Actions workflow that runs tests then
builds and pushes to gitea.thewrightserver.net/josh/infrastructure.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 17:05:50 -04:00
commit f500db971b
26 changed files with 4057 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# Infrastructure
A small internal tool for tracking servers. Search hosts by hardware ID, hostname, or asset ID; manage where they live (site / room / position) and what kind of server they are. Browser UI plus a JSON API.
## Run
```sh
npm install
npm start
```
UI on `http://localhost:3000`, API at `http://localhost:3000/api`.
## Test
```sh
npm test
```
## Docker
```sh
docker compose up --build
```
Data persists in the `infrastructure-data` named volume.
## API
| Method | Path | Notes |
|---|---|---|
| GET | `/api/hosts?q=` | Substring search across `hardware_id`, `hostname`, `asset_id`. Capped at 200 results. |
| GET | `/api/hosts/:id` | Fetch one. |
| POST | `/api/hosts` | Create. |
| PUT | `/api/hosts/:id` | Replace. |
| DELETE | `/api/hosts/:id` | Hard delete. |
| `*` | `/api/sites[/:id]` | Site CRUD. |
| `*` | `/api/rooms[/:id]` | Room CRUD (`?site_id=` filter on GET). |
| `*` | `/api/server-types[/:id]` | Server-type CRUD. |
Errors: `{ error, details? }` with status 400 / 404 / 409 / 500.