# Next.js starter: record in the browser, score on your server ```sh cp env.example .env.local # paste a key from https://api.toneperfect.app/dashboard npm install && npm run dev # open http://localhost:3000 ``` - `app/api/assess/route.js` forwards the recording to `POST /v1/assess` with your key and `TonePerfect-Response: compact`. The browser never sees the key. - `app/page.js` records with `MediaRecorder` and shows each syllable's score and the tone that was expected and heard. Before deploying, protect `/api/assess` with your own sign-in or a rate limit. Deployed on Vercel or Netlify, keep recordings short: those platforms end function requests after 10–26 seconds, and a typical assessment takes 1–2 seconds.