This is a dependency-free, static web app (plus optional PWA offline support) that turns the 5‑week conversational/business plan into a gameified practice engine.
node scripts/dev-server.mjsThen open:
http://localhost:5173
If your environment blocks opening local ports, use any other static server (or deploy to a host like Vercel).
This is a static site. Deploy the folder to any static host.
For AI Coach (server-side API key), use a host with serverless functions (Vercel recommended).
The AI coach calls a serverless endpoint at api/coach.js so your API key stays on the server.
On your host (e.g. Vercel), set env vars:
COACH_PROVIDER=nvidiaNVIDIA_API_KEY=...- (optional)
NVIDIA_BASE_URL(default:https://integrate.api.nvidia.com/v1) - (optional)
NVIDIA_MODEL(default:moonshotai/kimi-k2.5)
Notes:
- The proxy retries once with the alternate model id (
k2.5⇄k2-5) if NVIDIA rejects the model string.
On your host (e.g. Vercel), set env vars:
COACH_PROVIDER=moonshotMOONSHOT_API_KEY=...- (optional)
MOONSHOT_BASE_URL(default:https://api.moonshot.ai/v1) - (optional)
MOONSHOT_MODEL(default:kimi-k2.5)
If you have a 3rd-party “Kimi K2.5” API that is OpenAI-compatible (chat completions), set:
COACH_PROVIDER=compatibleCOACH_BASE_URL=...(example:https://example.com/v1)COACH_API_KEY=...COACH_MODEL=...- (optional)
COACH_AUTH_HEADER(default:Authorization) - (optional)
COACH_AUTH_PREFIX(default:Bearer; set empty if your provider uses a raw key header)
On your host (e.g. Vercel), set env vars:
COACH_PROVIDER=openai(or omit)OPENAI_API_KEY=...- (optional)
OPENAI_MODEL(default:gpt-4o-mini)
Then in the app: Settings → AI Coach → Enable.
To prevent other websites from using your /api/coach endpoint, set:
COACH_ALLOWED_ORIGINS=https://your-domain.com,https://your-app.vercel.app
The app supports email+password login and syncs your full progress state to Supabase (per user).
- Create a Supabase project
- Run the SQL in
supabase/schema.sql - (Optional, recommended) On your host, set env vars so every device auto-loads these:
TRILINGO_SUPABASE_URL=...(orSUPABASE_URL)TRILINGO_SUPABASE_ANON_KEY=...(orSUPABASE_ANON_KEY)
- In the app: Settings → Cloud login + sync (Supabase):
- if you didn’t set env vars, paste Supabase URL + anon key
- Sign up / sign in
- Toggle Sync on
- Voice features use the browser’s built-in APIs:
- Text-to-speech:
speechSynthesis - Speech recognition (when supported):
webkitSpeechRecognition
- Text-to-speech:
- Progress is stored in
localStorage. Use Settings → Export/Import to move progress between devices. - Built-in modes:
- Today: daily session generator (includes weak-item fix pack)
- Tutor: asks simple questions; rewrites your reply naturally
- Roleplay: business negotiation + travel
- Grammar: reusable patterns + quick drills
- Test: weekly speaking test that flags weak items