Commit graph

1930 commits

Author SHA1 Message Date
senke
1fb80d6c2f feat(chat): Sprint 4 -- Docker cleanup, frontend migration to Go WS
- Remove Rust chat-server from docker-compose.yml, staging.yml, prod.yml
- Remove VITE_WS_URL from docker frontend env vars (auto-derived from API_URL)
- Update env.ts: derive WS_URL from API_URL (/api/v1/ws) when not explicitly set
- Remove 127.0.0.1:8081 dev hack from useChat.ts
- Add missing types: EditMessage, DeleteMessage, FetchHistory, SearchMessages,
  SyncMessages, MessageEdited, MessageDeleted, SearchResults, SyncChunk
- Update MSW chat/token handler to return ws_url: /api/v1/ws
- Update .env.example and .env.storybook
2026-02-22 20:46:58 +01:00
senke
c7fb240dc3 feat(chat): Sprint 3 -- message handlers, real-time features, permissions
- Implement full MessageHandler dispatch with all 18 incoming message types
- Add handler_messages.go: SendMessage, EditMessage, DeleteMessage with ownership checks
- Add handler_rooms.go: JoinConversation, LeaveConversation
- Add handler_history.go: FetchHistory (cursor-based), SearchMessages (ILIKE), SyncMessages
- Add handler_realtime.go: Typing, MarkAsRead, Delivered, AddReaction, RemoveReaction
- Add handler_calls.go: WebRTC signaling relay (CallOffer/Answer/ICE/Hangup/Reject)
- Add PermissionService: CanRead/CanSend/CanJoin/CanModerate based on room_members
- Add RateLimiter: per-user per-action sliding window (in-memory)
- Wire all dependencies in router.go setupChatWebSocket
2026-02-22 20:43:44 +01:00
senke
e8d97741e4 feat(chat): Sprint 2 -- WebSocket hub, client, message types, route
- Create Hub with register/unregister/broadcast, room/user index
- Create Client with readPump/writePump goroutines, 30s ping keepalive
- Define all 18 incoming + 18 outgoing message types matching Rust protocol
- Add ValidateChatToken to ChatService for JWT validation
- Update WSUrl from /ws to /api/v1/ws
- Register GET /api/v1/ws endpoint in router
- Create ChatWebSocketHandler for WebSocket upgrade and auth
2026-02-22 20:41:39 +01:00
senke
4d4d07836c feat(chat): Sprint 1 -- migrations, models, repositories for chat rewrite
- Add migrations 109-112: read_receipts, delivered_status, message_reactions, messages extra columns
- Create ReadReceipt, DeliveredStatus, MessageReaction GORM models
- Update Message model with EditedAt, Status, IsPinned, Metadata fields
- Enrich ChatMessageRepository with cursor pagination, search, soft delete
- Create ReadReceiptRepository, DeliveredStatusRepository, ReactionRepository
- Create ChatPubSubService with Redis PubSub and in-memory fallback
2026-02-22 20:38:20 +01:00
senke
431ad133e2 docs(v0.502): plan d'implémentation Chat Server Rewrite (Rust → Go)
- Create ADR-002-chat-server.md: decision to rewrite Rust chat in Go
- Rewrite V0_502_RELEASE_SCOPE.md with 4 detailed lots (34 tasks)
- Create PLAN_V0_502_IMPLEMENTATION.md with 6 sprints and commit instructions
- Update .cursorrules scope reference for v0.502
2026-02-22 20:26:18 +01:00
senke
c416f51f25 docs(v0.501): Sprint 6 -- finalization and tag
- FIN-01: Add smoke test results (22/22 features pass)
- FIN-02: Update PROJECT_STATE.md for v0.501
- FIN-03: Update CHANGELOG.md with v0.501 entries
- FIN-04: Archive V0_501 scope, create V0_502 placeholder
- FIN-05: Add v0.501 retrospective
- FIN-06: Validate Go build passes
2026-02-22 18:45:07 +01:00
senke
43309327e6 feat(v0.501): Sprint 5 -- integration, tests, and cleanup
- INT-01: Add E2E streaming tests (upload -> HLS auth)
- INT-02: Add E2E cloud tests (CRUD auth, public gear)
- INT-03: Split track/handler.go into 4 focused sub-handlers
- INT-04: Create migration squash script + MIGRATIONS.md
- INT-05: Add Trivy container image scanning CI workflow
- INT-06: Replace production console.log with structured logger
2026-02-22 18:40:07 +01:00
senke
edde637c8e feat(v0.501): Sprint 4 -- Cloud frontend + Gear advanced
- C1-09: Create CloudPage with folder tree, file list, and /cloud route
- C1-10: Create CloudUploadModal with drag-and-drop and progress
- C1-11: Create CloudFilePreview mini player inline
- C1-12: Add Cloud stories (loading, empty, populated, quota full)
- G1-01: Add is_public toggle, public gear endpoint, GearShowcase
- G1-02: Add gear image upload endpoints, GearImageGallery component
- G1-03: Add gear search with ILIKE + SearchBar in toolbar
- G1-04: Add stories for GearShowcase and GearImageGallery
2026-02-22 18:30:49 +01:00
senke
ec4564fb37 feat(v0.501): Sprint 3 -- Cloud Storage MVP backend
- C1-01: Create CloudService with CRUD folders/files, quota, ownership
- C1-02: Create CloudHandler with 11 REST endpoints
- C1-03: Register cloud routes in Go router
- C1-04: Implement file streaming with HTTP Range support
- C1-05: Add publish cloud file as track endpoint
- C1-06: Add MSW mock handlers for cloud API
- C1-07: Auto-init 5GB storage quota on user registration
- C1-08: Add 12 unit tests for CloudService
2026-02-22 18:23:58 +01:00
senke
73533bea77 feat(v0.501): Sprint 2 -- HLS production-ready
- S1-01: Add multi-bitrate streaming profiles (128k, 256k, 320k)
- S1-02: Update master.m3u8 endpoint with 3-tier quality system
- S1-03: Integrate hls.js with ABR + useHLSPlayer hook
- S1-04: Add Cache-Control headers on HLS segments and manifests
- S1-05: Create WaveformService with async generation (FFmpeg + audiowaveform)
- S1-06: Add GET /tracks/:id/waveform endpoint with Redis cache
- S1-07: Create WaveformDisplay component with story
- S1-08: Add 4 Prometheus metrics for streaming monitoring
2026-02-22 18:16:37 +01:00
senke
89cc015e54 feat(v0.501): Sprint 1 -- infrastructure foundations
- Add MinIO S3-compatible storage to docker-compose (dev, staging, prod)
- Create migrations 103-108 (waveform_url, user_folders, user_files,
  user_storage_quotas, gear_items.is_public, gear_images)
- Add Go models: UserFile, UserFolder, StorageQuota, GearImage
- Add WaveformURL to Track model, IsPublic + GearImages to GearItem model
2026-02-22 18:10:25 +01:00
senke
03d9517f2c docs: add v0.404 CHANGELOG and retrospective
FIN-05 + FIN-06: Complete CHANGELOG for v0.404 with all security,
infrastructure, code quality, documentation, testing, and integration
changes. Retrospective includes pre/post scores (4.2 -> 6.6/10).
2026-02-22 17:57:49 +01:00
senke
5cb85773ab docs: archive V0_404_RELEASE_SCOPE.md (completed)
FIN-04: Moved scope document to docs/archive/ with completion header.
2026-02-22 17:56:59 +01:00
senke
59d92366c9 docs: update SCOPE_CONTROL.md and cursorrules to reference v0.501
FIN-03: Active scope now points to V0_501_RELEASE_SCOPE.md.
Updated .cursorrules scope from v0.402 to v0.501.
2026-02-22 17:56:55 +01:00
senke
f944abd336 docs: update PROJECT_STATE.md to reflect v0.404 stabilization
FIN-02: Updated version to v0.404, added security score improvements
(5->7/10), infrastructure readiness, code quality metrics, and
updated next version target to v0.501.
2026-02-22 17:56:51 +01:00
senke
f25cc115b2 test(rust): add 51 unit tests across chat and stream servers
Some checks failed
Chat Server CI / test (push) Failing after 0s
Stream Server CI / test (push) Failing after 0s
INT-05: 26 tests in chat-server (config, error, permissions, rate
limiter, logging, utils) and 25 tests in stream-server (config,
error, auth, HLS, signature, utils). All test pure logic.
2026-02-22 17:55:27 +01:00
senke
80492a4644 refactor(websocket): replace gorilla/websocket with coder/websocket
INT-06: Migrated playback_websocket_handler.go from deprecated
gorilla/websocket to coder/websocket v1.8.14. Uses context-based
reads/writes and websocket.Accept instead of Upgrader.
2026-02-22 17:53:10 +01:00
senke
a6cf20e614 fix(tests): fix 2 skipped tests, add clear skip reasons to 11 others
INT-04: Fixed nil UserID panic in AuditService (re-enabled 2 tests).
Added INT-04 comments explaining skip reasons for tests requiring
PostgreSQL, real file headers, or external services.
2026-02-22 17:53:00 +01:00
senke
0907446958 test: add 5 cross-service E2E integration tests
INT-03: Tests for health endpoint, auth flow, track upload auth,
webhook HTTPS-only, and rate limit headers. Build-tagged
'integration' to avoid running in regular test suite.
2026-02-22 17:52:50 +01:00
senke
ee32aec970 feat(streaming): trigger HLS transcoding after track upload
INT-02: TrackService.copyFileAsync now calls StreamService.StartProcessing
after successful file copy. Wires the stream server integration into
all track route registrations.
2026-02-22 17:52:39 +01:00
senke
a1637bb9f3 docs: add ADR-001 (Go+Rust architecture) and ADR-002 (chat server migration)
CLN-08 + INT-01: Documents the rationale for multi-language architecture
and the decision to rewrite chat server from Rust to Go in v0.501.
2026-02-22 17:45:15 +01:00
senke
73d6cb2bee refactor(infra): centralize protobuf definitions in shared proto/ directory
CLN-07: Copied .proto sources from chat-server and stream-server
to proto/{common,chat,stream}/. Original copies remain until builds
are updated to use the shared directory.
2026-02-22 17:45:11 +01:00
senke
fc318d5aa0 chore: unify TypeScript version to 5.9.3 across all packages
CLN-06: apps/web, root, veza-docs, and fixtures package.json files
now pin TypeScript to exact version 5.9.3.
2026-02-22 17:45:07 +01:00
senke
31eb4ba075 docs: align FEATURE_STATUS.md with actual code state
CLN-05: Corrected OAuth status (Discord/Spotify not implemented),
HLS streaming (integration in progress), Chat (partial). Added
erratum section for v0.404 audit.
2026-02-22 17:45:03 +01:00
senke
8efd398239 refactor(frontend): eliminate ~45 'any' types in production code
CLN-04: Replaced any with unknown, proper interfaces, or concrete
types across 17 files. Focus: error handlers, API responses,
WebSocket data, and function parameters.
2026-02-22 17:44:49 +01:00
senke
872e42d81c refactor(backend): replace 40 fmt.Printf calls with zap structured logging
CLN-03: router.go, track/service.go, upload_validator.go, cors.go,
playlist_handler.go, and mfa.go now use zap.L() or local logger
for structured logging instead of fmt.Printf.
2026-02-22 17:44:38 +01:00
senke
8e9431fe93 feat(commerce): replace mock purchases with real API calls
CLN-02: getPurchases() now calls GET /marketplace/orders;
requestRefund() calls POST /marketplace/orders/:id/refund.
Removed MOCK_PURCHASES constant. MSW handler updated.
2026-02-22 17:44:29 +01:00
senke
834fa1f979 refactor: remove dead code (api_manager.go, unused templates)
CLN-01: Deleted archived api_manager.go (~789 LOC, build-tag ignore)
and dev-environment/templates/ (~806 LOC, never used by generator).
2026-02-22 17:44:19 +01:00
senke
763aea15cb fix(security): hash password reset tokens before database storage
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
INF-10: Reset tokens are now SHA-256 hashed before INSERT. Validation
hashes the received token and compares against stored hash. Plain
tokens never persisted.
2026-02-22 17:36:10 +01:00
senke
6b25ccc9da feat(monitoring): add Prometheus alerting rules for critical conditions
INF-08: Alert rules for service_down, high_error_rate (>5%),
high_latency (P99>2s), and redis_unreachable. Enabled rule_files
in prometheus.yml.
2026-02-22 17:36:07 +01:00
senke
3e0e1b5286 feat(infra): complete staging compose with chat, stream, and reverse proxy
INF-07: Added chat-server, stream-server, Caddy reverse proxy,
and healthchecks for all services in staging compose.
2026-02-22 17:36:03 +01:00
senke
de92bf6029 feat(ci): add CodeQL SAST scanning for Go and TypeScript
INF-06: New sast.yml workflow runs CodeQL analysis on push to main
and PRs for Go and JavaScript/TypeScript.
2026-02-22 17:35:50 +01:00
senke
68069df6e4 feat(ci): add clippy lint step for Rust services
INF-05: New rust-ci.yml runs cargo clippy with -D warnings for both
chat-server and stream-server.
2026-02-22 17:35:46 +01:00
senke
13c21ac114 feat(ci): add go vet and gofmt check to backend CI
INF-04: Backend CI now runs go vet and gofmt to catch issues early.
2026-02-22 17:35:42 +01:00
senke
66149ff2f7 fix(ci): add lint, typecheck and build steps to frontend CI
INF-03: frontend-ci.yml now runs eslint, tsc --noEmit, and vite build.
Audit level aligned to critical.
2026-02-22 17:35:39 +01:00
senke
389cfa95b0 fix(infra): align PostgreSQL to version 16 in test compose
INF-02: Test environment now uses postgres:16-alpine to match production.
2026-02-22 17:35:35 +01:00
senke
c29edd099b feat(security): implement Redis-backed rate limiter with in-memory fallback
INF-01: RedisRateLimiter uses atomic Lua script (INCR+EXPIRE) for
distributed rate limiting. Falls back to in-memory SimpleRateLimiter
when Redis is unavailable. Same X-RateLimit-* headers and 429 format.
2026-02-22 17:35:21 +01:00
senke
d64512ec66 fix(ci): move hardcoded E2E credentials to GitHub Secrets
SEC-10: Replaced hardcoded TEST_PASSWORD, JWT_SECRET, DATABASE_URL
password, and RABBITMQ_URL with GitHub Secrets references. Secrets
to create: E2E_TEST_PASSWORD, E2E_JWT_SECRET, E2E_RABBITMQ_URL,
E2E_DB_PASSWORD.
2026-02-22 17:32:52 +01:00
senke
d3245b2e4b fix(build): unify Go version to 1.24 across Dockerfile and CI
SEC-09: go.mod declares Go 1.24.0 but Dockerfile.production used 1.23
and backend-ci.yml used 1.23. Aligned both to 1.24.
2026-02-22 17:32:17 +01:00
senke
368c78c102 fix(security): require Hyperswitch webhook secret in production when payments enabled
SEC-08: If HYPERSWITCH_ENABLED=true in production, startup now fails
unless HYPERSWITCH_WEBHOOK_SECRET is set. This prevents webhook
signature verification from being silently bypassed.
2026-02-22 17:31:52 +01:00
senke
f14574322c fix(security): add SSRF protection for webhook URL registration
SEC-07: Strengthened ValidateWebhookURL to require HTTPS only (was
allowing HTTP). Private IP ranges, localhost, and cloud metadata
endpoints remain blocked.
2026-02-22 17:31:10 +01:00
senke
da3bad1b0e fix(security): add ownership check to GetUploadStatus handler (IDOR fix)
SEC-06: GetUploadStatus now verifies that the authenticated user owns the
upload before returning status. Returns 404 for non-owners to prevent
information disclosure.
2026-02-22 17:30:30 +01:00
senke
c6db1da25e fix(infra): add JWT_SECRET to stream-server in production compose
SEC-05: stream-server was missing JWT_SECRET while chat-server had it.
Both services need the shared secret to validate tokens.
2026-02-22 17:28:37 +01:00
senke
b84baf1823 fix(infra): remove docker-compose.hybrid.yml (network_mode host + default credentials)
SEC-04: File used network_mode: host on all services and had default
Grafana password 'admin'. Removed entirely; if needed in the future,
recreate without host networking.
2026-02-22 17:28:17 +01:00
senke
5e4291ecba feat(auth): add ephemeral stream-token endpoint for HLS and WebSocket authentication
SEC-03: TokenStorage.getAccessToken() returns null with httpOnly cookies.
New POST /api/v1/auth/stream-token returns a 5-min JWT compatible with
both stream server (Claims struct) and chat server (JwtClaims struct).
Frontend hlsService and websocket updated to use fetchStreamToken() fallback.
2026-02-22 17:28:00 +01:00
senke
3ad4699e80 fix(infra): add Redis authentication in production compose 2026-02-22 17:24:12 +01:00
senke
eb82e02c83 fix(ci): repair CD pipeline -- use vars.* instead of secrets.* in if conditions, target Dockerfile.production 2026-02-22 17:23:43 +01:00
senke
40c31b8c3d feat(marketplace): wire RefundRequestModal to API, add refund button to SellerDashboard (v0.403 R2)
- RefundRequestModal: call marketplaceService.refundOrder, loading state, onSuccess callback
- PurchasesView: pass loadPurchases as onSuccess to refetch after refund
- SellerDashboardView: add Refund button on each sale, RefundRequestModal with fetchData onSuccess
- MSW: add POST /marketplace/orders/:id/refund handler
2026-02-22 16:19:31 +01:00
senke
bab3f38c4a feat(marketplace): add license revoked_at migration 2026-02-22 16:18:01 +01:00
senke
51373b653f feat(hyperswitch): add CreateRefund to client 2026-02-22 16:17:54 +01:00