An open-source, self-hosted WhatsApp bot that enables users to request movies and TV shows through natural conversation. Automatically submits requests to Radarr, Sonarr, or Overseerr.
π Documentation:
- DEPLOYMENT.md - Production deployment with Docker
- ENVIRONMENT.md - Environment variable configuration guide
- CONTRIBUTING.md - Contribution guidelines
- CODE_OF_CONDUCT.md - Community guidelines
- SECURITY.md - Security policy and reporting
- Node.js >= 20.0.0
- npm >= 10.0.0
- Docker & Docker Compose (for production deployment)
# 1. Install dependencies
npm install
# 2. Configure environment
cp .env.example .env.local
# Edit .env.local and set secure values:
# - Generate JWT_SECRET: openssl rand -base64 32
# - Generate ENCRYPTION_KEY: openssl rand -hex 32
# (Optional) Set ADMIN_USERNAME and ADMIN_PASSWORD for auto-seeding
# 3. Setup database
cd backend
npm run db:migrate # Apply migrations
# 4. Start development (both backend + frontend)
cd ..
npm run dev
# 5. Complete setup wizard
# Access http://localhost:3000 and complete the initial setupDevelopment Environment:
- Frontend runs on
http://localhost:3000(configurable via.env.localβVITE_PORT) - Backend runs on
http://localhost:4000(configurable via.env.localβPORT) - Vite dev server automatically proxies
/apiand/socket.ioto backend
First Time Setup:
On first access, you'll be guided through a setup wizard to:
- Create your admin account
- Receive 5 backup codes for account recovery
- Access the dashboard
Note: Use
.env.localfor development and.env.prodfor Docker/production. See ENVIRONMENT.md for details.
- π§ Setup Wizard - Easy initial setup with guided account creation and backup codes
- π Secure Admin Dashboard - Web-based admin interface with JWT authentication
- π¬ WhatsApp Integration - Connect your WhatsApp account via QR code
- π¬ Media Request System - Users can request movies and TV shows via WhatsApp
- π Service Integration - Connect to Radarr, Sonarr, or Overseerr
- π Request Management - Approve, reject, or auto-approve media requests
- π Media Search - Search across configured media services
- π Audit Logging - Complete history of all requests and actions
- π Backup Codes - Account recovery with 5 single-use backup codes
- π Security First - Encrypted API keys, hashed credentials, rate limiting
- π³ Docker Ready - Easy deployment with Docker Compose
- π¨ Modern UI - Beautiful, responsive admin dashboard with Shadcn UI
- Home Media Server: Manage family media requests
- Private Media Libraries: Controlled access to media automation
- Community Media Sharing: Moderate media requests from community members
- Personal Assistant: Natural language interface to media services
wamr/
βββ backend/ # Node.js/Express API
β βββ src/
β β βββ api/ # Routes, controllers, middleware, validators
β β βββ config/ # Environment, logger
β β βββ db/ # Database client, schema
β β βββ services/ # Business logic (auth, encryption, integrations, WhatsApp)
β β βββ utils/ # Error codes, templates, helpers
β β βββ types/ # TypeScript types
β β βββ index.ts # App entry point
β βββ tests/ # Unit, integration, E2E tests
β βββ drizzle/ # Database migrations
β βββ data/ # SQLite database file
β
βββ frontend/ # React/Vite SPA
βββ src/
β βββ components/ # UI components (shadcn/ui)
β βββ pages/ # Page components
β βββ hooks/ # Custom React hooks
β βββ services/ # API client, Socket.IO
β βββ lib/ # Utils, query client
β βββ types/ # TypeScript types
βββ tests/ # Component and E2E tests
All commands use Turborepo for efficient task orchestration. Run from the project root:
npm run dev # Start both backend + frontend (parallel)
npm run backend:dev # Backend only
npm run frontend:dev # Frontend onlynpm run build # Build everything (with smart caching)
npm run backend:build # Build backend only
npm run frontend:build # Build frontend onlynpm run test # Run all tests
npm run lint # Lint code
npm run format # Format code with Prettier
npm run format:check # Check formatting without changescd backend
npm run db:generate # Generate migrations from schema changes
npm run db:migrate # Apply migrations to database
npm run db:studio # Open Drizzle Studio (database GUI)
npm run db:seed # Seed database with admin user (optional)Note: The setup wizard handles initial admin creation. Database seeding is only needed if you set
ADMIN_USERNAMEandADMIN_PASSWORDin environment variables.
npm run docker:build # Build Docker images
npm run docker:up # Start containers in detached mode
npm run docker:down # Stop and remove containers
npm run docker:logs # View container logs
npm run docker:restart # Restart all servicesπ‘ Tip: For detailed Docker deployment options, see DEPLOYMENT.md
npm run clean # Remove dist/, node_modules, .turbo cacheSee SECURITY.md for our security policy and vulnerability reporting.
Key Security Features:
- Encrypted API keys (AES-256-GCM)
- Hashed passwords (bcrypt)
- Hashed phone numbers (SHA-256)
- JWT authentication
- Rate limiting on all endpoints
- Automatic sensitive data redaction in logs
- admin_users: Admin credentials
- setup_status: Tracks if initial setup is complete
- backup_codes: Single-use recovery codes for admin accounts
- whatsapp_connections: WhatsApp connection status
- conversation_sessions: Active multi-turn conversations
- media_service_configurations: Radarr/Sonarr/Overseerr configs
- request_history: Audit log of all requests
- settings: Application configuration settings
- contacts: Phone number contacts with encrypted data
See Database Commands above for migration workflow.
Status: β Active - 661 tests passing
Current Coverage:
- Backend: 654 unit tests covering controllers, services, repositories, and middleware
- Frontend: 7 component and utility tests
- CI/CD: Automated testing with
bun run ci
Run Tests:
bun run test # Run all tests
bun run test:backend # Backend tests only
bun run test:frontend # Frontend tests onlyTest Infrastructure:
- Vitest for unit testing
- React Testing Library for component tests
- Mocked database and external services
- Comprehensive coverage of authentication, API endpoints, and business logic
Quick Start:
# Pull and start with defaults
docker compose -f docker-compose.prod.yml up -d
# Access: http://localhost:9002
# Complete the setup wizard to create your admin account.env.prod file to customize security keys!
Customize Settings (Optional):
# Create .env.prod file
cp .env.example .env.prod
# Edit with your values (especially JWT_SECRET, ENCRYPTION_KEY)
# Then start the container
docker compose -f docker-compose.prod.yml up -dAccess:
- Local:
http://localhost:9002 - Network:
http://YOUR_SERVER_IP:9002 - Reverse Proxy:
https://wamr.yourdomain.com
π See DEPLOYMENT.md for complete deployment instructions, configuration options, and troubleshooting.
We love contributions! Please read our Contributing Guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit using conventional commits (
git commit -m 'feat: add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Check out good first issues to get started!
This project is licensed under the MIT License - see the LICENSE file for details.
This means you are free to use, modify, and distribute this software, even for commercial purposes, as long as you include the original copyright notice and license.
- @whiskeysockets/baileys - WhatsApp Web API
- Radarr - Movie management
- Sonarr - TV series management
- Overseerr - Request management system
- Shadcn UI - Beautiful UI components
- π Documentation
- π Issue Tracker
- π¬ Discussions
- π Security Policy
See our GitHub Projects for upcoming features and releases.
If you find this project useful, please consider giving it a star! It helps others discover the project.
Made with β€οΈ by Anant