Echo
Regain Control over your Audio

Overview
A self-hosted audio library management platform that gives users complete control over their audio content. Built with a security-first approach, Echo enables uploading, organizing, streaming, and tracking podcasts, audiobooks, and research audio through an elegant, mobile-responsive interface.
The Challenge
Cloud-based audio platforms come with significant limitations: privacy concerns, vendor lock-in, rigid organization systems, and inability to attach research materials. I built Echo to solve these problems while maintaining a production-ready, scalable architecture.
Core Features
- Intelligent Audio Streaming: HTTP range request support enables instant seeking in large files without buffering. Variable playback speed (0.25x-3x), skip controls, and automatic progress tracking across devices.
- Flexible Organization: Collection-based system with external link attribution for attaching research papers and sources to audio content.
- Multi-Format Support: Handles MP3, WAV, M4A, OGG, and FLAC with automatic metadata extraction.
- Analytics Dashboard: Visual insights showing library statistics, recent activity, and listening patterns.
- Accessible Design: Mobile-first responsive UI with dark mode support and WCAG-compliant components.
Architecture
Built with a microservices-oriented architecture featuring four containerized services:
Frontend (Next.js 15 + TypeScript)
- App Router with React 19 Server Components
- shadcn/ui component library on Radix UI primitives
- Tailwind CSS with custom design system
- Framer Motion animations
- Recharts for data visualization
Backend (FastAPI + Python 3.11)
- Async SQLAlchemy ORM with PostgreSQL
- Alembic database migrations
- Redis for caching and queue management
- Pydantic validation and automatic OpenAPI docs
Key Architectural Decision: Implemented Next.js API proxy pattern that routes all backend requests through the frontend, eliminating CORS complexity and enabling single-endpoint deployment with Cloudflare Tunnel.
Security Implementation
Multi-layered security with defense-in-depth approach:
- Authentication: Clerk integration with custom OAuth UI, HttpOnly session cookies
- User Isolation: Database-level filtering ensuring users can only access their own data
- Demo Account Protection: Dual-layer system (frontend hooks + backend dependencies) preventing destructive operations
- Infrastructure Security: Environment-based secrets management, Docker network isolation, SQL injection protection via ORM
Technical Achievements
Zero-Configuration Deployment
- Single command: docker compose up -d
- Automatic database migrations on startup
- Service health checks with dependency management
End-to-End Type Safety
- TypeScript interfaces for all API responses
- Pydantic schemas for request/response validation
- SQLAlchemy models with full type hints
Mobile-First Streaming
- HTTP 206 Partial Content responses for efficient bandwidth usage
- Background audio support when device screen locks
- Cross-device progress synchronization
Production-Ready Infrastructure
- Multi-stage Docker builds for optimized images
- Stateless backend supporting horizontal scaling
- Connection pooling and async I/O for concurrent requests
Problem Solving
CORS Audio Streaming: Solved browser same-origin restrictions by implementing API proxy pattern, eliminating CORS entirely while simplifying SSL certificate management.
User Data Isolation: Migrated from MVP single-user to multi-user system through comprehensive Alembic migrations, adding user_id columns and implementing reusable FastAPI auth dependencies.
Secure Credential Management: Removed hardcoded credentials and implemented fail-secure configuration requiring explicit secrets via environment variables.
Tech Stack
Frontend: Next.js 15, React 19, TypeScript 5, shadcn/ui, Tailwind CSS 4, Framer Motion, TanStack Table, Recharts, Zod, Sonner
Backend: FastAPI, SQLAlchemy 2.0, PostgreSQL 16, Redis 7, Uvicorn, Pydantic, Mutagen, Celery
Auth & Security: Clerk with custom UI, session-based authentication
DevOps: Docker Compose V2, multi-stage builds, Cloudflare Tunnel support
Impact
Successfully deployed production-ready platform demonstrating:
- Full-stack development with modern frameworks
- Microservices architecture and API design
- Security engineering with authentication and authorization
- Container orchestration and DevOps practices
- Database schema design and migration strategies
- Mobile-responsive frontend development
The platform showcases ability to build scalable, secure applications with excellent developer experience and comprehensive documentation.