
Discover, Review, and Share Your Musical Journey
Live Demo β’ Documentation β’ Contributing β’ Support
- Overview
- Features
- Tech Stack
- Architecture
- Installation
- Configuration
- Usage
- API Documentation
- Database Schema
- Authentication
- Deployment
- Performance
- Contributing
- License
- Credits
BeatShelf is a full-stack music discovery platform built with Next.js 14 and the Spotify Web API. It allows users to discover new music, write in-depth reviews, rate songs, and curate personalized collections. Users can also generate visually stunning review cards that include the song's cover art, their rating, user ID, and reviewβperfect for sharing on Instagram Stories, Facebook, or any other social media platform.
Create a community-driven music discovery experience for exploring, reviewing, and sharing tracks.
- Access to 50M+ songs via Spotify
- Real-time reviews and ratings
- Advanced search and social features
- Responsive, modern UI
- Generate stylish review cards to share on any social platform.
- Search by song, artist, album, or genre
- Trending tracks, new releases, and charts
- Genre exploration and random discovery
- Personalized profiles with stats and activity
- Rich text reviews and 5-star ratings
- Favorites collection and dashboard
- Customizable settings
- Generate stylish review cards for sharing on social media
- Real-time sync and dark theme
- Optimized performance and accessibility
- Intuitive navigation with animations and notifications
- Next.js 14 (App Router) with TypeScript
- Tailwind CSS, Radix UI, shadcn/ui
- Lucide React icons, React Context for state
- Node.js (Next.js API Routes)
- Supabase (PostgreSQL, Auth, Realtime, Storage)
- Spotify Web API
- npm, ESLint, Prettier, TypeScript
- Vercel for hosting and analytics
The system uses a client-server model: Frontend (Next.js) interacts with Backend API Routes, which connect to Supabase for data/storage and Spotify for music data. Data flows from user interactions to API calls, database updates, and real-time UI syncs via Supabase Realtime.
- Pages/Components for UI
- Contexts/Hooks for state
- Utils/API Routes for logic
- Node.js 18+, npm 9+, Git
- Supabase and Spotify accounts
# Clone the repo
git clone https://github.com/akshitsuthar/beatshelf.git && cd beatshelf
# Install dependencies
npm install
# Create environment file
touch .env.local
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_key
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
# Run the development server
npm run dev
# Visit the app
http://localhost:3000
- Create project in Supabase Dashboard
- Enable email auth
- Run SQL scripts for tables, policies, and functions (see scripts/ folder)
- Create app in Spotify Developer Dashboard
- Note Client ID/Secret and set redirect URIs
Variable | Description | Required |
---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase URL | β |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Anon key | β |
SUPABASE_SERVICE_ROLE_KEY | Service key | β |
SPOTIFY_CLIENT_ID | Spotify ID | β |
SPOTIFY_CLIENT_SECRET | Spotify secret | β |
- Sign up at /auth/signup (email, username, password)
- Sign in at /auth/signin
- Search music: Use /search or API like
/api/spotify/search?q=Beatles
- Write reviews: Go to /write-review, select song, rate, and publish
- Manage favorites: Heart icon on songs; view at /favorites
- Dashboard: View stats at /dashboard
POST /api/auth/signup
β Register new user
GET /api/spotify/search?q=
β Search musicGET /api/spotify/trending
β Trending tracksGET /api/spotify/track/[id]
β Song details
GET /api/user/profile
β Get user profileGET /api/user/reviews
β Get user's reviewsGET /api/user/favorites
β Get favorite songs
profiles
: Users (UUID, username, avatar)songs
: Tracks (ID, name, artist, album)reviews
: Reviews (UUID, user_id, song_id, content)ratings
: Ratings (UUID, user_id, song_id, rating)favorites
: Favorite songs (UUID, user_id, song_id)
- One-to-Many (Users β Reviews, Ratings, Favorites)
- Indexed on
user_id
,song_id
,artist_name
for speed
Flow: Register/login with email/password/username; JWT sessions via Supabase.
Security: RLS, password hashing, rate limiting.
Protected Routes: /dashboard, /write-review, /favorites, /settings.
Public Routes: /, /search, /song/[id], /trending.
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
- Add environment variables in Vercel Dashboard
- Configure domain and HTTPS
// Build config
{
"buildCommand": "npm run build",
"outputDirectory": ".next",
"framework": "nextjs"
}
Optimizations: Code splitting, lazy loading, image optimization, API caching, database indexing.
Monitoring: Vercel Analytics for vitals and errors.
Fork, clone, branch, change, test, PR.
Guidelines: Use TypeScript, follow code style, meaningful commits (e.g., "feat: add feature").
Areas: Bug fixes, features, docs, UI, performance.
Report issues on GitHub.
This project is licensed under the MIT License.
Β© 2025 Akshit Suthar
See the full LICENSE file for more details.
Created by Akshit Suthar:
- Portfolio: Akshit Suthar
- LinkedIn: Akshitsuthar
- GitHub: github.com/akshitsutharr
Thanks to Spotify, Supabase, Vercel, Next.js, Tailwind, Radix UI, shadcn/ui.
Inspiration: Letterboxd, Spotify, Apple Music.