Public files and resources for Aman Bhargava's Engineering, Science, Applied Mathematics, and Natural/Philosophy educational resources and works.
- JavaScript 86.3%
- HTML 11.4%
- CSS 2.2%
- TypeScript 0.1%
Aman's feedback was right — the stat-card template printed single vars (H, C, R<C) with no rendered math. Replaced with self-hosted MathJax tex-svg (no CDN, zero external requests): full equations (entropy, chain rule, MI=KL, Sigma_N precision, HMM factorization, Viterbi argmax) and boxed named theorems (AEP, source/channel coding, Kraft-McMillan). Spacing tightened so multi-equation slides fit 100vh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| functions/media | ||
| public | ||
| scripts | ||
| .gitignore | ||
| README.md | ||
| wrangler.toml | ||
aman.holdings
Aman Bhargava's personal lecture site: the Engineering Science abridged series plus extensions and AI-augmented lectures, presented in the Cartesian Theatre player.
Architecture
- Cloudflare Pages serves everything in
public/(viewer code, transcripts, slides, telemetry chunks — every file stays under the 25 MiB Pages limit). - Cloudflare R2 (
aman-holdings-media) holds the multi-gigabyte media masters.functions/media/[[path]].tsserves them same-origin at/media/<key>with full byte-range support, so seeking is instant and no CORS or crossorigin plumbing is needed. - No servers. Storage is ~$0.015/GB-month; R2 egress is free.
Layout
public/
├── index.html # lecture library landing page
└── lectures/<slug>/ # one Cartesian Theatre package per lecture
functions/media/[[path]].ts # R2-backed range-serving media route
scripts/upload-media.sh # push a media master to R2
wrangler.toml # Pages config + R2 binding
Adding a lecture
- Copy the theatre package (everything except
media/) topublic/lectures/<slug>/. - Edit
DEFAULTS.mediaSrcin itsapp.jsto/media/lectures/<slug>/<file>.mp4. scripts/upload-media.sh <local-master> lectures/<slug>/<file>.mp4- Add a card to
public/index.html. - Deploy.
Deploy
npx wrangler pages deploy public --project-name aman-holdings
First deploy creates the project. Custom domain aman.holdings is attached
once in the Cloudflare dashboard (Pages → aman-holdings → Custom domains).
Local dev
npx wrangler pages dev public
The local R2 binding starts empty; media 404s locally unless you seed the local bucket. Everything else works.