CourseHub: AJAX video course player (PHP + MySQL + Bootstrap + Plyr)

Scans nested course folders for mp4s, tracks per-user resume position
and per-folder progress. SPA frontend with hash routing over a JSON API;
range-request streaming via stream.php.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Harwinder Sekhon
2026-07-11 10:25:35 -04:00
commit b9c92540d4
16 changed files with 1328 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
<?php /* CourseHub SPA shell — all data flows through api/ via fetch. */ ?>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CourseHub</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/plyr@3.7.8/dist/plyr.css" rel="stylesheet">
<link href="assets/style.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary border-bottom mb-4">
<div class="container">
<a class="navbar-brand fw-bold" href="#/">
<i class="bi bi-collection-play-fill text-primary me-1"></i>CourseHub
</a>
<div id="nav-user" class="d-none d-flex align-items-center gap-3">
<button id="btn-rescan" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-arrow-repeat me-1"></i>Rescan library
</button>
<span class="text-secondary small">
<i class="bi bi-person-circle me-1"></i><span id="nav-username"></span>
</span>
<button id="btn-logout" class="btn btn-sm btn-outline-danger">Logout</button>
</div>
</div>
</nav>
<main class="container pb-5">
<div id="app">
<div class="text-center py-5">
<div class="spinner-border text-primary" role="status"></div>
</div>
</div>
</main>
<div class="toast-container position-fixed bottom-0 end-0 p-3" id="toasts"></div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/plyr@3.7.8/dist/plyr.min.js"></script>
<script src="assets/app.js"></script>
</body>
</html>