JadeWords

JadeWords
CHINESE LEARNING

Mandarin,
in practice.

Study words. Write characters.
Learn through songs.

JadeWords vocabulary app screen
01 / Vocabulary
01 / Chinese-learning app

Chinese learning, from HSK vocabulary to Vocab Songs.

ExpoReact NativeTypeScript

The build.

Resumable learning state, local stroke validation and server-side generation across a typed mobile client and Supabase.

Resume a vocabulary session

Load the active draft, fetch vocabulary by its stored IDs, then restore order, index and answer sets. Changes persist as JSONB. A partial unique index limits active drafts per user, module, content and mode.

LearningSessionScreen.tsx · learningSessionAPI.ts

Validate strokes on the device

Stroke paths and medians come from Supabase through a per-character Promise cache. Gestures normalize to a 1024-coordinate SVG space. Each stroke is resampled to 20 points and checked against endpoints, mean distance and length; accepted strokes advance, rejected strokes trigger hints and haptics.

WritingBoard.tsx · writingAPI.ts

Commit completion in PostgreSQL

Writing completion invokes record_writing_completion. The RPC locks existing progress, updates attempts and first-completion awards, then returns practice progress and progression in one database mutation.

writingProgressAPI.ts · record_writing_completion
  1. Context engineering on Vertex AI

    Gemini receives a bundled music-direction skill plus vocabulary, HSK level, learner intent and sound-preset context. The TypeScript runner exposes read_skill and read_style_profile, then unlocks submit_music_direction after the style is read. Validation checks exact word coverage and verse/chorus structure; feedback supports revision within five turns. Accepted direction augments the base Lyria prompt, with a base-plan fallback.

    music-agent/runner.ts · music-agent/skills.generated.ts · music-agent/google.ts
  2. Lyria through Gemini Interactions

    A Deno Edge Function calls Lyria through the Gemini Interactions REST API. One response supplies generated audio and lyric text; decoded audio goes into Supabase Storage. The Expo client advances generation stages through focused polling.

    ai-music-generate-audio/index.ts · _shared/ai-music.ts · AIMusicGeneratingScreen.tsx
  3. Model output into a learning interface

    A dedicated parser extracts Mandarin lines from Lyria’s output. pinyin-pro builds phrase-level pinyin with polyphone overrides; Cloud Translation v3 supplies meanings in the same line order. Signed Storage URLs feed expo-audio. New generation is untimed; line seeking remains conditional on valid timestamps.

    music-agent/lyria-lyrics.ts · _shared/ai-music.ts · AIMusicPlayerScreen.tsx
A silent, 15-second feature illustration of selecting Chinese words, choosing a sound preset, and following lyrics with pinyin and translation. Illustrated graphics explain line replay; this is not recorded app interaction or a playable song.
Resume

A little more
to come.

A resume has not been provided yet. This space will hold the real document when it is ready.

Resume unavailable