Commit Graph

30 Commits

Author SHA1 Message Date
27e6541425 fix: requireAdmin résout le user local par superOAuthId
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 59s
2026-03-14 15:14:03 +01:00
c7815aac2f feat: token refresh, video upload, playlist routes complets
- auth: cookie od_token 7j, refresh token od_refresh 30j, POST /api/auth/refresh, GET /api/auth/me/optional
- admin: POST /api/admin/videos/upload via multer (mp4/webm, 4Go max, UUID filename)
- playlist: PATCH /:id, DELETE /:id, POST /:id/videos, DELETE /:id/videos/:videoId
- env: UPLOADS_DIR documenté dans .env.example
2026-03-14 14:32:18 +01:00
aa15dc0f54 feat: AuthContext, protected routes, admin page, fix VideoPlayer URL 2026-03-14 14:31:08 +01:00
324efcaa3d feat: login email/password + proxy POST /api/auth/login → SuperOAuth
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
- auth.routes : POST /api/auth/login proxie vers SuperOAuth, pose httpOnly cookie
- Factorisation upsertUser() partagé avec /session
- LoginPage : form email/password + séparateur + boutons OAuth provider
2026-03-14 10:26:25 +01:00
7e3ee29b13 fix: login page avec sélection provider → /api/v1/auth/oauth/:provider?redirectUrl
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
SuperOAuth root page ignore ?redirectUrl, les boutons de sa UI pointent vers
ses propres URIs hardcodées. Fix : notre page /login construit les URLs API
directement avec redirectUrl=origins.tetardtek.com/callback.

Aussi : CORS_ORIGINS SuperOAuth mis à jour (origins.tetardtek.com ajouté).
2026-03-14 10:11:30 +01:00
34bab532be fix: login → SuperOAuth root page (redirectUrl), drop LoginPage interne
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
2026-03-14 10:04:20 +01:00
666cf6a435 feat: stream route, admin subscriptions, fix CORS multi-origin
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
- index.ts : CORS supporte plusieurs origines (FRONTEND_URL séparé par virgule)
- stream.routes.ts : GET /api/stream/:key* — sert fichiers locaux avec auth
  optionnelle, contrôle d'accès par level, support Range requests (seekable)
- admin.routes.ts : POST /api/admin/users/:id/subscriptions — assigne un plan,
  expire l'abonnement actif précédent
- Fix .env VPS : FRONTEND_URL=origins.tetardtek.com (domaine correct)
2026-03-14 09:58:01 +01:00
4265d21c8b feat: login provider selection, logout, playlists pages
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
- LoginPage : sélection Discord/GitHub/Google/Twitch via SuperOAuth
- Header : bouton Connexion → /login, logout ↩ quand connecté, nav Playlists conditionnelle
- useAuth : expose setUser pour logout côté Layout
- PlaylistsPage : liste owned/shared, création inline
- PlaylistPage : détail playlist + liste vidéos ordonnées
- Fix : Video.id number → string (UUID)
- Routes : /login, /playlists, /playlists/:id
2026-03-14 09:32:45 +01:00
fcd9867670 ci: fix pipeline — vps-runner host mode, remove setup-node, add smoke test
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 23s
2026-03-14 09:16:57 +01:00
77e5990078 ci: relance pipeline après ajout secrets
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 54s
2026-03-14 09:03:32 +01:00
5031b31aeb fix: pipeline CI/CD — vps-runner direct deploy (pm2 + rsync)
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Has been cancelled
Remplace le flow Docker (docker compose up) par le vrai modèle :
- Job unique sur vps-runner (runner local sur le VPS)
- Build backend → rsync vers /var/www/originsdigital/backend/ → pm2 restart
- Build frontend avec VITE_API_URL/VITE_SUPEROAUTH_URL → rsync vers /var/www/originsdigital/frontend/dist/
- Suppression appleboy/ssh-action (inutile, le runner est sur le VPS)
2026-03-14 08:59:10 +01:00
df3fe8ebe0 fix(auth): correct SuperOAuth endpoint path — /api/v1/auth not /api/auth
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 43s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:40:32 +01:00
9598cd8715 perf(frontend): drop react-player — YouTube iframe natif, HLS.js lazy seulement si .m3u8
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 35s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:39:01 +01:00
5eb0a43d7f feat: lazy ReactPlayer, seed 11 vidéos YouTube (niveaux 0/1/2)
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 41s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:25:41 +01:00
11d9432218 fix(routes): resolve superOAuthId → DB userId — critical auth bug
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 35s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
req.user.id = SuperOAuth UUID, pas l'UUID TypeORM en DB.
Sans ce fix : getUserPlanLevel retourne toujours 0, ownerId ne matche jamais.

- video.routes: resolveDbUserId avant getUserPlanLevel
- playlist.routes: resolveDbUserId sur toutes les opérations owner/member
2026-03-14 08:12:11 +01:00
87d076313c feat(frontend): VideoPage react-player v3, fix data.videos, route /video/:id
Some checks failed
CI/CD — Build & Deploy / Build (push) Has been cancelled
CI/CD — Build & Deploy / Deploy to VPS (push) Has been cancelled
2026-03-14 08:12:08 +01:00
5d4bab7d99 chore: add assign-first-admin.sql — run once after first login
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 39s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:10:16 +01:00
253af8f402 fix(auth): upsert user in DB on session creation — first login creates user record 2026-03-14 08:07:42 +01:00
0591cd4528 feat(frontend): useAuth /auth/me, videos list + locked flag, VITE_API_URL
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 40s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:06:51 +01:00
5afcad487e docs(backend): add .env.example
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 44s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 08:01:01 +01:00
7c727aa802 feat(admin): requireAdmin middleware + /api/admin routes
- requireAdmin: charge user_roles en DB, accepte admin/super_admin
- GET/POST/PATCH/DELETE /api/admin/videos (publiées + non publiées)
- GET /api/admin/users avec rôles et abonnement actif
- PATCH /api/admin/users/:id/roles (remplacement atomique par slugs)
- GET/POST/PATCH /api/admin/plans
2026-03-14 07:46:35 +01:00
75aad8968f fix(frontend): SuperOAuth flow — VITE_SUPEROAUTH_URL, redirect par provider, pas de client_id
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 29s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 07:39:51 +01:00
f1de2bb065 fix(backend): resolve migration path relative to __dirname
Some checks failed
CI/CD — Build & Deploy / Deploy to VPS (push) Has been cancelled
CI/CD — Build & Deploy / Build (push) Has been cancelled
migrations glob "src/migrations/**/*.ts" was CWD-relative — broken when CLI runs
outside the src/ directory. Using __dirname makes it absolute and portable.
2026-03-14 07:32:39 +01:00
25733ee3db feat(frontend): scaffold Tailwind design system + routing + auth callback
- Tailwind v3 + PostCSS + autoprefixer
- BrowserRouter with Layout shell (Header, theme toggle dark/light)
- Pages: HomePage, CallbackPage (SuperOAuth callback handler)
- hooks/useAuth.ts + lib/api.ts (API client base)
- styles/index.css (Tailwind directives)
- Theme persisted in localStorage (od-theme)
2026-03-14 07:15:19 +01:00
f3e392ff1b feat(backend): mount API routes + cookie-parser + CORS with credentials
- index.ts: mount /api/auth, /api/videos, /api/playlists; add cookie-parser; CORS with credentials + FRONTEND_URL env
- auth.middleware: read token from Bearer header OR od_token httpOnly cookie
- routes: auth (session/logout/me), videos (level-gated), playlists (CRUD + share management)
- deps: cookie-parser + @types/cookie-parser
2026-03-14 07:10:47 +01:00
71d90eb133 feat: initial schema migration — 9 tables + seed roles & plans 2026-03-14 07:02:20 +01:00
2f47be1305 feat: TypeORM entities — User, Role, SubscriptionPlan, Video, Playlist + relations 2026-03-14 06:53:02 +01:00
4f3c0e6433 feat: SuperOAuth token introspection middleware + /api/profile route 2026-03-14 06:40:43 +01:00
b771f4d1c3 fix: add package-lock.json — required for npm ci in Docker build
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 35s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 04:43:26 +01:00
4a3be2a323 feat: initial project structure — Express/TS/TypeORM + React/TS + Docker + Gitea CI
Some checks failed
CI/CD — Build & Deploy / Build (push) Failing after 1m47s
CI/CD — Build & Deploy / Deploy to VPS (push) Has been skipped
2026-03-14 04:13:58 +01:00