Course
Exactly one long-form video, with its own public landing and watch page.
Single videoProduct & implementation brief · 9 August 2026
KStack Devs is a public, bilingual video-learning service for practical technology Courses and multi-lesson Series—supported by a focused editorial dashboard and a portable media architecture.
01 · Product
V1 is a high-quality video catalog and watching experience, not a full learning-management system. This keeps the launch coherent while leaving clean extension points for text, captions, progress, and other learning features later.
Exactly one long-form video, with its own public landing and watch page.
Single videoTwo or more ordered lessons with stable shareable lesson URLs and a persistent playlist.
BootcampStudents browse and watch without an account. Only administrative work requires KStacks login.
FreeOwners and Editors curate content, media, instructors, topics, levels, covers, and publication.
DashboardStudent progress, enrollment, quizzes, certificates, ratings, comments, payments, captions, text-only lessons, and AI-generated articles are intentionally deferred.
02 · Decision snapshot
03 · Experience
04 · Architecture
Devs follows the organization’s React/TanStack frontend and Spring/PostgreSQL service pattern. It reuses central identity and routing while owning its catalog, workflow, and roles.
/devs/**, access-cookie validation, routing, rate-limit boundaryKStacks media IDs remain independent of provider IDs. Backend and frontend adapters isolate Mux details, and retained R2 masters support bulk re-ingest plus temporary dual-provider migration.
05 · Video & storage
Mux provides a low-friction pilot with encoding, adaptive playback, signed policies, webhooks, player integration, and watch-time analytics. R2 remains the permanent source of truth for original masters.
Admin or importer receives short-lived multipart instructions from Devs.
Video bytes bypass Spring. The private master is recorded with size and SHA-256.
Devs issues Mux a short-lived R2 GET URL and listens for signed, idempotent webhooks.
A Course or Series cannot publish until every assigned provider asset is ready.
The public page requests a short-lived token to discourage hotlinking; analytics stay anonymous to Devs.
| Provider | Strengths | Trade-offs | Position |
|---|---|---|---|
| Mux | Strong API/player, signed playback, webhooks, watch-time analytics, pilot allowance | Delivery cost grows with watched minutes; free plan stores only ten videos | V1 choice |
| Bunny Stream | Very low storage/CDN unit pricing, resumable uploads, token security | Cost depends on GB/bitrate; cheapest network needs Saudi playback benchmarking | Growth-cost candidate |
| Cloudflare Stream | Simple minute-based model and Cloudflare integration | Published minute rates are materially higher for long free viewing | Operational alternative |
| Option | Benefit | Cost / risk | Plan status |
|---|---|---|---|
| Streaming only | Lowest complexity and casual redistribution exposure | No official offline access; capture still cannot be prevented | Safe V1 default |
| Per-item, default off | Editors enable offline access only where justified | Derivative generation, signed URLs, bandwidth, UI/support work | Recommended option to consider |
| Always downloadable | Best offline accessibility | Highest redistribution, storage, bandwidth, and takedown exposure | Not recommended by default |
Any future download exposes a controlled derivative—never the permanent R2 master.
06 · Migration
A one-time, user-authorized MTProto importer scans multiple owned/licensed channels and creates private media records. It is resumable after failure but never becomes a continuous sync.
Dry-run every channel oldest-to-newest and record message ID, caption, date, filename, duration, size, and ordering hints.
SQLite ledger keys work by channel + message, records checksums and stages, skips confirmed work, and retries failures.
Upload to R2, start Mux ingest, and expose unassigned media in the admin dashboard. Never guess a Course or Series.
Use KStacks’ own Telegram API ID, store the user session outside source control, issue a short-lived Devs import credential, clean temporary files after verification, and import only content KStacks may retain and publicly stream.
07 · Visual identity
The Behance screenshots define the core palette, Alexandria typography, geometric language, and Devs service mark. The existing portal informs UI ergonomics and localization—not its conflicting duplicated color tokens.
The older repository PDF labels Poppins, while the newer supplied identity screenshots specify Alexandria. The portal CSS also duplicates token blocks with different OKLCH values.
Use one Devs token layer, Alexandria for Arabic and Latin, the supplied exact palette, and the existing light/dark Devs SVG. Do not copy the conflicting token blocks.
Before production styling, approve a light/dark token sheet and responsive landing/catalog, watch, and admin-editor mockups—including a real Arabic RTL pass and WCAG 2.2 AA contrast/focus checks.
08 · Delivery
Inspect private deployment/CI/DNS/secrets/observability, confirm Mux/R2 accounts and budget ownership, approve visual tokens/mockups, and assign marketing/legal reviewers.
Create frontend/service repositories, gateway/Eureka integration, schema, public API, SSO-backed Devs RBAC, audit, and fake/real provider adapters.
Deliver bilingual themes, landing/featured/catalog, Course/Series/lesson routes, signed player, SEO, accessibility, and reviewed copy.
Deliver dashboard, editorial workflows, direct R2 uploads, Mux lifecycle/webhooks, covers, taxonomy, instructors, team, analytics, and safe deletion.
Dry-run and reconcile Telegram import, complete security/RTL/mobile/visual/playback tests, approve legal text, prepare runbooks, then publish reviewed content.
Use the same supported frontend platform as the portal, the same container platform as existing Spring services, and devs.kstacks.org. Phase 0 discovers the private implementation details before provisioning.
09 · Acceptance
Anonymous browse/watch, 0/3/4+ featured states, URL filters, Course/Series invariants, next-lesson prompt, translation fallback, draft/archive hiding.
Known-candidate denial, Editor/Owner permissions, direct upload, processing failure/retry, publish validation, audit, safe delete, webhook replay/idempotency.
320–1440 px visual regression, English/Arabic × light/dark, WCAG keyboard/screen-reader pass, Core Web Vitals, SEO, Saudi playback measurements.
JWT/JWKS revalidation, CSRF + Origin, rate limits, sanitized Markdown, MIME spoofing, revoked roles, scoped import token, secret/redaction checks.
Multiple channels, dry run, pagination, interrupted stages, duplicate message/checksum, temp cleanup, expired credentials, rerun idempotency, reconciliation.
Health/readiness, PostgreSQL backup restore, R2 checksum inventory, Mux/R2 outage runbooks, spend/usage alerts, admin recovery, structured logs.
10 · Launch gates
References