MEW2 (Music Every Week v2) is a collaborative, cloud-native music songwriting and production platform built for creative communities. Designed to foster consistent weekly creative output, MEW2 enables hosts to launch themed Prompts organized into multi-week Sessions where songwriters, producers, and musicians submit original audio tracks, collaborate, and share feedback.
- π΅ Structured Prompts & Sessions: Organize creative assignments into themed seasons (e.g., Summer 2026 Session) with configurable submission deadlines and reveal dates.
- π Dynamic Access Modes:
- Direct (Public): Open to anyone with the link; participants are automatically accepted upon submission.
- Invite-Only (Private): Host-curated rooms requiring explicit email invitation and acceptance.
- Volunteer Pool: Open participant slots that members can claim on a first-come, first-served basis.
- π§ High-Performance Audio Player: Continuous background audio playback, real-time waveform visualization, and timestamped threaded comments for precise production feedback.
- π Live Watch Parties: Synchronized, real-time community listening sessions featuring live chat and host-controlled "Radio Mode" broadcasting.
- π οΈ Creator & Admin Dashboard: Comprehensive administrative suite to manage session calendars, moderate submissions, handle extension requests, and export stems/playlists.
MEW2 is built as a modern serverless web application. Real-time state synchronization is powered by Cloud Firestore, while large audio and artwork files are stored securely in Cloudflare R2 via presigned upload URLs generated by Vercel Serverless Functions.
graph TD
subgraph Client [Client Tier]
UI[React SPA / Vite + Tailwind CSS]
end
subgraph Auth & Database [Firebase Tier]
Auth[Firebase Auth <br/> Magic Link Passwordless]
Firestore[(Cloud Firestore <br/> Real-time State & Profiles)]
end
subgraph Serverless & Storage [Cloud Tier]
Vercel[Vercel Serverless Functions <br/> /api/upload]
R2[(Cloudflare R2 <br/> S3-Compatible Media Bucket)]
end
UI -->|1. Sign In / Token| Auth
UI <-->|2. Real-time Listeners & Mutations| Firestore
UI -->|3. Request Presigned Upload URL| Vercel
Vercel -->|4. Generate Signed PutObject URL| R2
UI -->|5. Direct Audio/Image Upload| R2
| Layer | Technology | Rationale |
|---|---|---|
| Frontend Framework | React 19 + TypeScript + Vite | Maximum client-side performance, modern React hooks, and instant hot-module reload. |
| Styling & UI | Tailwind CSS v4 | Utility-first styling with responsive design tokens and dark mode support. |
| State & Database | Cloud Firestore | Ultra-low latency real-time listeners (onSnapshot) for instant community feed and chat updates. |
| Authentication | Firebase Auth (Magic Link) | Passwordless email authentication ensuring low friction and high security without password management overhead. |
| File Storage | Cloudflare R2 | Zero egress fee, S3-compatible object storage for high-bitrate WAV/MP3 audio files and cover art. |
| Hosting & API | Vercel | Seamless edge deployment for the SPA and Node.js serverless functions for presigned URL signing. |
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
- Firebase Project: With Authentication (Email Link) and Cloud Firestore enabled.
- Cloudflare R2 Bucket: With CORS configured for your domain(s).
git clone https://github.com/thephilgray/music-every-week.git
cd music-every-weekcd frontend
npm installCopy the example environment file inside frontend/ and fill in your credentials:
cp .env.example .envIf you plan to deploy backend Cloud Firestore security rules using the Firebase CLI, also copy the example Firebase configuration from the root directory:
cd ..
cp .firebaserc.example .firebaserc
cd frontendEdit frontend/.env:
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_firebase_project_id
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
# Cloudflare R2 Storage Domain
VITE_R2_PUBLIC_DOMAIN=https://your-public-r2-domain.r2.dev
# Optional: Initial Admin Code (Remove after creating your first admin account)
VITE_ADMIN_SECRET=your_secret_admin_code
# Optional: White-Label Branding Overrides
# VITE_BRAND_NAME="Your Songwriting Club"
# VITE_BRAND_SHORT_NAME="CLUB"
# VITE_BRAND_LOGO_URL="/yourlogo.png"
# VITE_BRAND_SUPPORT_EMAIL="support@yourdomain.com"
# VITE_BRAND_TAGLINE="A collaborative music community and songwriting group."
# Server-Side Secrets (Vercel API Routes / Serverless Functions)
R2_ACCOUNT_ID=your_cloudflare_account_id
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_key
R2_BUCKET_NAME=your_r2_bucket_name
# Optional: GitHub API Integration for automated server-side bug reporting via /api/bug-report
GITHUB_TOKEN=your_github_personal_access_token
VITE_GITHUB_REPO_URL=https://github.com/yourusername/yourreponpm run devThe application will be available at http://localhost:5173.
Music Every Week is designed for zero-config deployment on Vercel with complete white-label customization support.
When deploying your clone/fork to production on Vercel, navigate to Project Settings β Environment Variables and add your required Firebase (VITE_FIREBASE_*), R2 (R2_*, VITE_R2_*), and optional GitHub credentials from your local .env file.
MEW2 includes a built-in serverless function (/api/bug-report) that allows users to file bug reports directly as GitHub issues without needing a GitHub account.
To enable automatic server-side issue filing in your deployment:
- Generate a GitHub Personal Access Token (PAT) with
issues:writeaccess to your target repository. - Add the following to your Vercel Environment Variables:
GITHUB_TOKEN: Your GitHub PAT.VITE_GITHUB_REPO_URL: Your repository URL (e.g.,https://github.com/yourusername/yourrepo). Note: IfGITHUB_TOKENis not configured, the frontend gracefully degrades to opening a pre-filled GitHub issue in the user's browser usingVITE_GITHUB_REPO_URL.
To customize the application name, logo, or support email for your own songwriting community without altering open-source code in Git, set any of the following optional override variables in your Vercel Environment Variables:
| Variable Name | Description | Example Value |
|---|---|---|
VITE_BRAND_NAME |
Full name of your platform | "Songwriters League" |
VITE_BRAND_SHORT_NAME |
3β4 letter acronym or short name | "LEAGUE" |
VITE_BRAND_LOGO_URL |
URL or public asset path for logo | "/customlogo.png" |
VITE_BRAND_SUPPORT_EMAIL |
Email displayed on help/privacy links | "support@songwritersleague.com" |
VITE_BRAND_TAGLINE |
Homepage hero description | "A weekly collaborative music community." |
If you prefer command-line workflows, you can use the Vercel CLI to pipe variables directly from your local terminal to Vercel:
printf "support@yourdomain.com" | npx vercel env add VITE_BRAND_SUPPORT_EMAIL productionThis project is optimized for automated AI coding assistants (such as Claude, Cursor, and Gemini) and enforces Test-Driven Development (TDD) (vitest + @testing-library/react). All developers and AI agents must write or update tests before or alongside code implementation, verifying clean execution with npm test inside frontend/.
For full architectural constraints, testing rules, and commands, consult:
- CLAUDE.md: Quick-start commands, TDD workflow rules, architectural invariants, and command cheat sheet for AI assistants.
- .agents/AGENTS.md: Comprehensive project context, domain terminology mappings, data schema rules, and testing guidelines.
βββ docs/
β βββ proposals/ # Active feature specifications and roadmap proposals
βββ frontend/
β βββ api/ # Vercel serverless endpoints (e.g., R2 upload URL signing)
β βββ public/ # Static assets and manifest
β βββ src/
β βββ components/ # Reusable UI components and modal dialogs
β βββ config/ # Application and brand theme configuration
β βββ contexts/ # React contexts (Auth, Player, Toast)
β βββ hooks/ # Custom React hooks (real-time sync, audio analysis)
β βββ lib/ # Core integrations (Firebase, R2 uploaders, audio workers)
β βββ pages/ # Main application route views
β βββ types.ts # Global TypeScript interfaces and data model definitions
βββ firestore.rules # Security rules for Cloud Firestore
βββ vercel.json # Deployment configuration for Vercel
We welcome contributions from the songwriting and developer community!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.