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%
Find a file Use this template
Aman Bhargava 35a019d324 decks: real rendered equations + theorem boxes (self-hosted MathJax), not decorative glyphs
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>
2026-07-27 06:59:08 -07:00
functions/media IA pass per EngSci++ live-state handoff: /library/ hub, engsci-plus-plus index, robots.txt, real 404, project-stories redirect; llms-emotion remuxed to mp4; no-store on media 404s 2026-07-27 05:00:34 -07:00
public decks: real rendered equations + theorem boxes (self-hosted MathJax), not decorative glyphs 2026-07-27 06:59:08 -07:00
scripts scaffold aman.holdings: Pages + R2 lecture site, first lecture staged 2026-07-27 00:54:28 -07:00
.gitignore scaffold aman.holdings: Pages + R2 lecture site, first lecture staged 2026-07-27 00:54:28 -07:00
README.md scaffold aman.holdings: Pages + R2 lecture site, first lecture staged 2026-07-27 00:54:28 -07:00
wrangler.toml scaffold aman.holdings: Pages + R2 lecture site, first lecture staged 2026-07-27 00:54:28 -07:00

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]].ts serves 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

  1. Copy the theatre package (everything except media/) to public/lectures/<slug>/.
  2. Edit DEFAULTS.mediaSrc in its app.js to /media/lectures/<slug>/<file>.mp4.
  3. scripts/upload-media.sh <local-master> lectures/<slug>/<file>.mp4
  4. Add a card to public/index.html.
  5. 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.