A modern web platform for Rhythm Lab Radio, featuring AI-powered music discovery, real-time show streaming, and comprehensive music exploration tools.
Rhythm Lab Radio is a Next.js 15 web application that combines traditional radio show hosting with AI to create an immersive music discovery experience. The platform integrates with multiple music APIs (Discogs, Spotify, YouTube) and uses AI to surface deep musical connections and insights.
- Real-time streaming of live shows via Spinitron integration
- Complete archive of past shows from Mixcloud
- Track-by-track show details with rich metadata
- Embedded audio players with visual waveforms
- Favorite tracking for shows and tracks
- Musical Network Analysis: AI discovers connections between artists through collaborations, samples, and influences
- Perplexity AI Integration: Real-time streaming analysis providing context about artists, tracks, and scenes
- Smart Recommendations: AI suggests related artists based on musical style, era, and connections
- Discovery Insights: Detailed breakdowns of musical lineage, scene connections, and sampling history
- Multi-index search across archive tracks, live songs, and artist profiles
- Powered by Algolia for instant, typo-tolerant results
- Filter by artist, track, show, date, and genre
- Recently played tracks and artist name search
- Automatic search indexing via cron jobs
- Rich artist biographies pulled from Discogs
- Complete discography with album artwork
- Expandable release cards showing:
- Full track listings
- Label information and catalog numbers
- Release formats and pressing details
- YouTube video integration
- Direct links to Discogs
- Genre tags and musical connections
- Blog Posts: Long-form articles about music, culture, and shows
- Deep Dives: Episodic content exploring specific artists or genres
- Profiles: Curated artist spotlights
- All content managed through Storyblok CMS with rich text editing
- Citation system with source references
- Featured images and custom layouts
- Track favoriting and collection management (Clerk authentication)
- Social sharing for shows and tracks
- Dynamic genre tag system
- Mobile-responsive design throughout
- Smooth animations and transitions
- Mixcloud show import with AI-generated descriptions
- Manual Algolia index syncing
- Show slug management and content updates
- Storyblok content creation and editing
- Podcast audio generation from show archives
- Next.js 15.5.3 with App Router
- React 19 with Server Components
- TypeScript for type safety
- Tailwind CSS for styling
- Framer Motion for animations
- Shadcn UI components
- Supabase - PostgreSQL database with Row Level Security
- Clerk - User authentication and management
- Storyblok - Headless CMS for content
- Discogs API - Music database and artist info
- Spotify API - Track metadata and playback
- YouTube Data API - Video search and embedding
- Perplexity AI - Intelligent music analysis
- Spinitron - Live show tracking
- Mixcloud - Show archive and streaming
- Algolia - Search indexing and queries
- Vercel - Hosting and deployment
- Vercel Cron - Scheduled jobs for data syncing
- Edge Runtime - Fast API responses
- Server-Sent Events - Real-time AI streaming
rhythm-lab-app/
βββ app/
β βββ (pages)/ # Main application pages
β β βββ page.tsx # Homepage with featured content
β β βββ live/ # Live show streaming
β β βββ archive/ # Show archive
β β βββ search/ # Advanced search interface
β β βββ blog/ # Blog posts
β β βββ deep-dives/ # Deep dive episodes
β β βββ profiles/ # Artist profiles
β βββ api/ # API routes
β β βββ ai-enhanced-discovery/ # AI music discovery
β β βββ discogs/ # Discogs integration
β β βββ algolia/ # Search indexing
β β βββ cron/ # Scheduled jobs
β β βββ storyblok/ # CMS integration
β βββ admin/ # Admin dashboard
βββ components/ # React components
β βββ ui/ # Shadcn UI components
β βββ search-modal.tsx # Quick search
β βββ unified-ai-insights.tsx # AI analysis display
β βββ expandable-release-card.tsx # Album detail cards
βββ lib/
β βββ external-apis/ # API integrations
β βββ auth/ # Authentication utilities
β βββ utils/ # Shared utilities
βββ public/
βββ images/ # Static assets
Required environment variables (see .env.local.example):
# Database
NEXT_PUBLIC_SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
# Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
# CMS
STORYBLOK_PREVIEW_TOKEN=
STORYBLOK_MANAGEMENT_TOKEN=
# Music APIs
DISCOGS_API_TOKEN=
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
# AI & Search
PERPLEXITY_API_KEY=
ALGOLIA_APP_ID=
ALGOLIA_ADMIN_API_KEY=
# Radio APIs
SPINITRON_API_KEY=
MIXCLOUD_ACCESS_TOKEN=
# YouTube
YOUTUBE_API_KEY=- Node.js 18+
- npm/yarn/pnpm
- Supabase account
- Clerk account
- Storyblok account
- Clone the repository:
git clone https://github.com/tmoody1973/rhythm-lab-app.git
cd rhythm-lab-app- Install dependencies:
npm install- Set up environment variables:
cp .env.local.example .env.local
# Edit .env.local with your API keys- Run the development server:
npm run dev- Create a Supabase project
- Run the SQL migrations in
supabase/migrations/ - Set up Row Level Security policies
- Configure Clerk webhook for user sync
To grant admin access to a user:
- Go to Clerk Dashboard
- Navigate to Users β Select user
- Edit Public metadata and add:
{
"role": "admin"
}The AI discovery system uses Perplexity's Sonar model to analyze tracks and artists, identifying:
- Collaborations and featured artists
- Production credits and sampling sources
- Musical influences and legacy
- Scene connections and time periods
- Related artists with similarity scores
- Archive Tracks: Indexed from
mixcloud_trackstable - Live Songs: Auto-synced every hour from Spinitron
- Multi-index: Searches across both indices simultaneously
- Cron Jobs: Automated syncing at
/api/cron/sync-live-songs
All blog posts, deep dives, and profiles are managed through Storyblok:
- Rich text editing with citations
- Image upload and management
- URL slug auto-generation
- Version history and drafts
- Multi-language support ready
The app is configured for Vercel deployment:
vercel deploy --prodSet up in vercel.json:
- Live songs sync: Every hour
- Archive sync: Manual via admin panel
- Fork the repository
- Create a feature branch
- Commit changes with conventional commits
- Push and create a pull request
Proprietary - Radio Milwaukee / Rhythm Lab Radio
For issues or questions:
- Email: [email protected]
- GitHub Issues: rhythm-lab-app/issues
Built with β€οΈ by the Rhythm Lab Radio team