Minimal README for local development and deployment notes.
- Node.js 18+ (Windows)
- npm
- Recommended: rotate any API keys you exposed
- Clone repo and install deps
cd C:\MagicMirrorReact
npm install- Create a
.envin the repo root (DO NOT commit). Example:
DAILY_API_KEY=your_daily_api_key_here
PORT=3001
VITE_ELEVENLABS_API_KEY=
VITE_GEMINI_API_KEY=
VITE_ELEVENLABS_AGENT_ID=If you previously published a key, rotate it immediately.
Open a terminal in VS Code (Ctrl+`).
Frontend (Vite)
npm run devBackend (Express / ts-node)
# install dev tools if missing (one-time)
npm install --save-dev ts-node typescript @types/node
# run server
npx ts-node server.ts
# or if you add a script:
# npm run start:serverRun both together (optional, will need changes)
# using concurrently (add to package.json first)
npm install --save-dev concurrently
npm run startThe built-in AI supports voice/text commands for quick interactions:
- Start a game: e.g. "start game" or "play game"
- Start a call: e.g. "start call" or "video call"
- Ask questions: general Q&A requests directed to the assistant
- Figma — UI/UX design and mockups
- ElevenLabs — text-to-speech (TTS) for voice output
- Google Gemini — LLM used for assistant responses
- Daily.co — video call rooms (backend creates rooms)
- React, Vite, Tailwind CSS — frontend stack
- Vercel: add a serverless function under
/api/create-room.tsthat usesprocess.env.DAILY_API_KEY. DefineDAILY_API_KEYin Vercel dashboard (Environment Variables). - Do not bundle
dotenvor server-only code into the client. Keep secrets on the server.
- Rotate any leaked API keys now.
- Add
.envto.gitignore. - Restrict CORS origins on the backend.
- Use HTTPS for public endpoints.
- Limit room lifetimes and permissions in the Daily room properties.
process is not definedin the browser: removedotenvor server-only code from client bundle; use server or build-time env vars.callFramenull: ensure component runs in browser, pass nullable ref touseCallFrame, and verify dynamic room URL is valid.- Check server logs and Vercel function logs for runtime errors.
- Add a Vercel serverless function and update frontend fetch to
/api/create-roomfor production. - Add
concurrentlyorts-node-devscripts for smoother local dev.