Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d144070
Add livestream service
mrdarrengriffin Jul 9, 2026
5ff8c27
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
dfb64ca
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
519a220
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
290fc9a
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
5c9b8d4
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
e4bbc26
Switch implementation
mrdarrengriffin Jul 9, 2026
d12e059
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
3bee330
Potential fix for pull request finding
mrdarrengriffin Jul 9, 2026
9cfc4f4
Refactor YouTube feed URL usage to utilize a centralized feedUrl func…
mrdarrengriffin Jul 9, 2026
92b2eb2
Enhance LivestreamService with discovery and reconcile state manageme…
mrdarrengriffin Jul 9, 2026
0284ebb
Refactor error handling in LivestreamService, PubSubController, and P…
mrdarrengriffin Jul 9, 2026
0b463b5
Enhance LivestreamService error handling and ensure deterministic sta…
mrdarrengriffin Jul 9, 2026
6219cb1
Update environment configuration and enhance PubSub handling; require…
mrdarrengriffin Jul 9, 2026
382b0dc
Potential fix for pull request finding
mrdarrengriffin Jul 14, 2026
1d584a1
Potential fix for pull request finding
mrdarrengriffin Jul 14, 2026
14beac1
Potential fix for pull request finding
mrdarrengriffin Jul 14, 2026
cf5c20e
Potential fix for pull request finding
mrdarrengriffin Jul 14, 2026
495aeba
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
704f106
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
db0f8c0
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
612f960
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
849eb22
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
baab315
Potential fix for pull request finding
mrdarrengriffin Jul 15, 2026
407b4d2
Potential fix for pull request finding
mrdarrengriffin Jul 17, 2026
86e0aab
Merge branch 'main' into youtube-api
djwmarcx Jul 27, 2026
bbea247
refactor(livestream): discover via RSS only and configure channels vi…
djwmarcx Jul 28, 2026
ffbaa41
test(livestream): add unit and e2e suites and run them in CI
djwmarcx Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"name": "Open Home Foundation - API",
"image": "mcr.microsoft.com/devcontainers/typescript-node:24-bookworm",
"forwardPorts": [
443
3000
],
"portsAttributes": {
"443": {
"label": "HTTPS server"
"3000": {
"label": "web-api (HTTP)"
}
},
"customizations": {
Expand All @@ -31,4 +31,4 @@
},
"postCreateCommand": "pnpm install",
"remoteUser": "node"
}
}
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# YouTube Data API v3 key (https://console.cloud.google.com/apis/credentials).
# Required to classify videos found in each channel's RSS feed; without it the
# livestream endpoints stay reachable but every channel reports "none".
YOUTUBE_API_KEY=

# Channels to track: a comma-separated list of handle:slug pairs.
# - handle: the YouTube handle used to find the channel, with or without "@".
# - slug: the path this API serves the channel under (/livestream/<slug>) and
# the "channel" field in the response. Pinned here rather than derived
# from the channel's YouTube name so renaming the channel on YouTube
# cannot silently change our public URLs.
# Display names are read from each channel's feed at runtime, so they are not
# configured here. Adding or removing a project is a config change, not a code
# change; malformed or missing config fails startup rather than tracking nothing.
LIVESTREAM_CHANNELS=home_assistant:home-assistant,esphomeio:esphome,OpenHomeFndn:open-home-foundation,musicassistantio:music-assistant
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,38 @@ permissions:
contents: read

jobs:
test:
name: Tests
runs-on: ubuntu-latest
env:
# pnpm's minimumReleaseAge re-validates every lockfile entry's publish
# date even for frozen installs. That cooldown is a resolution-time guard
# for adopting new versions; CI merely reproduces an already-gated,
# PR-reviewed lockfile, so it should not be re-gated here.
PNPM_CONFIG_MINIMUM_RELEASE_AGE: 0
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24

# pnpm is pinned via the packageManager field, so corepack resolves the
# exact version the lockfile was written with.
- name: Enable corepack
run: corepack enable

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Unit tests
run: pnpm test

- name: End-to-end tests
run: pnpm test:e2e

docker_build:
name: Docker Build
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
dist/
*.log
.DS_Store
.env
coverage/
24 changes: 23 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@
"build": "nest build",
"start": "nest start",
"start:dev": "nest start --watch",
"start:prod": "node dist/main"
"start:prod": "node dist/main",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"jest": {
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testRegex": "src/.*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": ["src/**/*.(t|j)s"],
"coverageDirectory": "coverage",
"testEnvironment": "node"
},
"dependencies": {
"@nestjs/common": "^11.1.19",
"@nestjs/config": "^4.0.4",
"@nestjs/core": "^11.1.19",
"@nestjs/platform-express": "^11.1.19",
"@nestjs/platform-socket.io": "^11.1.19",
Expand All @@ -21,8 +37,14 @@
"devDependencies": {
"@nestjs/cli": "^11.0.21",
"@nestjs/schematics": "^11.1.0",
"@nestjs/testing": "^11.1.28",
"@types/jest": "^30.0.0",
"@types/node": "^24.12.2",
"@types/supertest": "^7.2.1",
"jest": "^30.4.2",
"socket.io-client": "^4.8.3",
"supertest": "^7.2.2",
"ts-jest": "^29.4.11",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
Expand Down
Loading