A backend-first Japanese learning platform built to demonstrate domain modeling, transactional business logic, and scalable Rails architecture.
https://komorebi-hnr8.onrender.com
Hosted on Render free tier — may take ~30s to wake up after inactivity.
Komorebi is a portfolio project focused on building a solid backend foundation for a Japanese learning system. It uses a Spaced Repetition System (SRS) inspired by the SM-2 algorithm to support long-term retention across Kanji, Vocabulary, and Grammar modules.
The project emphasizes backend engineering excellence: domain boundaries, persistence design, transactional workflows, and testability. It also features a clean, responsive UI with support for both light and dark themes.
This project explores how strong backend decisions improve the quality of an educational product.
- Domain Modeling: Isolated domain logic away from framework concerns.
- Transactional Integrity: Use of database constraints and transactions to ensure data consistency during review grading.
- Scalable Design: Polymorphic structures (e.g.,
ReviewCard) to support future learning modules without refactoring. - Test-Driven Development: High coverage for critical business paths using RSpec.
The system implements a custom SM-2 logic:
- Grading: Learner assigns a quality score (0-5).
- Calculation:
Srs::Sm2Calculatorcomputes interval, ease factor, and schedule. - Persistence:
Cards::Gradeservice orchestrates the atomicity of the state update andReviewLogcreation.
- Kana: The basic Japanese syllabary, serving as the ideal starting point for the Japanese learning journey.
- Kanji: JLPT-oriented (N5 to N1), supporting On/Kun readings and structured progression.
- Vocabulary: JLPT-oriented (N5 to N1), featuring Kanji and Kana forms, translations, and example sentences in both Japanese and Portuguese.
- Grammar: JLPT-oriented (N5 to N1), featuring grammar points with example sentences, filterable by level.
- Language: Ruby
- Framework: Ruby on Rails
- Database: PostgreSQL
- Frontend: Hotwire (Turbo / Stimulus) + Tailwind CSS
- Testing: RSpec, Capybara, FactoryBot
- Ruby 4+
- PostgreSQL
git clone git@github.com:FragozoLeonardo/komorebi
cd komorebi
bundle install
bin/setup