Skip to content

maks2134/maxify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต Maxify - Personal Music Streaming Service

Go Version Next.js TypeScript Tailwind CSS

Maxify is a full-stack personal music streaming service built with modern technologies. It allows users to upload, organize, and stream their personal music collection through a beautiful web interface.

๐Ÿš€ Features

๐ŸŽต Music Management

  • Upload audio files (MP3, WAV, FLAC, AAC, OGG, M4A)
  • Automatic metadata extraction
  • Personal music library organization
  • Advanced search functionality

๐Ÿ“‹ Playlist System

  • Create and manage custom playlists
  • Add/remove tracks from playlists
  • Playlist sharing and organization
  • Drag & drop playlist management

โ–ถ๏ธ Audio Player

  • Web-based audio player with full controls
  • Play/pause, skip, seek functionality
  • Volume control
  • Queue management
  • Real-time progress tracking

๐Ÿ” Authentication & Security

  • JWT-based authentication
  • Secure user registration and login
  • Protected routes and API endpoints
  • Password hashing with bcrypt

๐ŸŽจ Modern UI/UX

  • Responsive design with Tailwind CSS
  • Beautiful components with shadcn/ui
  • Dark/light theme support
  • Mobile-friendly interface
  • Real-time notifications

๐Ÿ› ๏ธ Tech Stack

Backend (Go)

Frontend (Next.js)

๐Ÿ“ Project Structure

maxify/
โ”œโ”€โ”€ server/                 # Go backend
โ”‚   โ”œโ”€โ”€ cmd/server/        # Application entry point
โ”‚   โ”œโ”€โ”€ internal/          # Internal packages
โ”‚   โ”‚   โ”œโ”€โ”€ config/        # Configuration management
โ”‚   โ”‚   โ”œโ”€โ”€ database/      # Database connections
โ”‚   โ”‚   โ”œโ”€โ”€ models/        # Data models
โ”‚   โ”‚   โ”œโ”€โ”€ services/      # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/   # HTTP handlers
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/    # HTTP middleware
โ”‚   โ”‚   โ””โ”€โ”€ routes/        # Route definitions
โ”‚   โ”œโ”€โ”€ docker-compose.yml # Docker services
โ”‚   โ”œโ”€โ”€ go.mod            # Go dependencies
โ”‚   โ””โ”€โ”€ Makefile          # Build commands
โ”œโ”€โ”€ client/                # Next.js frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/          # Next.js app router pages
โ”‚   โ”‚   โ”œโ”€โ”€ components/   # React components
โ”‚   โ”‚   โ”œโ”€โ”€ contexts/     # React contexts
โ”‚   โ”‚   โ””โ”€โ”€ lib/          # Utilities and API client
โ”‚   โ”œโ”€โ”€ package.json      # Node.js dependencies
โ”‚   โ””โ”€โ”€ tailwind.config.js # Tailwind configuration
โ””โ”€โ”€ docs/                 # Project documentation

๐Ÿš€ Quick Start

Prerequisites

  • Go 1.21+
  • Node.js 18+
  • Docker and Docker Compose
  • Git

1. Clone the Repository

git clone <repository-url>
cd maxify

2. Start Backend Services

cd server

# Copy environment file
cp env.example .env

# Start PostgreSQL and Redis
docker-compose up -d

# Install Go dependencies
go mod tidy

# Run the server
go run cmd/server/main.go

The backend will be available at http://localhost:8080

3. Start Frontend

cd client

# Copy environment file
cp env.local.example .env.local

# Install dependencies
npm install

# Start development server
npm run dev

The frontend will be available at http://localhost:3000

4. Access the Application

  1. Open http://localhost:3000 in your browser
  2. Register a new account or login
  3. Upload your first audio file
  4. Create playlists and start streaming!

๐Ÿ“š API Documentation

Authentication Endpoints

  • POST /api/v1/auth/register - Register new user
  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/logout - User logout

User Endpoints

  • GET /api/v1/users/profile - Get user profile
  • PUT /api/v1/users/profile - Update user profile
  • GET /api/v1/users/stats - Get user statistics

Track Endpoints

  • POST /api/v1/tracks/upload - Upload audio file
  • GET /api/v1/tracks - Get user's tracks
  • GET /api/v1/tracks/:id - Get specific track
  • DELETE /api/v1/tracks/:id - Delete track
  • GET /api/v1/tracks/:id/stream - Stream audio file

Playlist Endpoints

  • POST /api/v1/playlists - Create playlist
  • GET /api/v1/playlists - Get user's playlists
  • GET /api/v1/playlists/:id - Get specific playlist
  • PUT /api/v1/playlists/:id - Update playlist
  • DELETE /api/v1/playlists/:id - Delete playlist
  • POST /api/v1/playlists/:id/tracks - Add track to playlist
  • DELETE /api/v1/playlists/:id/tracks/:trackId - Remove track from playlist

Search Endpoints

  • GET /api/v1/search?q=query - General search
  • GET /api/v1/search/tracks?q=query - Search tracks
  • GET /api/v1/search/playlists?q=query - Search playlists
  • GET /api/v1/search/suggestions?q=query - Get search suggestions

๐Ÿณ Docker Deployment

Backend Services

cd server
docker-compose up -d

Production Build

# Build backend
cd server
go build -o bin/maxify cmd/server/main.go

# Build frontend
cd client
npm run build

๐Ÿงช Testing

Backend Tests

cd server
go test ./...

Frontend Tests

cd client
npm test

๐Ÿ“ Development

Backend Development

cd server
go run cmd/server/main.go

Frontend Development

cd client
npm run dev

Code Formatting

# Backend
cd server
go fmt ./...

# Frontend
cd client
npm run lint
npm run format

๐Ÿ”ง Configuration

Backend Configuration

Edit server/.env:

DB_HOST=localhost
DB_PORT=5432
DB_USER=maxify_user
DB_PASSWORD=maxify_password
DB_NAME=maxify

REDIS_HOST=localhost
REDIS_PORT=6379

JWT_SECRET=your-secret-key
JWT_EXPIRY=24h

PORT=8080
UPLOAD_DIR=./uploads
MAX_FILE_SIZE=50MB

Frontend Configuration

Edit client/.env.local:

NEXT_PUBLIC_API_URL=http://localhost:8080/api/v1

๐Ÿ“„ Documentation

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is for educational purposes only.

๐Ÿ™ Acknowledgments

๐Ÿ”ฎ Future Enhancements

  • Cloud storage integration (AWS S3, Google Cloud)
  • Real-time collaboration features
  • Advanced audio analysis and recommendations
  • Mobile app (flutter)
  • Social features (sharing, following)
  • Podcast support
  • Offline mode with PWA
  • Advanced search with full-text search
  • Audio transcoding and format conversion
  • Analytics and usage statistics

About

music listening service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published