Browse Source

Finished

pull/11/head
astria 3 months ago
parent
commit
eeea245668
  1. 4
      backend/app/controllers/video.controller.js
  2. 245
      backend/logs/access.log
  3. 1
      developpement.yaml
  4. 1
      docker-compose.yaml
  5. 6
      frontend/src/components/Recommendations.jsx
  6. 6
      frontend/src/components/SeeLater.jsx
  7. 6
      frontend/src/components/TopCreators.jsx
  8. 6
      frontend/src/components/TrendingVideos.jsx
  9. 12
      frontend/src/pages/Register.jsx
  10. 22
      frontend/src/pages/Video.jsx
  11. 8
      nginx/Dockerfile

4
backend/app/controllers/video.controller.js

@ -123,7 +123,7 @@ export async function upload(req, res) {
${video.description}
</p>
<div style="text-align: center;">
<a href="${process.env.FRONTEND_URL}/videos/${video.id}" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #ffffff; text-decoration: none; padding: 12px 25px; border-radius: 6px; font-size: 16px; font-weight: bold; display: inline-block;">
<a href="${process.env.FRONTEND_URL}/videos/${id}" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #ffffff; text-decoration: none; padding: 12px 25px; border-radius: 6px; font-size: 16px; font-weight: bold; display: inline-block;">
Regarder la vidéo
</a>
</div>
@ -492,7 +492,7 @@ export async function getSimilarVideos(req, res) {
JOIN video_tags vt ON v.id = vt.video
JOIN tags t ON vt.tag = t.id
JOIN channels c ON v.channel = c.id
WHERE t.name = ANY($1) AND v.id != $2
WHERE t.name = ANY($1) AND v.id != $2 AND v.visibility = 'public'
GROUP BY v.id, c.name, c.id
LIMIT 10;
`;

245
backend/logs/access.log

@ -11754,3 +11754,248 @@
[2025-09-04 21:01:30.115] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-09-04 21:01:30.138] [undefined] GET(/:id/views): try to add views for video 1
[2025-09-04 21:01:30.145] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-09-05 09:09:15.576] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:09:24.015] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:09:24.019] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:09:24.030] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:09:24.040] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:09:24.045] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:09:24.066] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:09:24.072] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:09:35.618] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:09:35.623] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:09:35.629] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:09:35.636] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:09:35.640] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:09:37.238] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:09:37.243] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:09:37.248] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:09:37.254] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:09:38.422] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:09:38.426] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:10:03.997] [undefined] POST(/): try to upload video with status undefined
[2025-09-05 09:10:04.013] [undefined] POST(/): successfully uploaded video with status 200
[2025-09-05 09:10:04.026] [undefined] POST(/thumbnail): try to add thumbnail to video 11
[2025-09-05 09:10:04.032] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-09-05 09:10:04.051] [undefined] PUT(/:id/tags): try to add tags to video 11
[2025-09-05 09:10:04.058] [undefined] PUT(/:id/tags): successfully added tags to video 11 with status 200
[2025-09-05 09:10:04.079] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:10:04.085] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:10:04.091] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:10:04.101] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:10:09.459] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:10:11.821] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:10:11.825] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:10:11.836] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:10:11.846] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:10:11.852] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:10:11.873] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:10:11.881] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:10:23.198] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:10:23.206] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:10:23.216] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:10:23.221] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:10:23.226] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:10:24.469] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:10:24.474] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:10:24.478] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:10:24.483] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:10:28.356] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:10:34.421] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:10:34.426] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:10:34.430] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:10:34.436] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:10:34.441] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:10:35.603] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:10:35.608] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:10:35.612] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:10:35.619] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:10:36.921] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:10:36.925] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:10:59.327] [undefined] POST(/): try to upload video with status undefined
[2025-09-05 09:10:59.332] [undefined] POST(/): successfully uploaded video with status 200
[2025-09-05 09:10:59.377] [undefined] POST(/thumbnail): try to add thumbnail to video 12
[2025-09-05 09:10:59.382] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-09-05 09:10:59.398] [undefined] PUT(/:id/tags): try to add tags to video 12
[2025-09-05 09:10:59.402] [undefined] PUT(/:id/tags): Tag prive already exists for video 12 with status 200
[2025-09-05 09:10:59.413] [undefined] PUT(/:id/tags): successfully added tags to video 12 with status 200
[2025-09-05 09:10:59.431] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:10:59.436] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:10:59.440] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:10:59.451] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:11:04.346] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:11:07.011] [undefined] GET(/:id): try to get video 12
[2025-09-05 09:11:07.015] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:11:07.021] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 09:11:07.030] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 09:11:07.035] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 09:11:07.050] [undefined] GET(/:id/views): try to add views for video 12
[2025-09-05 09:11:07.059] [undefined] GET(/:id/views): successfully added views for video 12 with status 200
[2025-09-05 09:12:29.703] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:12:29.711] [undefined] GET(/:id): try to get video 12
[2025-09-05 09:12:29.726] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 09:12:29.737] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 09:12:29.744] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 09:12:29.760] [undefined] GET(/:id/views): try to add views for video 12
[2025-09-05 09:12:29.766] [undefined] GET(/:id/views): successfully added views for video 12 with status 200
[2025-09-05 09:13:57.318] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:15:07.924] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:15:28.583] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:15:56.114] [undefined] GET(/:id): try to get video 12
[2025-09-05 09:15:56.117] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:15:56.129] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 09:15:56.141] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 09:15:56.146] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 09:15:56.160] [undefined] GET(/:id/views): try to add views for video 12
[2025-09-05 09:15:56.164] [undefined] GET(/:id/views): successfully added views for video 12 with status 200
[2025-09-05 09:16:01.720] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:18:55.271] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:18:57.236] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:18:57.242] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:18:57.258] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:18:57.262] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:18:57.267] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:19:19.417] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:19:19.425] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:19:19.445] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:19:19.449] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:19:19.459] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:19:21.373] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:19:21.378] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:19:21.382] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:19:21.388] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:19:22.607] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:19:22.611] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:19:31.231] [undefined] GET(/search): try to search user by username A
[2025-09-05 09:19:31.237] [undefined] GET(/search): successfully found user with username A with status 200
[2025-09-05 09:19:31.507] [undefined] GET(/search): try to search user by username As
[2025-09-05 09:19:31.513] [undefined] GET(/search): successfully found user with username As with status 200
[2025-09-05 09:19:37.369] [undefined] GET(/search): try to search user by username A
[2025-09-05 09:19:37.373] [undefined] GET(/search): successfully found user with username A with status 200
[2025-09-05 09:19:37.603] [undefined] GET(/search): try to search user by username As
[2025-09-05 09:19:37.608] [undefined] GET(/search): successfully found user with username As with status 200
[2025-09-05 09:19:37.809] [undefined] GET(/search): try to search user by username Ast
[2025-09-05 09:19:37.816] [undefined] GET(/search): successfully found user with username Ast with status 200
[2025-09-05 09:19:37.889] [undefined] GET(/search): try to search user by username Astr
[2025-09-05 09:19:37.892] [undefined] GET(/search): successfully found user with username Astr with status 200
[2025-09-05 09:19:49.328] [undefined] POST(/): try to upload video with status undefined
[2025-09-05 09:19:49.350] [undefined] POST(/): successfully uploaded video with status 200
[2025-09-05 09:19:49.397] [undefined] POST(/thumbnail): try to add thumbnail to video 13
[2025-09-05 09:19:49.401] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-09-05 09:19:49.416] [undefined] PUT(/:id/tags): try to add tags to video 13
[2025-09-05 09:19:49.422] [undefined] PUT(/:id/tags): successfully added tags to video 13 with status 200
[2025-09-05 09:19:49.443] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:19:49.448] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:19:49.453] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:19:49.467] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:21:02.547] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:21:02.553] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:21:10.923] [undefined] GET(/search): try to search user by username a
[2025-09-05 09:21:10.928] [undefined] GET(/search): successfully found user with username a with status 200
[2025-09-05 09:21:11.146] [undefined] GET(/search): try to search user by username as
[2025-09-05 09:21:11.150] [undefined] GET(/search): successfully found user with username as with status 200
[2025-09-05 09:21:11.335] [undefined] GET(/search): try to search user by username ast
[2025-09-05 09:21:11.344] [undefined] GET(/search): successfully found user with username ast with status 200
[2025-09-05 09:21:11.382] [undefined] GET(/search): try to search user by username astr
[2025-09-05 09:21:11.388] [undefined] GET(/search): successfully found user with username astr with status 200
[2025-09-05 09:21:11.564] [undefined] GET(/search): try to search user by username astri
[2025-09-05 09:21:11.568] [undefined] GET(/search): successfully found user with username astri with status 200
[2025-09-05 09:21:15.516] [undefined] GET(/search): try to search user by username a
[2025-09-05 09:21:15.523] [undefined] GET(/search): successfully found user with username a with status 200
[2025-09-05 09:21:15.737] [undefined] GET(/search): try to search user by username as
[2025-09-05 09:21:15.741] [undefined] GET(/search): successfully found user with username as with status 200
[2025-09-05 09:21:15.918] [undefined] GET(/search): try to search user by username ast
[2025-09-05 09:21:15.924] [undefined] GET(/search): successfully found user with username ast with status 200
[2025-09-05 09:21:15.972] [undefined] GET(/search): try to search user by username astr
[2025-09-05 09:21:15.980] [undefined] GET(/search): successfully found user with username astr with status 200
[2025-09-05 09:21:27.039] [undefined] POST(/): try to upload video with status undefined
[2025-09-05 09:21:27.051] [undefined] POST(/): successfully uploaded video with status 200
[2025-09-05 09:21:27.068] [undefined] POST(/thumbnail): try to add thumbnail to video 14
[2025-09-05 09:21:27.073] [undefined] POST(/thumbnail): successfully uploaded thumbnail with status 200
[2025-09-05 09:21:27.093] [undefined] PUT(/:id/tags): try to add tags to video 14
[2025-09-05 09:21:27.101] [undefined] PUT(/:id/tags): successfully added tags to video 14 with status 200
[2025-09-05 09:21:27.122] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:21:27.130] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:21:27.139] [undefined] GET(/:id/stats): try to get stats
[2025-09-05 09:21:27.143] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-09-05 09:33:45.020] [undefined] GET(/:id/likes/day): try to get likes per day
[2025-09-05 09:33:45.025] [undefined] GET(/:id): try to get video 12
[2025-09-05 09:33:45.035] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 09:33:45.042] [undefined] GET(/:id/likes/day): successfully retrieved likes per day with status 200
[2025-09-05 09:34:02.855] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:36:29.635] [undefined] GET(/:id/subscriptions): try to retrieve all subscriptions of user 4
[2025-09-05 09:36:29.640] [undefined] GET(/:id/subscriptions): successfully retrieved all subscriptions of user 4 with status 200
[2025-09-05 09:36:29.649] [undefined] GET(/:id/subscriptions/videos): try to retrieve all subscriptions of user 4
[2025-09-05 09:36:29.655] [undefined] GET(/:id/subscriptions/videos): successfully retrieved all subscriptions of user 4 with status 200
[2025-09-05 09:36:32.965] [undefined] GET(/:id): try to get channel with id 5
[2025-09-05 09:36:32.976] [undefined] GET(/:id): Successfully get channel with id 5 with status 200
[2025-09-05 09:36:32.989] [undefined] GET(/:id/channel/subscribed): check if user 4 is subscribed to channel 5
[2025-09-05 09:36:32.994] [undefined] GET(/:id/channel/subscribed): user 4 is subscribed to channel 5 with status 200
[2025-09-05 09:37:01.587] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:37:47.320] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:38:00.125] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:38:02.317] [undefined] GET(/:id/history): try to retrieve history of user 4
[2025-09-05 09:38:02.324] [undefined] GET(/:id/history): successfully retrieved history of user 4 with status 200
[2025-09-05 09:38:02.344] [undefined] GET(/:id/channel): try to retrieve channel of user 4
[2025-09-05 09:38:02.350] [undefined] GET(/:id/channel): successfully retrieved channel of user 4 with status 200
[2025-09-05 09:38:02.355] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:38:03.268] [undefined] GET(/:id): Playlist retrieved with id 4 with status 200
[2025-09-05 09:38:04.837] [undefined] DELETE(/:id/video/:videoId): Video deleted from playlist with id 4 with status 200
[2025-09-05 09:38:04.945] [undefined] GET(/:id): Playlist retrieved with id 4 with status 200
[2025-09-05 09:38:06.399] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:38:22.999] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:40:19.073] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:40:19.081] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:40:19.087] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:40:19.098] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:40:19.109] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:40:19.166] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:40:19.172] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:40:20.697] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:40:20.700] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:40:20.711] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:40:20.721] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:40:20.726] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:40:20.784] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:40:20.788] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:40:32.075] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:40:32.079] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:40:32.089] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:40:32.102] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:40:32.108] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:40:32.162] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:40:32.167] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:40:33.008] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:40:33.013] [undefined] GET(/user/:id): Playlists retrieved for user with id 4 with status 200
[2025-09-05 09:40:33.023] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:40:33.050] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:40:33.059] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:40:33.162] [undefined] GET(/:id/views): try to add views for video 8
[2025-09-05 09:40:33.166] [undefined] GET(/:id/views): successfully added views for video 8 with status 200
[2025-09-05 09:41:02.165] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 4 with status 200
[2025-09-05 09:50:00.863] [undefined] GET(/:id): try to get channel with id 6
[2025-09-05 09:50:00.876] [undefined] GET(/:id): Successfully get channel with id 6 with status 200
[2025-09-05 09:50:08.677] [undefined] GET(/:id): try to get channel with id 2
[2025-09-05 09:50:08.689] [undefined] GET(/:id): Successfully get channel with id 2 with status 200
[2025-09-05 09:50:14.446] [undefined] GET(/:id): try to get channel with id 5
[2025-09-05 09:50:14.458] [undefined] GET(/:id): Successfully get channel with id 5 with status 200
[2025-09-05 09:50:16.410] [undefined] GET(/:id): try to get video 8
[2025-09-05 09:50:16.421] [undefined] GET(/:id): successfully get video 8 with status 200
[2025-09-05 09:50:16.430] [undefined] GET(/:id/similar): try to get similar videos for video 8
[2025-09-05 09:50:16.435] [undefined] GET(/:id/similar): successfully get similar videos for video 8 with status 200
[2025-09-05 09:59:02.737] [undefined] GET(/:id): try to get video 12
[2025-09-05 09:59:02.743] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 09:59:02.756] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 09:59:02.761] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 10:02:49.939] [undefined] GET(/:id): try to get video 12
[2025-09-05 10:02:49.952] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 10:02:49.963] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 10:02:49.969] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 10:04:14.469] [undefined] GET(/:id): try to get video 12
[2025-09-05 10:04:14.479] [undefined] GET(/:id): successfully get video 12 with status 200
[2025-09-05 10:04:14.491] [undefined] GET(/:id/similar): try to get similar videos for video 12
[2025-09-05 10:04:14.498] [undefined] GET(/:id/similar): successfully get similar videos for video 12 with status 200
[2025-09-05 10:06:26.495] [undefined] GET(/:id): try to get channel with id 6
[2025-09-05 10:06:26.509] [undefined] GET(/:id): Successfully get channel with id 6 with status 200
[2025-09-05 10:06:37.217] [undefined] GET(/:id): try to get channel with id 5
[2025-09-05 10:06:37.227] [undefined] GET(/:id): Successfully get channel with id 5 with status 200

1
developpement.yaml

@ -20,6 +20,7 @@ services:
GMAIL_PASSWORD: ${GMAIL_PASSWORD}
GITHUB_ID: ${GITHUB_ID}
GITHUB_SECRET: ${GITHUB_SECRET}
FRONTEND_URL: ${FRONTEND_URL}
volumes:
- ./backend/logs:/var/log/freetube
- ./backend:/app

1
docker-compose.yaml

@ -20,6 +20,7 @@ services:
GMAIL_PASSWORD: ${GMAIL_PASSWORD}
GITHUB_ID: ${GITHUB_ID}
GITHUB_SECRET: ${GITHUB_SECRET}
FRONTEND_URL: ${FRONTEND_URL}
volumes:
- ./backend/logs:/var/log/freetube
- ./backend:/app

6
frontend/src/components/Recommendations.jsx

@ -7,9 +7,11 @@ export default function Recommendations({videos}) {
<h2 className="text-3xl font-bold mb-4 text-white">Recommandations</h2>
<div>
<div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => (
{videos && videos.length > 0 ? videos.map((video, index) => (
<VideoCard key={video.id || index} video={video} />
))}
)) : (
<p className="text-gray-500">Aucune recommandation disponible</p>
)}
</div>
</div>
</div>

6
frontend/src/components/SeeLater.jsx

@ -8,9 +8,11 @@ export default function SeeLater({videos}) {
<h2 className="text-3xl font-bold mb-4 text-white">A regarder plus tard</h2>
<div>
<div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => (
{videos && videos.length > 0 ? videos.map((video, index) => (
<VideoCard key={video.id || index} video={video} />
))}
)) : (
<p className="text-gray-500">Aucune vidéo à regarder plus tard</p>
)}
</div>
</div>
</div>

6
frontend/src/components/TopCreators.jsx

@ -5,7 +5,7 @@ export default function TopCreators({ creators, navigate }) {
<div className="mt-10">
<h2 className="text-3xl font-bold mb-4 text-white">Top Créateurs</h2>
<div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-8">
{creators && creators.map((creator, index) => (
{creators && creators.length > 0 ? creators.map((creator, index) => (
<div
key={creator.id || index}
className="flex flex-col items-center glassmorphism py-2"
@ -18,7 +18,9 @@ export default function TopCreators({ creators, navigate }) {
<span>{creator.description.slice(0, 100) + (creator.description.length > 100 ? '...' : '')}</span>
</p>
</div>
))}
)) : (
<p className="text-gray-500">Aucun créateur disponible</p>
)}
</div>
</div>
);

6
frontend/src/components/TrendingVideos.jsx

@ -7,9 +7,11 @@ export default function TrendingVideos({ videos }) {
<div className="mt-10">
<h2 className="text-3xl font-bold mb-4 text-white">Tendances</h2>
<div className="grid grid-cols-1 lg:grid-cols-5 gap-8 mt-2">
{videos && videos.map((video, index) => (
{videos && videos.length > 0 ? videos.map((video, index) => (
<VideoCard video={video} key={index} />
))}
)) : (
<p className="text-gray-500">Aucune vidéo tendance disponible</p>
)}
</div>
</div>
);

12
frontend/src/pages/Register.jsx

@ -170,6 +170,16 @@ export default function Register() {
)}
</button>
</div>
<div>
<p className="text-xs text-gray-400 mt-1">Le mot de passe doit contenir au moins :</p>
<ul className="list-disc list-inside text-xs text-gray-400">
<li>8 caractères</li>
<li>Une lettre majuscule</li>
<li>Une lettre minuscule</li>
<li>Un chiffre</li>
<li>Un caractère spécial (ex: !@#$%^&*)</li>
</ul>
</div>
</div>
<div>
@ -207,7 +217,7 @@ export default function Register() {
<div>
<label htmlFor="profile" className="block text-sm font-medium font-montserrat text-white mb-1">
Photo de profil (optionnel)
Photo de profil
</label>
<input
type="file"

22
frontend/src/pages/Video.jsx

@ -378,9 +378,25 @@ export default function Video() {
${isFullscreen ? 'fixed bottom-8 left-1/2 transform -translate-x-1/2 opacity-100 z-[60] w-[70%] max-w-3xl' : 'absolute bottom-4 left-4 right-4'}`}
ref={controllerRef}
>
<p
className="text-white"
onClick={() => {
if (videoRef.current) {
videoRef.current.currentTime = Math.max(0, videoRef.current.currentTime - 10);
}
}}
>-10</p>
<svg width="30" height="34" viewBox="0 0 30 34" fill="none" xmlns="http://www.w3.org/2000/svg" onClick={handlePlayPause}>
<path d="M28.5 14.4019C30.5 15.5566 30.5 18.4434 28.5 19.5981L4.5 33.4545C2.5 34.6092 2.14642e-06 33.1658 2.24736e-06 30.8564L3.45873e-06 3.14359C3.55968e-06 0.834193 2.5 -0.609184 4.5 0.545517L28.5 14.4019Z" fill="white"/>
</svg>
<p
className="text-white"
onClick={() => {
if (videoRef.current) {
videoRef.current.currentTime = Math.min(videoRef.current.currentTime + 10, duration);
}
}}
>+10</p>
<div className="flex-1 mx-4">
{/* Time display */}
@ -554,11 +570,13 @@ export default function Video() {
!isPlaylist ? (
<div className="flex flex-col items-center gap-2">
<h2 className="font-montserrat w-full lg:w-9/10 mt-8 text-white text-2xl">Recommandations</h2>
{similarVideos.map((video, index) => (
{similarVideos.length > 0 ? similarVideos.map((video, index) => (
<div className="w-full lg:w-9/10" key={index}>
<VideoCard video={video} />
</div>
))}
)) : (
<p className="text-gray-500 text-left">Aucune recommandation disponible</p>
)}
</div>
) : (
<div className="flex flex-col items-center gap-2">

8
nginx/Dockerfile

@ -0,0 +1,8 @@
FROM nginx:latest
COPY ../frontend/dist/ /usr/share/nginx/html
COPY ./default.conf /etc/nginx/conf.d
EXPOSE 80:80
Loading…
Cancel
Save