Skip to content

nikhilpand/resona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Resona Logo

Resona

A premium, open-source music super-app
YouTube Music Β· Spotify Sync Β· Offline Downloads Β· Synced Lyrics Β· Per-Song Atmosphere


✨ What is Resona?

Resona is a music super-app that unifies YouTube Music, Spotify, and local audio into one beautiful, premium shell. Inspired by Gemini-style ambient aesthetics, Material You colour extraction, and Apple Music-quality lyric sync.

Every song gives the entire app a unique color DNA β€” background, glows, controls, mini-player β€” all shift to match the album's dominant Pantone palette.


🎡 Features

Core Player

  • Vinyl Spin Animation β€” rotating disc with spring-back on pause, inner groove rings
  • Per-Song Pantone Atmosphere β€” 10 curated palettes assigned per album art, entire app recolors
  • Gapless Playback β€” pre-buffers next track at 80% progress via InnerTube
  • Skia Audio Visualizer β€” FFT-driven GPU-accelerated EQ bars (React Native Skia)
  • Background Audio β€” lock screen controls, notification player (react-native-track-player)

Lyrics

  • Synced Lyrics β€” LRC-format line-by-line karaoke scroll (LRCLib β†’ Kugou fallback)
  • Word-Level Highlight β€” Apple Music-style per-word gradient glow on active line
  • Tap-to-Seek β€” tap any lyric line to jump to that timestamp
  • Offline Lyrics Cache β€” SQLite FTS4 indexed for fast local search
  • Lyric Recall Search β€” "find song by lyric fragment" using FTS4 full-text search

Integrations

  • YouTube Music β€” streaming via InnerTube API, search, playlists, history
  • Spotify Sync β€” OAuth2 PKCE, pull liked songs + playlists + audio features (BPM/energy/valence)
  • ISRC Cross-Reference β€” maps Spotify tracks β†’ YouTube equivalents via ISRC + SΓΈrensen-Dice fuzzy matching
  • Google OAuth2 β€” YouTube Music library access

Offline & Downloads

  • Downloads Screen β€” animated progress bars, quality picker, storage stats
  • Quality Options β€” 128k AAC / 320k MP3 / FLAC lossless
  • BullMQ + FFmpeg β€” background download queue with audio transcoding
  • Storage Dashboard β€” used/available space, per-file management

Smart Features

  • Sleep Timer β€” elegant volume fade (30s ramp β†’ 4s final fade), checks real playback state
  • Mood Auto-DJ (Phase 5) β€” Spotify audio features β†’ contextual auto-queue

πŸ—οΈ Architecture

resona/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ screens/           # NowPlaying, Lyrics, Home, Search, Library, Downloads, Settings
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ player/        # AudioVisualizer (Skia)
β”‚   β”‚   └── lyrics/        # SyncedLyricsList (word-level highlight)
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ youtube/       # InnerTubeClient, ResolvingDataSource
β”‚   β”‚   β”œβ”€β”€ spotify/       # SpotifyClient (Web API)
β”‚   β”‚   β”œβ”€β”€ auth/          # GoogleAuth, SpotifyAuth (PKCE)
β”‚   β”‚   β”œβ”€β”€ lyrics/        # LyricsClient, LrcParser, LyricSearch (FTS4)
β”‚   β”‚   β”œβ”€β”€ sync/          # ISRCResolver
β”‚   β”‚   └── theme/         # PaletteExtractor, ColorExtractor
β”‚   β”œβ”€β”€ stores/            # Zustand: usePlaybackStore, useDownloadStore, useThemeStore, useSleepTimerStore
β”‚   β”œβ”€β”€ db/                # SQLite client with FTS4, downloads, spotify_sync schema
β”‚   β”œβ”€β”€ navigation/        # AppNavigator (bottom tabs + slide-up player)
β”‚   β”œβ”€β”€ theme/             # colors.ts (Pantone palette), typography.ts
β”‚   └── config.ts          # Central constants (keys, endpoints, quality presets)
β”‚
└── backend/               # Node.js + Fastify
    β”œβ”€β”€ server.ts          # API: /stream, /search, /download, /search-isrc
    └── workers/
        └── downloadWorker.ts  # BullMQ + FFmpeg transcoding pipeline

πŸš€ Getting Started

Prerequisites

  • Node.js 20+
  • Expo CLI
  • Redis (for download queue)
  • FFmpeg (for audio transcoding)

Mobile App

git clone https://github.com/nikhil/resona.git
cd resona

npm install
npx expo install expo-file-system expo-web-browser expo-auth-session expo-crypto

npx expo start

Backend

cd backend
npm install
cp .env.example .env   # Fill in your keys
npm run dev

Environment Variables

Create backend/.env:

SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_REDIRECT_URI=your_redirect_uri
REDIS_URL=redis://localhost:6379
BACKEND_PORT=3000

🎨 Design System

Token Value Usage
obsidian #0a0a0f App background
deepNavy #1a1a26 Surfaces, cards
mediumSlate #7B68EE Primary accent
ultraViolet #E040FB Secondary accent
crystalBlue #00BCD4 Tertiary accent
paleViolet #c4b8ff Muted text

Typography: DM Serif Display (song titles) + DM Sans (UI) + JetBrains Mono (timestamps)

Animations: React Native Reanimated 3 (120fps UI thread), Skia Canvas (GPU visualizer)


πŸ—ΊοΈ Roadmap

Phase Status Feature
1 βœ… Done Core Player β€” vinyl spin, ambient visualizer, gapless playback
2 βœ… Done Lyrics Engine β€” synced scroll, word highlight, tap-to-seek, offline cache
3 βœ… Done YouTube Music Sync β€” InnerTube streaming, Google OAuth2, playlists
4 βœ… Done Spotify Sync + Download Manager β€” PKCE, ISRC resolver, FFmpeg pipeline
4.5 βœ… Done Pantone Atmosphere, Sleep Timer, Lyric Recall Search, Downloads Screen
5 πŸ”΅ Next AI Layer β€” Mood Auto-DJ, Smart Playlists, Last.fm Scrobbling
6 πŸ”΅ Future Polish β€” Haptics, Widgets, App Store submission

πŸ”‘ API Keys Required

Service Purpose Cost
Spotify Web API Library sync, audio features Free
Google Cloud YouTube Data API v3 Free tier
LRCLib Synced lyrics Free, no key
Genius API Lyric annotations Free tier

πŸ“„ License

MIT β€” see LICENSE


Built with ❀️ using Expo · React Native · Skia · Reanimated 3 · Fastify · BullMQ

About

🎡 Resona β€” a premium open-source music super-app. YouTube Music Β· Spotify Sync Β· Offline Downloads Β· Synced Lyrics Β· Per-Song Atmosphere

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors