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
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Each song flows through statuses: `pending` → `generating_metadata` → `metad

The worker spawns a `SongWorker` per song. Concurrency queues manage throughput with priority (interrupts > epoch songs > filler).

### Room Server (Multi-Device Playback)
### Rooms (Multi-Device Playback)

Integrated into the unified server. Devices join a **room** as either **player** (outputs audio) or **controller** (remote control, no audio). All players sync playback. WebSocket protocol: Zod-validated messages in `packages/shared/src/protocol.ts`. REST API: `GET /api/v1/rooms`, `POST /api/v1/rooms`, `GET /api/v1/now-playing?room={id}`.

Expand Down Expand Up @@ -156,7 +156,7 @@ Zod schemas for all mutation endpoints in `song-schemas.ts` and `playlist-schema

## Ports

Vite dev server on 3000, unified server on 5175 (registered in `/home/beasty/projects/.ports`).
Vite dev server on 5173, unified server on 5175 (registered in `/home/beasty/projects/.ports`).

## Commit Discipline

Expand Down Expand Up @@ -188,7 +188,7 @@ Commit regularly after editing files. Don't batch up large sets of changes — m
- WS bridge: `events/ws-bridge.ts`
- Service layer: `services/song-service.ts`, `services/playlist-service.ts`, `services/settings-service.ts`
- API routes: `routes/songs/`, `routes/playlists.ts`, `routes/settings.ts`, `routes/rooms.ts`
- Worker: `worker/index.ts`, `worker/song-worker.ts`, `worker/queues.ts`
- Worker: `apps/server/src/worker/index.ts`, `apps/server/src/worker/song-worker.ts`, `apps/server/src/worker/queues.ts`
- Room: `room/room-manager.ts`, `room/room.ts`, `room/room-event-handler.ts`, `room/room-ws-handler.ts`
- External services: `external/llm-client.ts`, `external/llm.ts`, `external/ace.ts`, `external/cover.ts`
- Wire mappers: `wire.ts`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ Create rooms for synchronized multi-device playback. Name your devices, join as

> **1.** Describe your music — *"2010 techno beats with English lyrics, S3RL energy, heavy 808 bass"*
>
> **2.** Hit Start — a background worker kicks off the pipeline: LLM writes metadata + lyrics, ComfyUI renders cover art, ACE-Step synthesizes audio
> **2.** Hit Start — the unified backend kicks off the pipeline: LLM writes metadata + lyrics, ComfyUI renders cover art, ACE-Step synthesizes audio
>
> **3.** Listen endlessly — songs appear in real-time. Rate them up/down to steer the direction. Request one-offs or generate entire albums from a single track.

### Song Generation Pipeline

Each song flows through: `pending` → `generating_metadata` → `metadata_ready` → `submitting_to_ace` → `generating_audio` → `saving` → `ready` → `played`

The worker spawns a per-song worker with concurrency queues managing throughput across three lanes: **LLM** (metadata/lyrics), **Image** (cover art), and **Audio** (ACE-Step synthesis).
The unified server runs a per-song worker pipeline with concurrency queues managing throughput across three lanes: **LLM** (metadata/lyrics), **Image** (cover art), and **Audio** (ACE-Step synthesis).

### Multi-Device Playback

Infinitune includes an integrated **Room Server** for synchronized playback — think Sonos or Spotify Connect, but for AI-generated music.
Infinitune includes integrated room management for synchronized playback — think Sonos or Spotify Connect, but for AI-generated music.

- **Roles** — devices join as **player** (outputs audio) or **controller** (remote control only)
- **Sync** — all players stay locked to the same song and position
Expand Down Expand Up @@ -192,8 +192,8 @@ pnpm infi service uninstall
| **Frontend** | React 19 · TanStack Router · React Query · Tailwind CSS 4 |
| **Backend** | Hono (unified server — API + worker + rooms on one port) |
| **Database** | SQLite (better-sqlite3, WAL mode) · Drizzle ORM |
| **Room Server** | Integrated WebSocket server · multi-device sync · REST API |
| **Worker** | Event-driven background pipeline · per-song workers · concurrency queues |
| **Rooms** | Integrated WebSocket room service · multi-device sync · REST API |
| **Worker Pipeline** | Event-driven background pipeline · per-song workers · concurrency queues |
| **Audio** | ACE-Step 1.5 (text-to-music synthesis) |
| **Cover Art** | ComfyUI (image generation) |
| **LLM** | Vercel AI SDK (Ollama/OpenRouter) + Codex App Server (`openai-codex`, ChatGPT subscription auth) |
Expand Down
Loading