Commit Graph

34 Commits (bd9bf2bcee71ce85be9a99fa4f7c33d3f03cc054)

Author SHA1 Message Date
zijiren233 81f1ae60d2
fix 3 months ago
zijiren233 db9d1e1a20
refactor 3 months ago
zijiren233 2a0469b4d8
feat: toxonomy 3 months ago
zijiren233 e5460da679
chore 3 months ago
zijiren233 12ad86a42f
feat: pin message 3 months ago
zijiren233 9302b72e10
refactor: split core service and API modules 4 months ago
zijiren233 d16476d7e6
Implement registration review updates 4 months ago
zijiren233 48bde0e2c1
fix: user password and email cache 4 months ago
zijiren233 f8fc4ce866
feat: file storage 4 months ago
zijiren233 f520191a27
fix: ci lint 4 months ago
zijiren233 7e39ee5225
fix: ci lint 5 months ago
zijiren233 c2d71db035
fix: ci lint 5 months ago
zijiren233 f0dcd4928f
fix: ci lint 5 months ago
zijiren233 d8247ab66c
fix: ci lint 5 months ago
zijiren233 0b196e8e6c
fix: ci lint 5 months ago
zijiren233 4c06a95f3f
fix: ci lint 6 months ago
zijiren233 268a989918
fix: ci lint 6 months ago
zijiren233 e0c34b330d
feat: more test 6 months ago
zijiren233 f6e7232155
feat: more test 6 months ago
zijiren233 de99f0e9d2
feat: more test 6 months ago
zijiren233 79d028ddca
feat: more test 6 months ago
zijiren233 9c69a234f1
feat: more test 7 months ago
zijiren233 39770e2f84
feat: more test 7 months ago
zijiren233 2ada4223b1
feat: more test 7 months ago
zijiren233 da2f8bf82d
feat: more test 7 months ago
zijiren233 6337e18664
chore: ci 7 months ago
zijiren233 d502744ce9
chore: ci 7 months ago
zijiren233 b015a234d5
fix: more test 7 months ago
zijiren233 9a5d07686e
fix: more test 7 months ago
zijiren233 c50baba82f
chore: infra 7 months ago
zijiren233 8b2c563770
chore: infra 7 months ago
zijiren233 ea5bbf00ed
fix(auth): enforce JWT secret entropy validation unconditionally
Previously, JWT secret entropy validation was only enforced in release
builds (cfg(not(debug_assertions))), silently allowing weak secrets in
debug/test builds. Change to always validate, with explicit opt-out via
SYNCTV_JWT_SKIP_ENTROPY_CHECK=1 environment variable. Update all test
secrets to meet minimum entropy requirements.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
Copilot e6ae9e8145
feat: implement Bilibili danmu SSE, complete benchmarks, add OpenAPI docs for all endpoints (#1)
* Initial plan

* feat: implement Bilibili danmu SSE endpoint and complete benchmark stubs

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

* Add comprehensive OpenAPI path definitions for admin, email, notifications, oauth2, live, and provider endpoints

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

* docs: update TODO.md to reflect all completed items

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

* fix: correct benchmark include_bytes path and add auth doc comment

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

* fix: remove uploaded PEM keys, generate RSA keys at runtime in benchmarks

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

* feat: implement get_movie_info gRPC, send_test_email, TURN allocations tracking, OSS storage integration

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

* fix: use compare_exchange for atomic TURN allocation limit enforcement

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

* feat: implement OAuth2 unbind, LeastConnections load balancing, complete all remaining stubs

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zijiren233 <84728412+zijiren233@users.noreply.github.com>
8 months ago