A full-stack application for generating classical 4-part harmonies from MusicXML melodies. Built with React + Vite frontend and Express.js backend with sophisticated music theory algorithms.
git clone https://github.com/spatel54/chamber-music-fullstack.git
cd chamber-music-fullstack
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
npm install
Two terminals required:
Terminal 1 - Backend (runs on port 3001):
cd backend
npm run dev
Terminal 2 - Frontend (runs on port 5174):
cd frontend
npm run dev
# Or from root: npm run dev
Then open http://localhost:5174 in your browser.
Frontend:
cd frontend
npm run build
# Output: frontend/dist/
Backend:
cd backend
npm start
# No build step required (pure Node.js)
Full-stack deployment with serverless functions:
See VERCEL_DEPLOYMENT.md for complete instructions.
Quick Deploy:
vercel.json configuration)Production URL: https://harmonyforge-fullstack.vercel.app/
chamber-music-fullstack/
βββ frontend/ # React + Vite frontend
β βββ src/
β β βββ components/ # React components
β β β βββ InstrumentSelectionScreen.tsx
β β β βββ ResultsScreen.tsx
β β β βββ ui/ # shadcn/ui components
β β βββ services/
β β β βββ api.ts # Backend API integration
β β βββ assets/ # Images and static files
β βββ .env.local # API URL configuration
β βββ package.json
β
βββ backend/ # Express.js backend
β βββ src/
β β βββ server.js # Express server
β β βββ routes/
β β β βββ harmonize.js # API routes
β β βββ adapters/
β β βββ nextjs-adapter.js # 1,781-line harmonization engine
β βββ package.json
β
βββ backend-export/ # Reference implementation
β βββ harmonize.ts # Original TypeScript logic
β βββ README.md
β βββ QUICKSTART.md
β
βββ .claude/ # Claude Code agent system
β βββ agents/
β βββ backend-agent.md # Backend development guide
β βββ frontend-agent.md # Frontend development guide
β βββ integration-agent.md # Integration specialist
β βββ testing-agent.md # Testing guide
β βββ debugging-agent.md # Troubleshooting guide
β βββ README.md # Agent system overview
β
βββ CLAUDE.md # Claude Code documentation
βββ INTEGRATION.md # Integration guide
βββ README.md # This file
# Start backend
cd backend
npm run dev
# Test with curl
curl -X POST http://localhost:3001/api/harmonize \
-F "file=@test-melody.musicxml" \
-F "instruments=Violin,Viola,Cello"
curl http://localhost:3001/health
See .claude/agents/testing-agent.md for comprehensive testing guide.
# Backend tests
cd backend
node tests/run-all-tests.js
# Frontend tests
cd frontend
npm test
See .claude/agents/debugging-agent.md for troubleshooting guide.
Port already in use:
lsof -ti:3001 | xargs kill -9
CORS errors:
Check backend/src/server.js CORS configuration includes your frontend URL.
Environment variables not loading:
Restart dev server after changing .env.local
This project uses a specialized agent system for development. See .claude/agents/README.md for details on:
MIT