Language Loops
Overview
Language Loops is an application for practicing languages in short, repeating cycles. Instead of working through a long lesson, users focus on one phrase at a time, revisit it in different contexts, and gradually reinforce vocabulary and pronunciation.
The project is being developed as a web platform with separate services for the user interface, API, and AI features. Current architecture work focuses on moving from the previous Firebase stack to PostgreSQL, Keycloak, and containerized services.
Product Features
The product includes:
- Explore mode for practicing ready-made language loops
- Hunt mode for personalized collections
- Practice focused on one phrase at a time
- AI generation and analysis of learning content with Gemini
- Phrase pronunciation through speech synthesis
- Progress, streak, and achievement tracking
- Support for English, Spanish, Italian, French, German, Portuguese, Armenian, and Russian
- A language-practice blog delivered through Mailoo
Some personalized features depend on registration. Keycloak integration and learning-data retrieval from the new API are still in progress in the current web interface, so the guest flow and static adapters remain separate from the target architecture.
Architecture
The target Language Loops architecture includes:
- A Next.js web application
- A Hono HTTP API
- A separate AI service for Gemini
- PostgreSQL as the primary database
- Keycloak for authentication
- Shared packages for types, constants, and configuration
- Mailoo as the headless CMS for the blog
- A payment service supporting multiple providers
The previous implementation used Firebase Authentication, Firestore, Google Cloud Functions, and Pub/Sub. This stack is marked as deprecated in the repository. The new API currently provides a basic scaffold and a health endpoint, so the migration of data and product flows is being completed in stages rather than presented as finished.
Infrastructure & SRE
The project has:
- GitLab CI for checks, tests, dependency audits, and builds
- Container builds with Kaniko
- Separate Docker images for the web application, API, and AI service
- SonarQube code-quality checks
- Renovate for dependency updates
- A local PostgreSQL and Keycloak environment powered by Testcontainers
- GitOps configuration for the target production environment
- Server-side storage of Mailoo, Gemini, and payment-provider keys
Redis has deliberately not been added to the new stack until a use case genuinely requires a queue. This keeps the architecture simpler during the migration and avoids introducing an infrastructure dependency prematurely.
Engineering Challenges
The primary engineering challenge in Language Loops is replacing components tightly coupled to Firebase and GCP with a portable service architecture without bringing product development to a halt.
This work includes:
- Moving from Firebase Authentication to Keycloak
- Migrating data from Firestore to PostgreSQL
- Replacing a set of Cloud Functions with containerized API and AI services
- Separating current documentation from deprecated material
- Connecting product flows to the new API instead of temporary adapters
- Securing keys for AI and payment integrations
- Preserving language loops, speech synthesis, and personalization while changing platforms
The project demonstrates both product development and incremental architecture modernization, with unfinished components clearly distinguished from functionality that already works.