- Overview
- Features
- Tech Stack
- Architecture
- Installation
- Development
- API Documentation
- Deployment
- Security
- Screenshots
- Contributing
- License
- Contact
Wave is a powerful, feature-rich music streaming platform designed for both artists and listeners. The platform consists of a robust Django backend and a modern React frontend, providing a seamless experience for music discovery, playback, and artist promotion.
Wave enables artists to upload, manage, and monetize their music while giving listeners a personalized experience for discovering, streaming, and organizing music. With premium subscription options, real-time interactions through WebSockets, and a responsive design for all devices, Wave offers a comprehensive solution for music streaming needs.
graph TD
Client[Client Browser/App] --> |HTTP/WS| LoadBalancer[Load Balancer]
LoadBalancer --> |HTTP| WebServer[Nginx Web Server]
LoadBalancer --> |WS| WSServer[WebSocket Server]
WebServer --> |WSGI| DjangoApp[Django Application]
WSServer --> |ASGI| Channels[Django Channels]
DjangoApp --> |Queries| PostgreSQL[(PostgreSQL Database)]
DjangoApp --> |Cache| Redis[(Redis Cache)]
DjangoApp --> |Auth| JWT[JWT Auth]
DjangoApp --> |Payments| Razorpay[Razorpay API]
DjangoApp --> |Storage| S3[S3 Storage]
Channels --> Redis
Wave uses a comprehensive data model with the following key components:
CustomUser
: Extended user modelProfile
: User profile detailsEmailVerification
: Verification system
Artist
: Artist profilesFollow
: User-artist relationshipArtistGenres
: Genre categorization
Music
: Individual tracksAlbum
: Collections of tracksGenre
: Music categorizationAlbumTrack
: Track ordering
Library
: Saved musicPlaylist
&PlaylistTrack
: PlaylistsPlayCount
&PlayHistory
: AnalyticsEqualizerPreset
: Audio settings
# Clone the repository
git clone https://github.com/yourusername/wave-backend.git
cd wave-backend
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
# Create a .env file with required variables (see below)
# Set up database
python manage.py migrate
python manage.py createsuperuser
# Run the development server
python manage.py runserver
Required Environment Variables (.env):
DEBUG=True
SECRET_KEY=your_secret_key
DATABASE_URL=postgres://user:password@localhost:5432/wave
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
EMAIL_HOST_USER=your_email
EMAIL_HOST_PASSWORD=your_email_password
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
REDIS_URL=redis://localhost:6379/0
# Clone the repository
git clone https://github.com/yourusername/wave-frontend.git
cd wave-frontend
# Install dependencies
npm install
# or
yarn install
# Set up environment variables
# Create a .env file with required variables (see below)
# Start development server
npm run dev
# or
yarn dev
Required Environment Variables (.env):
VITE_API_BASE_URL=http://localhost:8000/api
VITE_WS_BASE_URL=ws://localhost:8001/ws
VITE_GOOGLE_CLIENT_ID=your_google_client_id
# Start both frontend and backend
docker-compose up -d
# Access frontend at http://localhost:5173
# Access backend at http://localhost:8000
wave-backend/
βββ users/ # User management
βββ artists/ # Artist profiles and management
βββ music/ # Track and music management
βββ album/ # Album-specific functionality
βββ playlist/ # Playlist functionality
βββ library/ # User's saved content
βββ premium/ # Subscription management
βββ listening_history/ # Play tracking
βββ livestream/ # Live performance functionality
βββ home/ # Main landing page and discovery
βββ config/ # Main project settings
βββ static/ # Static files
βββ media/ # User-uploaded content
src/
βββ components/ # Reusable UI components
β βββ player/ # Music player components
β βββ admin/ # Admin-specific components
β βββ artist/ # Artist-specific components
β βββ livestream/ # Livestreaming components
β βββ user/ # User/listener components
βββ pages/ # Application pages
β βββ admin/ # Admin dashboard pages
β βββ artist/ # Artist studio pages
β βββ user/ # User/listener pages
βββ slices/ # Redux slices
βββ services/ # API service modules
βββ utils/ # Utility functions
βββ hooks/ # Custom React hooks
βββ constants/ # Application constants
βββ App.jsx # Main application component
βββ api.js # Main API configuration
βββ main.jsx # Application entry point
# Enhanced Python shell with auto-imports
python manage.py shell_plus
# Generate model diagrams
python manage.py graph_models -a -o wave_models.png
# Display all registered URLs
python manage.py show_urls
# Lint code
npm run lint
# Format code
npm run format
# Run tests
npm run test
# Build for production
npm run build
Wave exposes a comprehensive RESTful API with these key endpoint groups:
POST /api/auth/register/
: User registrationPOST /api/auth/login/
: User loginPOST /api/auth/token/refresh/
: Refresh tokenPOST /api/auth/google/
: Google OAuth
GET /api/users/me/
: Current user profilePATCH /api/users/me/
: Update profileGET /api/users/settings/
: User settingsPATCH /api/users/settings/
: Update settings
GET /api/music/
: List tracksPOST /api/music/
: Upload trackGET /api/albums/
: List albumsPOST /api/albums/
: Create albumGET /api/genres/
: List genres
GET /api/playlists/
: List playlistsPOST /api/playlists/
: Create playlistGET /api/library/
: User libraryPOST /api/library/tracks/add/
: Add to libraryPOST /api/library/tracks/remove/
: Remove from library
GET /api/artists/
: List artistsGET /api/artists/{id}/
: Artist detailsPOST /api/artists/{id}/follow/
: Follow artistPOST /api/artists/{id}/unfollow/
: Unfollow artistPOST /api/artists/verify/
: Request verification
/ws/notifications/
- Real-time notifications/ws/livestream/{room_id}/
- Livestream chat and events
- Backend: Django, PostgreSQL, Redis, Nginx, Daphne/Uvicorn
- Frontend: Node.js, NPM/Yarn
- Infrastructure: Docker, AWS/GCP/Azure
# Build and deploy with Docker Compose
docker-compose -f docker-compose.prod.yml up -d
# Deploy backend with Elastic Beanstalk
eb init
eb create wave-production
# Deploy frontend with Amplify
amplify init
amplify publish
Wave implements several security measures:
- JWT Authentication: Short-lived tokens (5 minutes) with rotation
- Token Blacklisting: Prevention of token reuse
- CORS Configuration: Strict cross-origin resource sharing
- Content Security Policy: Protection against XSS attacks
- Password Validation: Strong password requirements
- HTTPS Enforcement: Secure communication
- Rate Limiting: Protection against brute force attacks
- Signed URLs: Secure media access
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Here's the properly formatted version with your phone number and social media links added:
This project is licensed under the MIT License β see the LICENSE file for details.
AFFIL P M
π§ affilpm2004@gmail.com
- LinkedIn: linkedin.com/in/affilpm
- Instagram: instagram.com/affilpm
- Backend: GitHub - Wave Backend
- Frontend: GitHub - Wave Frontend
π Built with care for an exceptional user experience! π
Crafted with care by AFFIL P M