Skip to content
Open
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
21 changes: 18 additions & 3 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/Dock.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 Down Expand Up @@ -64,9 +64,24 @@ 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-*>` and `--playback-progress` so CSS can react without islands.
- Styling: tokens in `src/styles/tokens.css`, app shell in `shell.css`, the
episode stage in `stage.css` and `worlds.css` (rules still scoped to
`<html data-world="stage">`), and hover/press states in `interactions.css`
(loaded last). 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>`, which
`rss-to-json` drops, 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
15 changes: 13 additions & 2 deletions packages/starpod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ validates your config and lists every problem with its field path.
- `links` (optional) — extra navigation links after About and Contact, e.g.
`[{ label: 'Store', href: 'https://example.com/store' }]`

## Video

Starpod is video-first with no setup. When an episode's feed item carries a
`<podcast:alternateEnclosure>` with a video or HLS type, its page leads with
the video and offers a Watch / Listen switch; the visitor's choice is
remembered. Episodes without video lead with their artwork and play the
audio enclosure. Playback continues across pages: the video floats into a
mini player when its stage scrolls away or the visitor navigates.

## Integration options

```js
Expand All @@ -105,7 +114,7 @@ starpod(starpodConfig, {
});
```

Overridable components: `Breadcrumbs`, `Dots`, `EpisodeList`, `Hosts`,
Overridable components: `Breadcrumbs`, `EpisodeList`, `Hosts`,
`InfoCard`, `LargePlatforms`, `NotFoundContent`, `Platforms`, `ShowArtwork`.

## Custom pages
Expand Down Expand Up @@ -146,7 +155,9 @@ export const collections = {

`[HH:MM:SS]` timestamps become clickable and seek the player. Without a
file, Starpod falls back to the transcript referenced by the feed's
`<podcast:transcript>` tag.
`<podcast:transcript>` tag. Write speakers as `[00:01:23] **Name:** text` and
the two most frequent speakers each get their own typeface in the live
transcript beside the player.

## Database (guests & sponsors)

Expand Down
1 change: 1 addition & 0 deletions packages/starpod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"astro-seo-schema": "^5.2.0",
"atropos": "^2.0.2",
"drizzle-orm": "^0.45.2",
"hls.js": "1.6.15",
"html-to-text": "^9.0.5",
"rss-to-json": "^2.1.1",
"schema-dts": "^1.1.5",
Expand Down
Binary file modified packages/starpod/src/assets/avatar-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/starpod/src/assets/avatar-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading