Add subspace-tv FastAPI service with Unraid deployment

Includes FastAPI application with device authentication, Docker configuration,
Bruno API tests, and git-based deployment scripts for Unraid.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Michael Simard
2026-01-22 09:22:32 -06:00
parent 171d55bd4e
commit 57ad4b0f33
21 changed files with 904 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
meta {
name: Config - Authorized Device
type: http
seq: 2
}
get {
url: {{baseUrl}}/api/v1/config
body: none
auth: none
}
headers {
X-Password: 1
}
assert {
res.status: eq 200
res.body.authorized: eq true
res.body.config.url: isDefined
res.body.config.username: isDefined
res.body.config.password: isDefined
}
docs {
Get configuration for an authorized password.
This request uses password "1" which is in the authorized_devices.json list.
Expected response includes full configuration with url, username, and password.
}

View File

@@ -0,0 +1,23 @@
meta {
name: Config - Missing Header
type: http
seq: 4
}
get {
url: {{baseUrl}}/api/v1/config
body: none
auth: none
}
assert {
res.status: eq 400
res.body.detail: eq X-Password header is required
}
docs {
Attempt to get configuration without X-Password header.
This request intentionally omits the required X-Password header.
Expected response is 400 Bad Request with error message.
}

View File

@@ -0,0 +1,28 @@
meta {
name: Config - Unauthorized Device
type: http
seq: 3
}
get {
url: {{baseUrl}}/api/v1/config
body: none
auth: none
}
headers {
X-Password: invalid-password
}
assert {
res.status: eq 200
res.body.authorized: eq false
res.body.config: isEmpty
}
docs {
Get configuration for an unauthorized password.
This request uses a password that is NOT in the authorized_devices.json list.
Expected response shows authorized: false with empty config object.
}

20
bruno/Health Check.bru Normal file
View File

@@ -0,0 +1,20 @@
meta {
name: Health Check
type: http
seq: 1
}
get {
url: {{baseUrl}}/health
body: none
auth: none
}
assert {
res.status: eq 200
res.body.status: eq healthy
}
docs {
Health check endpoint to verify service is running.
}

5
bruno/bruno.json Normal file
View File

@@ -0,0 +1,5 @@
{
"version": "1",
"name": "Subspace TV Config API",
"type": "collection"
}

View File

@@ -0,0 +1,3 @@
vars {
baseUrl: http://localhost:8000
}

View File

@@ -0,0 +1,3 @@
vars {
baseUrl: https://your-production-server.com:8000
}