Lexiverse
Lexiverse - AI contextual reading engine for English learners. Your next article is your next review.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Mobile-first vocabulary learning MVP built with Next.js App Router, TypeScript, Tailwind, Supabase-ready data boundaries, and a server-only Gemini route.
This project targets Node 18.17.x so it also works with the current local runtime. If PowerShell asks whether to run the Microsoft shell integration script, choose R (Run once) or A (Always), then enter the npm command at the normal PS> prompt.
npm install
npm run dev
Open http://localhost:3000. The app requires Supabase configuration and an authenticated user; it loads only the signed-in user's workspace data.
.env.example to .env.local and add the project URL and anon key.supabase/migrations/001_initial_schema.sql through supabase/migrations/009_retry_missed_daily_reminders.sql in numeric order in the Supabase SQL editor. If earlier migrations are already applied, run only the missing migrations.save_review database function.Create users in Supabase Auth with a password. Any user with an existing Supabase account can sign in; the app uses direct signInWithPassword and does not provide a register flow.
The Supabase browser/server helpers and CRUD mapping live in src/lib/supabase. With a configured project, the app redirects unauthenticated visitors to /auth, loads the selected workspace's folders, words, progress, and review logs, and persists new words, folders, ratings, and workspaces through RLS-protected queries.
Push reminders use standard Web Push with Supabase Cron and an Edge Function. A reminder is sent once per user's local day, only if their daily review goal is still unfinished. Supabase Free includes enough scheduled function calls for the once-a-minute timezone check at small scale, but its projects may pause after a week of inactivity.
Run supabase/migrations/007_daily_push_reminders.sql after migrations 001-006, then supabase/migrations/008_custom_daily_review_goal.sql and supabase/migrations/009_retry_missed_daily_reminders.sql, in the Supabase SQL editor.
Generate a VAPID key pair locally with node scripts/generate-vapid-keys.mjs. Copy VAPID_PUBLIC_KEY into .env.local and your Vercel environment variables. This public key is intentionally exposed to the browser by next.config.mjs; do not put the private key there. In Supabase Dashboard, open Edge Functions → Secrets and add VAPID_KEYS (the JSON value printed by the script), VAPID_CONTACT_EMAIL, and PUSH_CRON_SECRET. Never share or commit the private VAPID_KEYS value.
Install the Supabase CLI, then connect and deploy the function:
supabase login
supabase link --project-ref <your-project-ref>
supabase functions deploy send-daily-reminders
Generate a long random PUSH_CRON_SECRET locally, then store that same value in Supabase Vault as push_cron_secret. Also store the project URL as push_project_url and its publishable key as push_publishable_key:
select vault.create_secret('https://<project-ref>.supabase.co', 'push_project_url');
select vault.create_secret('<publishable-key>', 'push_publishable_key');
select vault.create_secret('<same-cron-secret>', 'push_cron_secret');
Schedule the dispatcher once in the Supabase SQL editor:
select cron.schedule(
'daily-push-reminders',
'* * * * *',
$$
select net.http_post(
url := (select decrypted_secret from vault.decrypted_secrets where name = 'push_project_url') || '/functions/v1/send-daily-reminders',
headers := jsonb_build_object(
'Content-Type', 'application/json',
'apikey', (select decrypted_secret from vault.decrypted_secrets where name = 'push_publishable_key'),
'x-cron-secret', (select decrypted_secret from vault.decrypted_secrets where name = 'push_cron_secret')
),
body := '{}'::jsonb
) as request_id;
$$
);
Restart the Next.js app after adding the public VAPID key. Sign in, open Settings → Daily push reminder, choose a time, and enable notifications. On iPhone or iPad, add the app to the Home Screen first; Web Push requires iOS/iPadOS 16.4 or later.
The Edge Function uses @negrel/webpush for the Web Push protocol. Its maintainers note that the cryptographic implementation has not had an independent expert audit, so reminder payloads deliberately contain no private vocabulary data.
Add GEMINI_API_KEY to .env.local. The key is only read in src/app/api/generate-sentence/route.ts; it is never exposed to the browser. The add-word modal shows generated text for editing before saving.
After changing .env or .env.local, stop and restart npm.cmd run dev; Next.js reads server environment variables at startup. Do not use a NEXT_PUBLIC_ prefix for the Gemini key.