Lexiverse
Lexiverse - AI contextual reading engine for English learners. Your next article is your next review.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Carmen Sandiego-style Spanish 1 detective browser game built with Next.js + Supabase
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A Carmen Sandiego-style browser detective game for Spanish 1 students built on Next.js 14 App Router, Supabase, and Tailwind CSS. Students travel through six Spanish-speaking countries solving cases while practicing vocabulary and grammar from Que Chevere Level 1.
| Layer | Tech |
|---|---|
| Framework | Next.js 14 (App Router, TypeScript) |
| Styling | Tailwind CSS |
| Database & Auth | Supabase (Postgres + Row Level Security) |
| Deployment | Vercel |
git clone <your-repo-url>
cd la-liga-sombra
npm install
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYcp .env.local.example .env.local
# Edit .env.local and paste your Supabase values
Option A — Supabase SQL Editor (easiest for first-time setup):
supabase/migrations/001_initial.sql and click Run.Option B — Supabase CLI:
npm install -g supabase
supabase login
supabase link --project-ref <your-project-ref>
supabase db push
npm run dev
Open http://localhost:3000. You should see the La Liga Sombra landing page.
la-liga-sombra/
├── app/
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Landing page (/)
│ ├── login/page.tsx # Student login (/login)
│ ├── game/page.tsx # Game viewport (/game) [stub]
│ └── dashboard/page.tsx # Teacher dashboard (/dashboard) [stub]
├── components/
│ ├── HeroBackground.tsx # Animated noir background
│ └── CaseBadge.tsx # Country case badge
├── content/
│ └── units.json # Unit/country data — add vocab and dialogues here
├── lib/
│ ├── supabase/
│ │ ├── client.ts # Browser-side Supabase client
│ │ └── server.ts # Server-side Supabase client (Server Components)
│ └── types/
│ └── database.ts # TypeScript types matching the DB schema
├── public/
│ └── videos/ # Placeholder for Higgsfield cutscene videos
└── supabase/
└── migrations/
└── 001_initial.sql # Full DB schema with enums, tables, and RLS policies
| Table | Purpose |
|---|---|
students | Student profiles — display name + class code, no email required |
units | One row per Que Chevere chapter / country (seeded with 6 units) |
attempts | Every mini-game submission with score and time spent |
mastery | Per-student, per-vocab-term spaced-repetition counters |
badges | Achievements earned by students |
unit_progress | Per-student unit state: locked → available → in_progress → completed |
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYmain auto-deploys.npm i -g vercel
vercel
vercel env add NEXT_PUBLIC_SUPABASE_URL
vercel env add NEXT_PUBLIC_SUPABASE_ANON_KEY
vercel --prod
Open the author helper — go to /teacher/author (login required). The form-based UI walks you through every field with live previews.
Or start from the template — copy content/_template.json, rename it to unit-02.json, and fill in every field. The _comment fields explain each section.
Validate locally before committing:
npm run validate
This checks every content/*.json file against the Zod schema and prints clear error messages.
Commit the file — the prebuild hook runs validation automatically before Vercel builds.
| Step | What to write | Notes |
|---|---|---|
| Case narrative | caseTitle, caseDescription, criminalName | Keep it dramatic — students are detectives! |
| Vocab (12+ pairs) | vocab[] | From the Que Chevere unit — include audio filenames if you have recordings |
| Cutscene | stages[0] briefing lines | Drop unit-0N-intro.mp4 + .vtt in /public/videos/ |
| VocabMatch | stages[1].pairs | 6-8 pairs is the sweet spot |
| Witness dialogue | stages[2].nodes | 3-4 nodes: greeting → get clue → thank them. Each wrong option needs feedback. |
| Reading passage | stages[3].passage | 50-150 words in Spanish — a note or letter left by the thief works well |
| Listening audio | stages[4].audioUrl | Drop .mp3 in /public/audio/unit-0N/. Use Google TTS, ElevenLabs, or record yourself. |
| Lineup suspects | stages[5].suspects | 4 suspects — one correct. Descriptions should be 2-3 Spanish sentences each. |
/public/videos/unit-0N-intro.mp4/public/videos/unit-0N-intro.vtt{ "type": "cutscene", "videoUrl": "/videos/unit-02-intro.mp4", "subtitleUrl": "/videos/unit-02-intro.vtt", ... }
VTT subtitle format:
WEBVTT
00:00:00.500 --> 00:00:03.500
¡Bienvenido a La Liga Sombra, agente!
00:00:04.000 --> 00:00:07.000
Tenemos una situación urgente en México.
Drop .mp3 files in /public/audio/unit-0N/ and reference them in vocab:
{ "spanish": "hola", "english": "hello", "audio": "/audio/unit-02/hola.mp3" }
Audio files are pre-generated locally with ElevenLabs and committed to public/audio/. The generator is a CLI tool in scripts/generate-audio/ — it never runs on Vercel.
.env.local as ELEVENLABS_API_KEY..env.local:
ELEVENLABS_VOICE_FEMALE_1=abc123...
ELEVENLABS_VOICE_MALE_1=def456...
ELEVENLABS_VOICE_FEMALE_2=ghi789...
ELEVENLABS_VOICE_MALE_2=jkl012...
npm run audio:generate -- --dry-run
Shows every file that would be generated, its voice assignment, character count, and total free-tier impact — without making any API calls.
npm run audio:generate -- --unit 1
The CLI shows an estimated character count and prompts for confirmation before spending any credits.
npm run audio:generate -- --all
--dry-run to verify the character budget--unit N to generate and listen to one unit at a timevoiceSettings in scripts/generate-audio/index.ts (stability, similarityBoost, style, speed) and regenerate just that unitpublic/audio/<break time="Xs"/> SSML pause tags are accepted by the API and do not count toward quotafluent-ffmpeg:
npm install -D fluent-ffmpeg @types/fluent-ffmpeg
# also requires the ffmpeg binary: https://ffmpeg.org/download.html
Without it, lines are raw-concatenated (usually fine for short clips).The schema is defined in lib/content-schema.ts (Zod). Run npm run validate at any time. The build will fail if any unit file is invalid.
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSESSION_SECRET (32+ random characters)TEACHER_PASSWORD (your teacher login password)main auto-deploys.npm i -g vercel
vercel
vercel env add NEXT_PUBLIC_SUPABASE_URL
vercel env add NEXT_PUBLIC_SUPABASE_ANON_KEY
vercel env add SESSION_SECRET
vercel env add TEACHER_PASSWORD
vercel --prod
npm run audio:generate)