diff --git a/CLAUDE.md b/CLAUDE.md index 4ddd7fa5..ca9a6022 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,7 +20,7 @@ Whatnot podcast). - **Lint fix:** `pnpm lint:fix` - **All tests:** `pnpm test` (runs unit + e2e concurrently) - **Unit tests only:** `pnpm test:unit` (Vitest) -- **Single unit test:** `pnpm exec vitest run tests/unit/Player.test.tsx` +- **Single unit test:** `pnpm exec vitest run tests/unit/Island.test.tsx` - **E2E tests only:** `pnpm test:e2e` (Playwright, auto-starts dev server) - **Seed remote DB:** `pnpm db:seed` - **Push schema to DB:** `pnpm db:push` @@ -30,7 +30,7 @@ Whatnot podcast). ### Framework Stack -- **Astro 5** with static output, deployed to Vercel +- **Astro 6** with static output, deployed to Vercel - **Preact** for interactive components (player, search, contact form) - **Tailwind CSS v4** via Vite plugin - **Drizzle ORM** with Turso/libSQL for episode guests and sponsors @@ -49,6 +49,9 @@ Whatnot podcast). ### Data Flow Episodes are fetched from the RSS feed at build time via `src/lib/rss.ts`. +Each episode's hosts and guests come from the database where it lists the +episode, else from the feed's `` tags (`src/lib/people.ts`); +with neither, the pieces that show people leave themselves out. Guest/sponsor data lives in `db/data/` as TypeScript files and is seeded to Turso via `db/seed.ts`. The DB schema is in `db/schema.ts` (Drizzle ORM) with tables: Episode, Person, HostOrGuest, Sponsor, SponsorForEpisode. The DB @@ -64,9 +67,30 @@ connection is configured in `db/index.ts`. `Accept: text/markdown` clients, and the styled 404 page otherwise. API routes return structured JSON errors via `src/lib/api-errors.ts`. - `src/components/` — Mix of `.astro` (static) and `.tsx` (Preact interactive) - components. The audio player (`src/components/player/`) and search dialog are + components. The media player (`src/components/media/`) and search dialog are Preact. -- `src/components/state.ts` — Preact signals for shared player state. +- `src/components/state.ts` — Preact signals for shared player state + (current episode, Watch/Listen preference, playback readouts). +- `src/components/media/engine.ts` — one persistent `