Project Info
Inspiration
Music has always been something that spoke to us. Music can be used as a sort of therapy for some people. However, we are only limited to the music we like, not by what music may help us. We introduce AMPLIE (Auto-Generated Music Playlist Linked to an Individual's Emotions), a web app that tracks a user's actions throughout the day and generates a policy for the best music tracks to help them "reflect" or "work with" their emotions. We were inspired by: Mental health awareness: Music therapy is scientifically proven to help manage anxiety, depression, and stress Privacy concerns: Emotion data and an individual's activity data is personal. Social connection: Shared music experiences bring people together, even when they're feeling different things
What it does
AMPLIE (Auto-generated Music Playlist Linked to Individuals' Emotions) is an emotion-aware music platform that generates personalized playlists tailored to your mood—whether solo or in groups. 🎵 Core Features 1. Individual Mood Detection Users input how they're feeling via text or voice Groq AI (LLaMA 3.1) analyzes the emotional content Returns detected emotion with confidence score 2. Intelligent Policy Mapping ASI:One translates emotions into musical attributes: Tempo (BPM) Energy (0-1 scale) Valence (happiness/positivity) Genre preferences Tempo (BPM) Energy (0-1 scale) Valence (happiness/positivity) Genre preferences Supports two modes: "Reflect my mood" -> Match your current emotion "Work with my mood" -> Balance/uplift your emotion "Reflect my mood" -> Match your current emotion "Work with my mood" -> Balance/uplift your emotion 3. Semantic Track Retrieval Chroma vector database stores music embeddings Semantic similarity search finds tracks matching your emotional policy Returns ranked playlist with match percentages 4. Group Room Mood Blending Multiple users join a shared room via Fetch.ai agents Each person sets their individual mood ShareAgent negotiates and blends emotional policies Generates a compromise playlist that works for everyone Perfect for car rides, parties, or study sessions with friends 5. Privacy-First Design Explicit consent flow before any data processing Local storage for history (expo-secure-store) No background recording Transparent data usage
How we built it
🏗️ Architecture We built AMPLIE as a full-stack mobile application with multi-agent orchestration: 🛠️ Tech Stack Frontend: React Native + Expo: Cross-platform mobile development TypeScript: Type safety and developer experience Expo Router: File-based navigation Zustand: Lightweight state management expo-av: Audio recording and playback Clerk: OAuth authentication (Google/Apple) NativeWind: Tailwind CSS for React Native Backend: Node.js 20 + TypeScript: Modern JavaScript runtime Fastify: High-performance web framework Chroma: Vector database for embeddings Docker: Containerized Chroma deployment AI/ML Services: Groq: LLM-based emotion detection (LLaMA 3.1-8b-instant) ASI:One: Emotion-to-music policy mapping Chroma: Semantic similarity search Fetch.ai/Agentverse: Multi-agent room negotiation DevOps: Postman: API testing (16 automated tests) Git: Version control npm/pnpm: Package management 👥 Team Division (4 Developers) Frontend Lead: React Native app, UI/UX, consent flow, audio playback ML Lead: Emotion detection, Groq integration, on-device model research Backend Lead: Fastify API, ASI:One, Chroma, Postman tests Agent Lead: Fetch.ai agents, ShareAgent, room orchestration, Docker 📋 Build Process (48 Hours) Hours 0-8: Setup repos, scaffold frontend/backend, implement consent flow Hours 8-16: Emotion detection (Groq), policy mapping (ASI:One), track embeddings (Chroma) Hours 16-24: Connect frontend ↔ backend, build playlist UI, test individual flow Hours 24-36: Implement group rooms, deploy ShareAgent, test mood blending Hours 36-44: UI polish, comprehensive testing, Postman collection, documentation Hours 44-48: Final integration, demo rehearsal, Devpost submission
Challenges we ran into
1. Audio API Migration Hell 🎤 Started with expo-audio-recorder → deprecated Tried AudioRecorder from Expo → doesn't exist in current SDK Solution: Migrated to expo-av Audio API with proper permission handling Learned: Always check package compatibility with current Expo SDK version 2. Agent Communication Debugging 🤖 Fetch.ai agents needed precise message formats ShareAgent wasn't receiving room mood updates Solution: Implemented request/response logging, validated JSON schemas Added health check endpoints for agent monitoring 3. Vector Embedding Quality 📊 Initial track retrieval returned poor matches Track metadata wasn't normalized (tempo ranges, genre tags) Solution: Preprocessed embeddings with weighted features, normalized scales Improved match accuracy from ~40% to ~85% 4. Real-time Group Synchronization 👥 Multiple users setting moods simultaneously caused race conditions ShareAgent needed to debounce rapid updates Solution: Implemented request queuing, added 3-second debounce for playlist generation Used in-memory state management with timestamp validation 5. Frontend ↔ Backend Integration 🔌 Initially used mock data for everything Connecting real APIs revealed error handling gaps Solution: Enhanced lib/api.ts with retry logic, timeout handling, user-friendly errors Added loading states for all async operations 6. Time Management ⏰ Ambitious scope (Fish Audio, Letta Cloud, Visa API) Had to prioritize core features over nice-to-haves Solution: Focused on 3 strong integrations (Groq, Chroma, Fetch.ai) rather than 7 weak ones Built modular architecture for future expansion 7. Testing on Physical Devices 📱 localhost doesn't work on phones Needed local network IP addresses Solution: Created environment variable guide, added network detection helper Used QR code scanning for easy testing
Accomplishments we're proud of
🏆 Technical Achievements Multi-Agent Orchestration: Successfully implemented Fetch.ai agent-to-agent negotiation for real-time mood blending—one of the most complex features we've built Multi-Agent Orchestration: Successfully implemented Fetch.ai agent-to-agent negotiation for real-time mood blending—one of the most complex features we've built Semantic Music Search: Chroma vector database retrieves tracks with 85%+ match accuracy using embedding-based similarity Semantic Music Search: Chroma vector database retrieves tracks with 85%+ match accuracy using embedding-based similarity Production-Ready Testing: Created 16 automated Postman tests with 100% endpoint coverage and detailed assertions Production-Ready Testing: Created 16 automated Postman tests with 100% endpoint coverage and detailed assertions Privacy Architecture: Built explicit consent system with local storage and transparent data usage—no creepy background tracking Privacy Architecture: Built explicit consent system with local storage and transparent data usage—no creepy background tracking Complete Documentation: 5 comprehensive markdown files (1000+ lines) covering setup, architecture, troubleshooting, and demo scripts Complete Documentation: 5 comprehensive markdown files (1000+ lines) covering setup, architecture, troubleshooting, and demo scripts 🎨 Product Achievements Intuitive UX: Clean, accessible interface with color-coded moods, waveform visualizations, and smooth animations Intuitive UX: Clean, accessible interface with color-coded moods, waveform visualizations, and smooth animations Dual Input Modes: Support for both text and voice input to accommodate different user preferences Dual Input Modes: Support for both text and voice input to accommodate different user preferences Group Experience: Solved the "what should we listen to?" problem with algorithmic mood blending Group Experience: Solved the "what should we listen to?" problem with algorithmic mood blending Demo-Ready: Fully functional app that works end-to-end—not just slides and mockups Demo-Ready: Fully functional app that works end-to-end—not just slides and mockups 🚀 Team Achievements Parallel Development: Frontend, backend, agents, and DevOps worked simultaneously with minimal conflicts Parallel Development: Frontend, backend, agents, and DevOps worked simultaneously with minimal conflicts Knowledge Sharing: Every team member learned new technologies (React Native, Fastify, Fetch.ai, Chroma) Knowledge Sharing: Every team member learned new technologies (React Native, Fastify, Fetch.ai, Chroma) 48-Hour Sprint: Went from idea to fully functional demo with comprehensive testing in 2 days 48-Hour Sprint: Went from idea to fully functional demo with comprehensive testing in 2 days
What we learned
🧠 Technical Learnings Vector Databases Are Powerful: Chroma's semantic search eliminated complex filtering logic—embeddings just "understand" similarity Vector Databases Are Powerful: Chroma's semantic search eliminated complex filtering logic—embeddings just "understand" similarity Agent-Based Systems Are Hard: Debugging asynchronous multi-agent systems requires excellent logging and monitoring Agent-Based Systems Are Hard: Debugging asynchronous multi-agent systems requires excellent logging and monitoring LLMs for Emotion Detection Work Well: Groq + LLaMA 3.1 achieved surprisingly high accuracy with simple prompts LLMs for Emotion Detection Work Well: Groq + LLaMA 3.1 achieved surprisingly high accuracy with simple prompts TypeScript Saves Time: Caught 50+ bugs at compile-time that would've been runtime disasters TypeScript Saves Time: Caught 50+ bugs at compile-time that would've been runtime disasters Testing Early Matters: Postman tests caught integration bugs before they reached the app Testing Early Matters: Postman tests caught integration bugs before they reached the app 🎨 Product Learnings Privacy Is a Feature: Users loved the explicit consent flow—transparency builds trust Privacy Is a Feature: Users loved the explicit consent flow—transparency builds trust Emotion Modes Matter: "Reflect" vs "Work with" resonated strongly—people want control over whether music matches or shifts their mood Emotion Modes Matter: "Reflect" vs "Work with" resonated strongly—people want control over whether music matches or shifts their mood Group Features Are Complex: Synchronization, conflict resolution, and fairness algorithms are non-trivial Group Features Are Complex: Synchronization, conflict resolution, and fairness algorithms are non-trivial 👥 Team Learnings Scope Ruthlessly: Better to nail 3 integrations than half-finish 7 Scope Ruthlessly: Better to nail 3 integrations than half-finish 7 Document as You Build: READMEs written during development are 10x better than post-hoc documentation Document as You Build: READMEs written during development are 10x better than post-hoc documentation Demo is King: Judges care more about working features than architectural perfection Demo is King: Judges care more about working features than architectural perfection 🌐 Ecosystem Learnings Sponsor Tools Are Powerful: Fetch.ai, ASI:One, Groq, and Chroma provided capabilities we couldn't build in 48 hours Sponsor Tools Are Powerful: Fetch.ai, ASI:One, Groq, and Chroma provided capabilities we couldn't build in 48 hours API Design Matters: Consistent error formats and response structures made integration painless API Design Matters: Consistent error formats and response structures made integration painless Docker Simplifies Deployment: Chroma running in a container eliminated setup headaches Docker Simplifies Deployment: Chroma running in a container eliminated setup headaches
What's next
🎯 Short-Term (Next 2 Weeks) Complete Fish Audio Integration: Generate 20-30s music clips from emotional policies Letta Cloud Memory: Store long-term mood patterns for personalized recommendations Visa Tipping: Enable artist/creator support with micro-donations On-Device Emotion Model: TensorFlow Lite for fully local inference (no cloud calls) iOS + Android Builds: Publish to App Store and Google Play (TestFlight/beta) 🚀 Medium-Term (Next 3 Months) Spotify/Apple Music Integration: Play full tracks, not just metadata Advanced Mood Blending: ML-based fairness algorithms for groups >2 people Emotion History Analytics: Visualize mood patterns over time Playlist Sharing: Export to Spotify, create shareable links Voice Commands: "Play something uplifting" hands-free control Wearable Integration: Apple Watch, Fitbit for context-aware music (workout, sleep) 🌟 Long-Term Vision (6+ Months) Music Therapy Partnerships: Collaborate with mental health professionals for clinical validation Artist Collaboration: Let musicians tag tracks with emotional metadata Community Rooms: Public mood-based listening parties (study, workout, chill) Emotion Insights: Optional analytics for users to understand emotional patterns Multi-Modal Input: Detect emotion from photos, calendar events, biometric data (with consent) Accessibility Features: Audio descriptions, high-contrast modes, screen reader support International Expansion: Support for 20+ languages, cultural music preferences B2B Licensing: Workplace wellbeing programs, therapy clinics, fitness studios Research Platform: Anonymized, opt-in dataset for emotion-music research 💡 Moonshot Ideas AI-Generated Music: Beyond retrieval—create original tracks for your exact emotional state Emotional Social Network: Connect with others feeling similar emotions (with privacy controls) Predictive Mood Detection: Anticipate emotional needs based on time, location, history VR Music Therapy: Immersive audiovisual experiences for emotional regulation 🔗 Links GitHub (Backend): AMPLIE-cloud GitHub (Frontend): AMPLIE-app Demo Video: [Coming Soon - YouTube] Postman Collection: Available in /postman directory Architecture Diagram: See ARCHITECTURE.md in repo 👥 Team 4 Developers | 48 Hours | Built at CalHacks 2025 Frontend Lead - Mobile app, UI/UX, consent flow ML Lead - Emotion detection, Groq integration Backend Lead - API, integrations, testing Agent Lead - Fetch.ai agents, orchestration 🙏 Acknowledgments Special thanks to: CalHacks organizers for an incredible hackathon Fetch.ai for agent infrastructure and support ASI:One for emotion mapping technology Groq for lightning-fast LLM inference Chroma for vector database capabilities Postman for testing tools The entire open-source community for making this possible AMPLIE - Music that understands you 🎵❤️ Built with ❤️ in 48 hours at CalHacks 2025
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Analysis
View
Metric
- 9
- 9
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- TypeScriptIn code
5 of 5 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
59 KB
Source files
26
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
sezavala/AMPLIE-cloud
42 files · 461 KB · @ afe361e
Structure
Interface
9 files · 21%Screens, components and styles rendered to the user.
API & routing
11 files · 26%Request entry points: routes, handlers and controllers.
Application logic
8 files · 19%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript78%
- Python13%
- CSS5%
- Markdown2%
- Shell2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 24- @aws-sdk/client-s3
- @fastify/cors
- @fastify/helmet
- @fastify/sensible
- dotenv
- fastify
- jose
- next
- react
- react-dom
- zod
- +13 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.