Commit graph

39 commits

Author SHA1 Message Date
senke
4b841b3ac6 [INT-003] integration: Fix auth/login response format mismatch
- Added username field to UserResponse in Login handler
- Backend now returns { user: { id, email, username }, token: { access_token, refresh_token, expires_in } }
- Format matches frontend AuthResponse type
- Frontend client API already handles unwrapping correctly
- DTOs already use correct JSON tags (snake_case)

Phase: PHASE-1
Priority: P0
Progress: 8/267 (3.0%)
2025-12-23 01:44:54 +01:00
senke
a3f20d26bc [INT-001] integration: Fix API response format inconsistencies
- Fixed nested response structures in profile_handler.go (3 occurrences)
- Fixed nested response structures in playlist_handler.go (4 occurrences)
- Changed gin.H{"profile": profile} to profile directly
- Changed gin.H{"playlist": playlist} to playlist directly
- Changed gin.H{"collaborator": collaborator} to collaborator directly
- All responses now use consistent { success: true, data: {...} } format
- Frontend interceptor already handles unwrapping correctly

Phase: PHASE-1
Priority: P0
Progress: 6/267 (2.2%)
2025-12-23 01:42:53 +01:00
senke
325e58e755 [BE-API-002] api: Implement playlist collaborators endpoints
- Added routes in router.go: POST, GET, PUT, DELETE /playlists/:id/collaborators
- Applied RequireOwnershipOrAdmin middleware to POST, PUT, DELETE routes
- GET route accessible to collaborators (service layer checks permissions)
- Fixed UpdateCollaboratorPermission handler to use RespondWithAppError
- All handlers already existed in playlist_handler.go
- All endpoints properly authenticated and ownership checks enforced

Phase: PHASE-1
Priority: P0
Progress: 5/267 (1.9%)
2025-12-23 01:41:43 +01:00
senke
8592b3c76b [BE-API-001] api: Implement 2FA endpoints (setup, verify, disable)
- Created TwoFactorHandler with SetupTwoFactor, VerifyTwoFactor, DisableTwoFactor, GetTwoFactorStatus
- Added routes: POST /auth/2fa/setup, POST /auth/2fa/verify, POST /auth/2fa/disable, GET /auth/2fa/status
- Updated LoginResponse DTO to include requires_2fa flag
- Updated Login handler to check 2FA status and return requires_2fa flag when enabled
- Reused existing TwoFactorService (already had QR generation and TOTP verification)
- Added VerifyTOTPCode helper method to TwoFactorService
- All endpoints properly authenticated with RequireAuth middleware

Phase: PHASE-1
Priority: P0
Progress: 4/267 (1.5%)
2025-12-23 01:40:28 +01:00
senke
b01d21f030 [BE-SEC-003] security: Fix ownership verification for playlist updates/deletes
- Added RequireOwnershipOrAdmin middleware to PUT/DELETE /playlists/:id routes
- Created playlistOwnerResolver that loads playlist from DB and returns owner user_id
- Service already handles ownership checks and collaborator permissions
- All existing integration tests pass (TestUpdatePlaylist_AsOwner, TestUpdatePlaylist_NotOwner, TestDeletePlaylist_AsOwner, TestDeletePlaylist_NotOwner)

Phase: PHASE-1
Priority: P0
Progress: 3/267 (1.1%)
2025-12-23 01:37:56 +01:00
senke
0b4d845012 [BE-SEC-002] security: Fix ownership verification for track updates/deletes
- Verified RequireOwnershipOrAdmin middleware is correctly applied to PUT/DELETE /tracks/:id
- Verified trackOwnerResolver correctly loads track from DB and returns user_id
- Added comprehensive integration tests for ownership verification
- Test: user cannot update another user's track (403 Forbidden)
- Test: user cannot delete another user's track (403 Forbidden)
- Test: admin can update any track (200 OK)
- Test: admin can delete any track (200 OK)
- Test: user can update own track (200 OK)
- Test: user can delete own track (200 OK)
- All tests pass

Phase: PHASE-1
Priority: P0
Progress: 2/267 (0.7%)
2025-12-23 01:37:10 +01:00
senke
68a2bdb541 [BE-SEC-001] security: Fix ownership verification for user profile updates
- Verified RequireOwnershipOrAdmin middleware is correctly applied to PUT /users/:id
- Added integration tests for ownership verification
- Test: user cannot update another user's profile (403 Forbidden)
- Test: admin can update any profile (200 OK)
- Test: user can update own profile (200 OK)
- All tests pass

Phase: PHASE-1
Priority: P0
Progress: 1/267 (0.4%)
2025-12-23 01:36:04 +01:00
senke
1203e51760 fix(MVP-014): Add CORS credentials configuration validation 2025-12-22 23:17:24 +01:00
senke
ecd3d29d25 fix(MVP-009): Fix GetMe endpoint to return full user object from database 2025-12-22 23:03:46 +01:00
senke
34f3468c89 fix(MVP-006): Standardize environment variable names (VITE_API_BASE_URL → VITE_API_URL) 2025-12-22 22:56:37 +01:00
senke
bacaded324 stabilizing apps/web: THIRD BATCH - FIXED Playwright 2025-12-21 18:55:51 -05:00
senke
df06693508 stabilizing apps/web: SECOND BATCH - FIXING Playwright 2025-12-17 12:20:42 -05:00
senke
eff37efb57 stabilizing apps/web: FIRST BATCH 2025-12-17 08:07:35 -05:00
senke
b9ee16943f stabilizing veza-backend-api: LAST REMEDIATION 2025-12-16 14:07:36 -05:00
senke
bfcec3dd78 stabilizing veza-backend-api: P3 - FINAL 2025-12-16 13:37:36 -05:00
senke
b7b226d1d5 stabilizing veza-backend-api: P1 & P2 2025-12-16 13:34:08 -05:00
senke
54a570bb74 stabilizing veza-backend-api: P0 2025-12-16 11:59:56 -05:00
senke
3c534a59a0 stabilizing veza-backend-api: phase 1 2025-12-16 11:23:49 -05:00
senke
de191cf0fc refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
okinrev
e9e306c347 report generation and future tasks selection 2025-12-08 19:57:54 +01:00
okinrev
11a093366a fix(redis,rabbitmq): clean dev/lab behavior 2025-12-07 14:28:55 +01:00
okinrev
a4c6b11d95 chore(dev): add lab migration and run scripts 2025-12-07 14:27:51 +01:00
okinrev
be950522e4 fix(health): make readiness check reflect real dependency state 2025-12-07 14:27:07 +01:00
okinrev
3366d40101 fix(db): align automatic migrations with SQL files 2025-12-07 14:26:48 +01:00
okinrev
af0e42c656 refactor(marketplace): enforce unified api response envelope
Some checks failed
Veza CI / Rust Services (Chat & Stream) (push) Failing after 0s
Veza CI / Frontend (Web) (push) Failing after 0s
Veza CI / Backend (Go) (push) Failing after 0s
2025-12-06 17:39:04 +01:00
okinrev
e7ae13736b refactor(track): enforce unified api response envelope 2025-12-06 17:37:00 +01:00
okinrev
02cad8db4d feat(api): remediate missing openapi spec and annotate handlers 2025-12-06 17:34:18 +01:00
okinrev
843dff3c92 STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
okinrev
eb40e06d4c STABILISATION: phase 1 & phase 2 2025-12-06 14:45:07 +01:00
okinrev
4aec310f06 feat(backend-worker): persist job queue in postgres 2025-12-06 13:32:32 +01:00
okinrev
539b3115d7 chore(backend-tests): remove obsolete metrics and profile/system_metrics tests 2025-12-06 13:25:10 +01:00
okinrev
76f2677c17 fix(backend-tests): enable room_handler_test and resolve metric collisions 2025-12-06 12:53:15 +01:00
okinrev
578a898418 chore(backend): remove legacy migrations and main file 2025-12-06 11:50:22 +01:00
okinrev
0ad04f589d fix(backend-worker): replace blocking sleep with non-blocking scheduler 2025-12-06 11:49:54 +01:00
okinrev
1ef0e0d6d6 P0: stabilisation backend/chat/stream + nouvelle base migrations v1
Backend Go:
- Remplacement complet des anciennes migrations par la base V1 alignée sur ORIGIN.
- Durcissement global du parsing JSON (BindAndValidateJSON + RespondWithAppError).
- Sécurisation de config.go, CORS, statuts de santé et monitoring.
- Implémentation des transactions P0 (RBAC, duplication de playlists, social toggles).
- Ajout d’un job worker structuré (emails, analytics, thumbnails) + tests associés.
- Nouvelle doc backend : AUDIT_CONFIG, BACKEND_CONFIG, AUTH_PASSWORD_RESET, JOB_WORKER_*.

Chat server (Rust):
- Refonte du pipeline JWT + sécurité, audit et rate limiting avancé.
- Implémentation complète du cycle de message (read receipts, delivered, edit/delete, typing).
- Nettoyage des panics, gestion d’erreurs robuste, logs structurés.
- Migrations chat alignées sur le schéma UUID et nouvelles features.

Stream server (Rust):
- Refonte du moteur de streaming (encoding pipeline + HLS) et des modules core.
- Transactions P0 pour les jobs et segments, garanties d’atomicité.
- Documentation détaillée de la pipeline (AUDIT_STREAM_*, DESIGN_STREAM_PIPELINE, TRANSACTIONS_P0_IMPLEMENTATION).

Documentation & audits:
- TRIAGE.md et AUDIT_STABILITY.md à jour avec l’état réel des 3 services.
- Cartographie complète des migrations et des transactions (DB_MIGRATIONS_*, DB_TRANSACTION_PLAN, AUDIT_DB_TRANSACTIONS, TRANSACTION_TESTS_PHASE3).
- Scripts de reset et de cleanup pour la lab DB et la V1.

Ce commit fige l’ensemble du travail de stabilisation P0 (UUID, backend, chat et stream) avant les phases suivantes (Coherence Guardian, WS hardening, etc.).
2025-12-06 11:14:38 +01:00
okinrev
b088246175 lab DB: schema, migration et \d+ * 2025-12-04 18:00:13 +01:00
okinrev
4aa1ff1274 complete migration to full UUID - part A 2025-12-04 09:27:47 +01:00
okinrev
f3070f16f4 P0 UUID Phase A: migrations + backend Go UUID refactor 2025-12-04 02:15:48 +01:00
okinrev
2425c15b09 adding initial backend API (Go) 2025-12-03 20:29:37 +01:00