# 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.