Commit Graph

36 Commits (310be5830e05bbbc87ba2c32cf500c82bcd2d7a8)

Author SHA1 Message Date
zijiren a9e43f399b
refactor(oauth): manage callback redirects at runtime (#41)
* feat: minimize OAuth identity data

* fix(helm): disable Kubernetes service links for strict config

* fix(helm): align database username environment variable

* fix(oauth): derive redirect allowlist from webauthn origins

* refactor(oauth): add runtime redirect allowlist

* build: limit release compiler parallelism

* fix(build): isolate target cache by architecture

* build: serialize container compilation

* refactor(oauth): require runtime redirect allowlist

* feat(auth): publish OAuth app-link associations

* test(cli): include OAuth redirect allowlist

* fix(config): warn on unknown startup settings

* fix(helm): use current image repository defaults

* fix(helm): set release image repository dynamically

* test(helm): accept fork image repositories
2 months ago
zijiren 831c0e89a7
feat: configure native passkeys and harden release validation (#37)
* feat: configure native passkeys in Helm

* ci: verify chart upgrades and runtime image
2 months ago
zijiren233 22767b415c
fix: harden asynchronous delivery and secret isolation 2 months ago
zijiren233 5012b1062d
feat: refresh project onboarding and presentation 2 months ago
zijiren233 029bc607bf
chore 2 months ago
zijiren233 a3fa5e770e
chore 2 months ago
zijiren233 57ff1247b6
fix 3 months ago
zijiren233 d60200f919
refactor 3 months ago
zijiren233 28c367802f
rsntp 3 months ago
zijiren233 335457ebea
chore 3 months ago
zijiren233 863044cf6f
feat: bump makefile 3 months ago
zijiren233 84c5963e99
chore 3 months ago
zijiren233 fea0e28623
chore 3 months ago
zijiren233 33777363e4
chore 3 months ago
zijiren233 701b532990
feat: secondary read databse pool 3 months ago
zijiren233 f8fc4ce866
feat: file storage 4 months ago
zijiren233 b19e81918a
fix: ci lint 4 months ago
zijiren233 c3f0afe665
fix: ci lint 4 months ago
zijiren233 b1bd9079c9
fix: ci lint 5 months ago
zijiren233 d27389a3cb
fix: ci lint 5 months ago
zijiren233 7e39ee5225
fix: ci lint 5 months ago
zijiren233 05fb99ed2d
fix: ci lint 5 months ago
zijiren233 f180066c7e
fix: ci lint 5 months ago
zijiren233 2cc58aede8
fix: ci lint 5 months ago
zijiren233 9b695f3a6d
fix: ci lint 5 months ago
zijiren233 8473c4d9a4
fix: ci lint 6 months ago
zijiren233 e0c34b330d
feat: more test 6 months ago
zijiren233 f6e7232155
feat: more test 6 months ago
zijiren233 1e05cc48d1
feat: more test 6 months ago
zijiren233 8b2c563770
chore: infra 7 months ago
zijiren233 6ecdef6e5e
chore: infra 7 months ago
zijiren233 c5b72c59ad
chore: infra 7 months ago
zijiren233 968e69f89b
chore: infra 7 months ago
zijiren233 023a84dce3
chore: infra 7 months ago
Claude e70d2c9979
Refactor: Rename streaming → livestream throughout codebase (#7)
* Initial plan

* Add comprehensive testing plan and start test infrastructure

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix test failures: update LiveQuery tests to use snake_case and remove unused imports

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix database migrations: fix UNSIGNED keyword, duplicate timestamps, reserved keywords, and type mismatches

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Add comprehensive test results summary documenting all fixes and test coverage

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Add comprehensive e2e integration tests covering auth, permissions, streaming, and error handling

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Change JWT from RS256 (RSA keys) to HS256 (secret)

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Add JWT migration documentation

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix config loading, OAuth2 registry, settings column, and HLS routes

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix UserRole/UserStatus database type encoding/decoding

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Add comprehensive API test suite with results documentation

- Comprehensive test script covering 13 API categories (24+ endpoints)
- Tests health, auth, user, room, media, playback, provider, notification, OAuth2 endpoints
- 15/24 tests passing (62.5% success rate)
- Detailed documentation of test results and known issues
- Multi-user testing with JWT authentication
- Automated test script with color-coded output

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix API endpoints: notifications, room list queries, and proto serialization

- Fix notification read-all endpoint to accept optional JSON body
- Fix RoomStatus database queries to use numeric values instead of strings
- Fix room list endpoint proto serialization (remove json!() wrapper)
- Add comprehensive API test suite and results documentation
- 10/17 endpoints now passing (58% success rate)

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix proto generation: regenerate Room struct with missing fields

Root cause: Room proto definition in client.proto had description (field 8) and
updated_at (field 9) but the generated Rust code was stale and only had fields
up to member_count (field 7). This caused room creation to fail with
"invalid type: null, expected u64" error when room_to_proto_basic() tried to
set non-existent fields.

Solution: Regenerate proto Rust code by rebuilding synctv-proto package with
protoc installed. This properly generates the Room struct with all 9 fields.

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix room creation: proto generation, RoomSettings deserialization, and status encoding

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix room status encoding and add nanoid PostgreSQL function

- Created nanoid() PostgreSQL function for ID generation in triggers
- Fixed RoomRepository to use i16 encoding/decoding for status column
- Added i16_to_status() helper method
- Updated row_to_room(), update(), and update_status() to use i16 instead of string
- Fixed create_root_playlist trigger to use NEW.created_by (not creator_id)

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix room_member repository: correct column references and status types

- Fixed SQL query to use rooms.id instead of incorrect rooms.room_id
- Fixed room status check to use i16 (1=Active) instead of string comparison
- Improved error handling for invalid room status

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix RoomRole and MemberStatus encoding in room_member repository

- Removed .to_string() calls on role and status bindings
- Allow sqlx custom encoders to handle i16 conversion
- Fixes "column role is of type smallint but expression is of type text" error
- Applied to add(), add_with_transaction(), update_role(), and update_status() methods

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix RoomRole and MemberStatus encoding in room_member repository

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix missing admin_*_permissions columns in SELECT queries

Fixed 4 SELECT queries in room_member.rs that were missing admin_added_permissions and admin_removed_permissions columns:
- get() method (line 203)
- get_any() method (line 225)
- list_by_room() method (line 247)
- list_by_room_with_online() method (line 273)

This was causing "no column found for name: admin_added_permissions" errors when permission checks tried to decode the RoomMember from query results.

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix database trigger and missing columns in room member queries

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Delete generated markdown files

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Remove SQL nanoid function and move root playlist creation to Rust

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Delete nanoid SQL files directly instead of creating drop migration

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Refactor: rename streaming → livestream throughout codebase

- Renamed synctv-stream directory to synctv-livestream
- Renamed src/streaming to src/livestream
- Updated config files: streaming → livestream
- Updated all code references throughout
- Updated Cargo.toml workspace config
- Updated test files

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

* Fix remaining streaming → livestream references

- Fixed module path in rtmp.rs
- Fixed imports in api/livestream.rs
- Fixed imports in protocols/hls/server.rs
- Build now passes successfully

Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>
8 months ago
zijiren233 9279d4006e
feat: init rs server 8 months ago