Default to using Bun instead of Node.js. - Use `bun ` instead of `node ` or `ts-node ` - Use `bun test` instead of `jest` or `vitest` - Use `bun build ` instead of `webpack` or `esbuild` - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install` - Use `bun run ``` With the following `frontend.tsx`: ```tsx#frontend.tsx import React from "react"; import { createRoot } from "react-dom/client"; // import .css files directly and it works import './index.css'; const root = createRoot(document.body); export default function Frontend() { return

Hello, world!

; } root.render(); ``` Then, run index.ts ```sh bun --hot ./index.ts ``` For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`. ## Project rules Full design: `docs/superpowers/specs/2026-10-30-stcourses-design.md`. Plan: `docs/superpowers/plans/2026-10-30-stcourses.md`. - Bun only: `Bun.serve` routes and WebSockets, `bun:sqlite` or `Bun.sql`, `Bun.file`, `Bun.$`, `bun test`, `bun install`, `bunx`. Never express, vite, dotenv, pg, postgres.js, better-sqlite3, jest or vitest. - Frontend: a React SPA served via HTML imports. No Next.js. Plain CSS with custom properties; no Tailwind. - Course content is never stored in the database. Deleting the DB loses user data only. - Database URL is `STC_DATABASE_URL`: `sqlite://` (default `sqlite://./data/stcourses.db`) or `postgres://...`. Every migration and query must run on both. - Idle memory: at most 2 GB for the deployment. - License: AGPL-3.0-only. Every package's `package.json` has `"license": "AGPL-3.0-only"`. - Never write into `/home/user/functional-programming-course` or `/home/user/systemic-design-course`; their manifests are overlays in `overlays/`. - Never commit anything from `/home/user/example_course_content` (licensed material, local test runs only). - Design tokens (spec 4.1): ground `#12141a`, side `#181b22`, raised `#232733`, line `#262a33`, line2 `#343947`; text `#d9dce3`, reading text `#d9d4c8`, heading `#f2efe8`, muted `#a4abb8`, faint `#8c93a0`; accent `#f1b44c`, accent-dim `#8c7440`. Fonts: IBM Plex Sans (UI), Literata (lesson titles and reading text, 19px / 1.75 in a 660px column), IBM Plex Mono (code). Dark theme only in v1. - Keyboard: arrow keys in the slide viewer, Escape closes overlays, normal Tab focus. No other shortcuts. - Commits: use the machine's git identity; every message ends with `Co-Authored-By: Claude Opus 5.5 `. - Paths with spaces and non-ASCII characters must load, serve and download correctly. A broken overlay or manifest yields diagnostics, never a crash. Media serving supports Range (206/416) and returns 404 for paths escaping the course root.