Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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
Expand All @@ -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 `<podcast:person>` 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
Expand All @@ -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 `<video>` element for the
whole visit. It plays the episode's HLS video (hls.js outside Safari) or MP3,
and physically moves between an episode stage's `[data-media-slot]` and the
persisted dock's `[data-media-dock]`. It mirrors playback state onto
`<html data-*>` attributes so CSS can react without islands; progress is
the media clock's `--live-progress`, written on elements that opt in with
`data-props-for="media-clock"` (`src/components/media/publish.ts`).
- Styling: `src/styles/global.css` imports everything in cascade order:
tokens in `tokens.css`, the people identity in `people.css`, the app shell
in `shell.css`, the episode stage in `stage.css` and `worlds.css` (rules
still scoped to `<html data-world="stage">`), hover/press states in
`interactions.css`, then the rail, explorer, player and episode page
(`rail.css`, `explorer.css`, `player.css`, `episode.css`). Prefer Tailwind
utilities for new work; the palette is exposed as Tailwind colors via
`@theme inline` in `tailwind.css`.
- Video comes from the feed's `<podcast:alternateEnclosure>` (HLS or another
video type), and people from its `<podcast:person>` tags; `rss-to-json`
drops both, so `src/lib/feed-media.ts` scans the raw XML.
`/api/cues/[episode].json` serves timed transcript lines for the stage's
live transcript (`src/lib/cues.ts`).
- `src/lib/` — Core utilities: RSS fetching, image optimization, LLM content
generation.
- `src/content/transcripts/` — Markdown transcript files named by episode
Expand Down
3 changes: 3 additions & 0 deletions packages/starpod/.impeccable/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"buildPath": "code"
}
Loading
Loading