{"id":48577781,"url":"https://github.com/amanbig/music_level","last_synced_at":"2026-04-08T16:03:32.638Z","repository":{"id":316836177,"uuid":"985432548","full_name":"Amanbig/music_level","owner":"Amanbig","description":"An AI-powered music generation platform that allows users to create unique musical compositions using artificial intelligence. Built with a modern tech stack featuring NestJS backend and Next.js frontend.","archived":false,"fork":false,"pushed_at":"2025-08-08T03:41:20.000Z","size":393,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-30T02:44:34.421Z","etag":null,"topics":["appwrite","geminiapi","jwt","nestjs","nextjs","typescript"],"latest_commit_sha":null,"homepage":"https://music-level.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amanbig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-17T18:47:43.000Z","updated_at":"2025-08-16T05:28:04.000Z","dependencies_parsed_at":"2025-09-27T02:49:12.289Z","dependency_job_id":"f17ab4b9-346c-4b55-98c4-84f67f2de249","html_url":"https://github.com/Amanbig/music_level","commit_stats":null,"previous_names":["amanbig/music_level"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Amanbig/music_level","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanbig%2Fmusic_level","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanbig%2Fmusic_level/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanbig%2Fmusic_level/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanbig%2Fmusic_level/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amanbig","download_url":"https://codeload.github.com/Amanbig/music_level/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanbig%2Fmusic_level/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appwrite","geminiapi","jwt","nestjs","nextjs","typescript"],"created_at":"2026-04-08T16:03:29.349Z","updated_at":"2026-04-08T16:03:32.623Z","avatar_url":"https://github.com/Amanbig.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/amanpreet"],"categories":[],"sub_categories":[],"readme":"# Music Level 🎵\n\nAn AI-powered music generation platform that allows users to create unique musical compositions using artificial intelligence that is gemini API. Built with a modern tech stack featuring NestJS backend and Next.js frontend.\n\n## 🌟 Features\n\n- **AI Music Generation**: Create unique music compositions using advanced AI algorithms\n- **Multi-Instrument Support**: Generate music for piano, guitar, violin, flute, and drums\n- **User Authentication**: Secure registration and login system with JWT tokens\n- **Music Library**: Save, organize, and manage your generated compositions\n- **MIDI Export**: Download compositions as standard MIDI files\n- **Responsive Design**: Works seamlessly across desktop and mobile devices\n- **Real-time Generation**: Live feedback during music creation process\n\n## 🏗️ Architecture\n\nThis project follows a secure three-tier architecture with Next.js API routes acting as a proxy layer:\n\n```\nFrontend (React) → Next.js API Routes → NestJS Backend → Appwrite\n```\n\n```\nmusic_level/\n├── backend/          # NestJS API server\n├── frontend/         # Next.js web application with API routes\n└── README.md        # This file\n```\n\n### Security Benefits\n- **Hidden Backend**: The NestJS backend URL is never exposed to the client\n- **HTTP-Only Cookies**: JWT tokens are stored in secure HTTP-only cookies\n- **Server-Side Validation**: Authentication is validated on the server side\n- **Request Proxy**: All API requests go through Next.js API routes for additional security\n\n### Backend (NestJS)\n- **Framework**: NestJS with TypeScript\n- **Database**: Appwrite for user management and file storage\n- **AI Integration**: Google Gemini API for music generation\n- **Authentication**: JWT with Passport.js\n- **File Processing**: MIDI file generation and management\n- **Security**: CORS configured to only allow Next.js frontend\n\n### Frontend (Next.js)\n- **Framework**: Next.js 15 with App Router\n- **UI Library**: React 19 with Tailwind CSS\n- **API Layer**: Next.js API routes proxy all backend requests\n- **Authentication**: HTTP-only cookies with server-side validation\n- **State Management**: React hooks and context\n- **Form Handling**: React Hook Form\n- **HTTP Client**: Axios (client-side only communicates with Next.js API routes)\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 18+\n- npm or yarn\n- Appwrite instance (for backend database)\n- Google Gemini API key (for AI music generation)\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/Amanbig/music_level.git\ncd music_level\n```\n\n### 2. Backend Setup\n\n```bash\ncd backend\n\n# Install dependencies\nnpm install\n\n# Configure environment variables\ncp .env.example .env\n# Edit .env with your configuration\n\n# Start the backend server\nnpm run start:dev\n```\n\nThe backend will be available at `http://localhost:8000`\n\n### 3. Frontend Setup\n\n```bash\ncd frontend\n\n# Install dependencies\nnpm install\n\n# Configure environment variables\ncp .env.local.example .env.local\n# Edit .env.local with your configuration\n\n# Start the frontend development server\nnpm run dev\n```\n\nThe frontend will be available at `http://localhost:3000`\n\n## 🔧 Configuration\n\n### Backend Environment Variables\n\n```bash\n# Server Configuration\nPORT=8000\nNODE_ENV=development\n\n# Frontend URL for CORS\nFRONTEND_URL=http://localhost:3000\nCORS_ORIGIN=http://localhost:3000\nCORS_CREDENTIALS=true\n\n# Appwrite Configuration\nAPPWRITE_ENDPOINT=https://your-appwrite-endpoint\nAPPWRITE_PROJECT_ID=your-project-id\nAPPWRITE_API_KEY=your-api-key\nAPPWRITE_DATABASE_ID=your-database-id\nAPPWRITE_USER_COLLECTION_ID=your-user-collection-id\nAPPWRITE_GENERATION_COLLECTION_ID=your-generation-collection-id\nAPPWRITE_BUCKET_ID=your-bucket-id\n\n# Google Gemini API\nGEMINI_API_URL=https://generativeai.googleapis.com/v1/\nGEMINI_API_KEY=your-gemini-api-key\nGEMINI_MODEL=gemini-pro\n\n# JWT Configuration\nJWT_SECRET=your-jwt-secret\nJWT_EXPIRES_IN=7d\n```\n\n### Frontend Environment Variables\n\n```bash\n# Backend API Configuration (Server-side only)\nBACKEND_API_URL=http://localhost:8000  # NestJS backend URL for Next.js API routes\n```\n\n**Note**: The frontend uses Next.js API routes as a secure proxy layer. The `BACKEND_API_URL` is only used server-side and never exposed to the client.\n\n## 📚 API Documentation\n\n### Authentication Endpoints\n\n- `POST /auth/signup` - User registration\n- `POST /auth/login` - User login\n- `POST /auth/logout` - User logout\n- `GET /auth/me` - Get current user\n- `GET /auth/profile` - Get user profile\n- `PUT /auth/profile` - Update user profile\n\n### Music Generation Endpoints\n\n- `POST /generate/ai-response` - Generate music with AI\n- `POST /generate/save` - Save generated music\n- `GET /generate/user/:userId` - Get user's saved music\n- `GET /generate/:id` - Get specific generation\n- `GET /generate/:id/download` - Download MIDI file\n- `DELETE /generate/:id` - Delete generation\n\n## 🎯 Usage\n\n### 1. User Registration\n- Visit the landing page at `http://localhost:3000`\n- Click \"Get Started\" to create a new account\n- Fill in your details and verify your email\n\n### 2. Generate Music\n- Navigate to the \"Generate\" page\n- Specify your preferences:\n  - Song name (optional)\n  - Instrument (piano, guitar, violin, flute, drums)\n  - Additional instructions for the AI\n- Click \"Generate Music\" and wait for the AI to create your composition\n\n### 3. Manage Your Library\n- View all your saved compositions on the Dashboard\n- Download MIDI files for use in other music software\n- Delete compositions you no longer need\n- Add descriptions to organize your music\n\n## 🛠️ Development\n\n### Backend Development\n\n```bash\ncd backend\n\n# Development with hot reload\nnpm run start:dev\n\n# Build for production\nnpm run build\n\n# Run tests\nnpm run test\n\n# Run linting\nnpm run lint\n```\n\n### Frontend Development\n\n```bash\ncd frontend\n\n# Development server with Turbopack\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Start production server\nnpm run start\n\n# Run linting\nnpm run lint\n```\n\n## 🚀 Deployment\n\n### Backend Deployment\n\n1. **Environment Setup**: Configure production environment variables\n2. **Build**: Run `npm run build`\n3. **Deploy**: Use platforms like Railway, Heroku, or DigitalOcean\n4. **Database**: Ensure Appwrite is configured for production\n\n### Frontend Deployment\n\n1. **Vercel (Recommended)**:\n   - Connect your GitHub repository\n   - Set environment variables in Vercel dashboard\n   - Deploy automatically on push to main branch\n\n2. **Manual Deployment**:\n   - Build: `npm run build`\n   - Deploy the `.next` folder to your hosting provider\n\n## 🤝 Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Commit your changes: `git commit -m 'Add amazing feature'`\n4. Push to the branch: `git push origin feature/amazing-feature`\n5. Open a Pull Request\n\n### Development Guidelines\n\n- Follow TypeScript best practices\n- Write tests for new features\n- Use conventional commit messages\n- Ensure code passes linting checks\n- Update documentation as needed\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **Google Gemini API** for AI music generation capabilities\n- **Appwrite** for backend-as-a-service infrastructure\n- **NestJS** and **Next.js** communities for excellent frameworks\n- **Tone.js** for MIDI processing and audio capabilities\n\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%E2%98%95%EF%B8%8F-orange?style=for-the-badge)](https://buymeacoffee.com/amanpreet)\n\n## 📞 Support\n\nIf you encounter any issues or have questions:\n\n1. Check the [Issues](https://github.com/Amanbig/music_level/issues) page\n2. Create a new issue with detailed information\n3. Join our community discussions\n\n## 🗺️ Roadmap\n\n- [ ] Real-time MIDI playback in browser\n- [ ] Advanced music theory integration\n- [ ] Collaborative composition features\n- [ ] Mobile app development\n- [ ] Integration with popular DAWs\n- [ ] AI model fine-tuning for better results\n\n---\n\n**Music Level** - Empowering creativity through AI-powered music generation 🎵\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanbig%2Fmusic_level","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famanbig%2Fmusic_level","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanbig%2Fmusic_level/lists"}