Skip to content

A serverless music streaming platform built with React, Spring Boot, and AWS (Lambda, S3, API Gateway, DynamoDB). Features secure MP3 streaming via pre-signed URLs. ๐ŸŽตโ˜๏ธ

Notifications You must be signed in to change notification settings

Adarsh0311/Musify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต Musify โ€“ Serverless Music Streaming Platform

A full-stack, serverless music streaming application built with Spring Boot, React, and AWS. Musify enables secure MP3 streaming using pre-signed S3 URLs and scalable serverless backend architecture.

๐Ÿ“ System Architecture

The application follows a fully serverless architecture:

  1. React frontend sends API requests.
  2. Amazon API Gateway routes HTTPS requests to AWS Lambda.
  3. Lambda (Spring Boot) interacts with DynamoDB for metadata.
  4. Lambda generates pre-signed URLs for secure S3 access.
  5. Client streams MP3 files directly from S3.

Musify Architecture

๐Ÿš€ Features

  • ๐ŸŽต Upload and stream MP3 files
  • ๐Ÿ” Secure file access using pre-signed S3 URLs
  • โšก Fully serverless backend using AWS Lambda
  • ๐Ÿ“ฆ Metadata storage using DynamoDB
  • ๐ŸŒ Scalable architecture using API Gateway
  • โ˜๏ธ Cloud-native deployment

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 18 + TypeScript
  • Vite build tool
  • Bootstrap 5 + Custom CSS

Backend

  • Spring Boot
  • AWS SDK v2
  • AWS Lambda
  • AWS API Gateway
  • AWS S3
  • AWS DynamoDB

๐Ÿ” Secure Streaming Flow

  1. User requests a song.
  2. Lambda retrieves S3 object key from DynamoDB.
  3. Lambda generates a time-limited pre-signed URL.
  4. URL is returned to React.
  5. React streams the MP3 directly from S3.

This ensures:

  • No direct public access to S3
  • Time-bound secure streaming
  • Reduced backend load

โš™๏ธ Prerequisites

  • Node.js 18+
  • Java 21+
  • AWS Account
  • AWS CLI configured

๐Ÿš€ Quick Start

1. Backend Setup

cd musify-backend
mvn clean install
mvn spring-boot:run

2. Frontend Setup

cd musify-frontend
npm install
npm run dev

โ˜๏ธ Deployment

The backend is deployed as a serverless application:

  • Spring Boot application packaged using AWS Lambda Java runtime.
  • API Gateway configured for HTTP routing
  • IAM roles configured with least-privilege access
  • S3 used for object storage
  • DynamoDB used for metadata storage

๐Ÿ“ˆ Design Decisions

  • Serverless architecture reduces operational overhead
  • Pre-signed URLs offload streaming directly to S3
  • DynamoDB ensures low-latency metadata retrieval
  • API Gateway enables scalable request routing
  • Stateless Lambda functions improve horizontal scaling

๐Ÿ”ฎ Future Enhancements

  • User authentication with AWS Cognito
  • Playlists and favorites
  • Caching using Redis
  • CloudFront CDN for faster streaming
  • Monitoring with CloudWatch

๐Ÿ‘จโ€๐Ÿ’ป Author

Adarsh Kumar
MS in Information Systems
AWS Certified Developer

About

A serverless music streaming platform built with React, Spring Boot, and AWS (Lambda, S3, API Gateway, DynamoDB). Features secure MP3 streaming via pre-signed URLs. ๐ŸŽตโ˜๏ธ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published