Skip to content

About

Interactive Russian & Cyrillic learning PWA (basicrussian.org) with neural TTS audio, an on-screen keyboard, live Latin-to-Cyrillic transliteration, adaptive quizzes, and cloud sync.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

106 Commits

Folders and files

Repository files navigation

πŸ‡·πŸ‡Ί Basic Russian

An interactive, responsive Russian language learning application featuring Microsoft Neural TTS pronunciation audio, an integrated Cyrillic keyboard with live phonetic transliteration, adaptive quizzes, cloud progress sync, and Progressive Web App (PWA) support.

Live Demo React TypeScript Node.js Vite Vitest Supabase PWA Netlify License: MIT


🌟 Overview

Basic Russian (basicrussian.org) is built for English speakers to rapidly learn the Cyrillic alphabet, numbers, telling time, high-frequency Russian vocabulary, and survival phrases.

Designed with modern web performance and security in mind, it provides instant neural audio feedback, live Latin-to-Cyrillic phonetic typing, an adaptive quiz engine with spaced-repetition mastery, optional OAuth cloud sync, and offline PWA learning capabilities.


πŸš€ Key Features

  • πŸ”Š Microsoft Neural TTS Pronunciation: Crystal-clear audio playback (ru-RU-SvetlanaNeural) across all 33 Cyrillic letters, pronunciation examples, numbers, time expressions, common words, and survival phrasesβ€”with automatic browser Web Speech API fallback.
  • πŸ“š Structured Beginner Curriculum:
    • Cyrillic Alphabet (/alphabet): All 33 Russian letters with pronunciation guides, transliteration, and audio examples.
    • Basic Phrases (/phrases): Essential greetings, etiquette, travel expressions, and conversational survival phrases.
    • Numbers & Telling Time (/numbers & /time): Interactive Russian numbers (0–1000+) and practical clock/time expressions.
    • Common Words (/words): Expanded everyday vocabulary covering family, days of the week, question words, food, and daily life with flashcard reveal modes.
  • ⌨️ Integrated Cyrillic Keyboard & Live Transliteration: Type Russian directly without a physical Russian keyboard using either the on-screen Cyrillic keyboard or live phonetic Latin-to-Cyrillic transliteration.
  • 🎯 Adaptive Quiz Engine (/quiz):
    • Topic category filtering, Russian-to-English and English-to-Russian modes, and Levenshtein-distance fuzzy matching to forgive minor typos and soft/hard sign nuances.
    • Spaced-repetition mastery tracking (levels 0–3), audio reinforcement, and end-of-session score recaps.
  • ☁️ Guest-First Progress & OAuth Cloud Sync:
    • 100% Playable Without Login: Guest quiz history and weak words are saved locally in localStorage and viewable in the My Stats modal.
    • 1-Click Single Sign-On: Optional login via Google, Microsoft Entra ID, or GitHub (powered by Supabase Auth OAuth 2.0 / OIDC) seamlessly migrates guest progress to PostgreSQL and syncs across devices.
  • πŸ“± Progressive Web App (PWA): Installable on iOS, Android, and Desktop via vite-plugin-pwa + Workbox (NetworkFirst HTML navigation + StaleWhileRevalidate audio caching) with automatic iOS WebKit update checks.

πŸ”’ Security Architecture

  • Strict Content Security Policy (CSP): Enforces script-src 'self' (no 'unsafe-inline' or 'unsafe-eval'), object-src 'none', base-uri 'self', frame-ancestors 'none', worker-src 'self', and upgrade-insecure-requests.
  • OWASP HTTP Headers: Configured in netlify.toml with HSTS (max-age=31536000; includeSubDomains; preload), X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Cross-Origin-Opener-Policy: same-origin-allow-popups, Referrer-Policy: strict-origin-when-cross-origin, and restrictive Permissions-Policy.
  • Database Row Level Security (RLS) & Constraints: PostgreSQL tables (public.quiz_sessions, public.word_progress) revoke anon access, enforce auth.uid() = user_id RLS policies across all SELECT/INSERT/UPDATE/DELETE operations, and validate score/mastery bounds via SQL CHECK constraints (see docs/schema.sql).
  • Zero Password Handling & Safe Client Storage: Passwordless federated OAuth 2.0 / OIDC sign-in, strict https: validation on Supabase endpoints and OAuth avatar URLs (referrerPolicy="no-referrer"), Cyrillic-only audio safety guards, and prototype-pollution-safe localStorage parsing.

Detailed system architecture and database design are documented in docs/BACKEND_PLAN.md.


πŸ€– Built with Google Antigravity & Gemini

This project is actively developed and architected using Google Antigravity paired with Google Gemini / Advanced Agentic AI.

  • Agentic Pair Programming: Used Antigravity's autonomous multi-step workflows to modernize the app to React 19 & Vite 6, harden security headers and RLS schemas, configure Vitest suites, and manage continuous deployment.
  • Modern Developer Velocity: Demonstrates AI-accelerated full-stack engineering while maintaining strict TypeScript type safety, test coverage, and security standards.

πŸ› οΈ Tech Stack

  • Frontend: React 19, TypeScript 5.9, Modern CSS (CSS Variables, Flexbox, CSS Grid)
  • Build Tool & PWA: Vite 6, @vitejs/plugin-react, vite-plugin-pwa v2 (Workbox)
  • Auth & Cloud Database: Supabase Auth (Google, Microsoft Entra ID, GitHub OAuth) + Supabase PostgreSQL with Row Level Security
  • Testing: Vitest 5, React Testing Library 16, JSDOM
  • Audio & Assets: Pre-rendered Microsoft Neural TTS (ru-RU-SvetlanaNeural) MP3s + Native Web Speech API fallback
  • Deployment & Hosting: Netlify (Automated CI/CD from master, OWASP security headers, SSL, service worker anti-stale caching rules)

πŸ’» Local Development

Prerequisites

  • Node.js: v22.x LTS or later
  • npm: v10.x or later

Setup & Running

# 1. Clone the repository
git clone https://github.com/JohnBendfeldt/basic-russian.git
cd basic-russian

# 2. Install dependencies
npm install

# 3. (Optional) Configure Supabase for OAuth & Cloud Sync
# Without .env.local, the app runs seamlessly in offline Guest Mode.
cp .env.example .env.local

# 4. Start development server (runs on http://localhost:5173 with Vite HMR)
npm run dev   # or: npm start

# 5. Run automated test suite
npm test

# 6. Production typecheck, build & preview
npm run build
npm run preview

Regenerating Curriculum Audio (Optional)

# Requires Python 3 and edge-tts
npm run generate-audio         # Generate missing audio files
npm run generate-audio:force   # Force-regenerate all curriculum audio
npm run generate-audio:time    # Regenerate telling-time audio only

🌐 Deployment Configuration

The application is configured for deployment on Netlify via netlify.toml:

  • Build command: npm run build (tsc && vite build)
  • Publish directory: dist
  • Environment variables (for cloud sync): VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
  • Primary Custom Domain: basicrussian.org

🀝 Contributing & Security

  • Contributing: Native-speaker Russian translation fixes, Cyrillic keyboard/transliteration improvements, accessibility fixes, and bug fixes with tests are welcome β€” please read CONTRIBUTING.md before opening a pull request.
  • Security: Please report suspected vulnerabilities privately rather than opening a public issue; see SECURITY.md for disclosure instructions.

πŸ‘€ Author

John Bendfeldt


πŸ“„ License

This project's source code is licensed under the MIT License - see the LICENSE file for details.

Branding Note: While the source code is open source under MIT, the Basic Russian / Basic Language School names, domain branding (basicrussian.org), and custom academic emblems are reserved for the official platform.

About

Interactive Russian & Cyrillic learning PWA (basicrussian.org) with neural TTS audio, an on-screen keyboard, live Latin-to-Cyrillic transliteration, adaptive quizzes, and cloud sync.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages