Skip to content

FragozoLeonardo/komorebi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Komorebi (木漏れ日)

A backend-first Japanese learning platform built to demonstrate domain modeling, transactional business logic, and scalable Rails architecture.

Ruby Rails PostgreSQL


🌐 Live Demo

https://komorebi-hnr8.onrender.com

Hosted on Render free tier — may take ~30s to wake up after inactivity.


🎯 About

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.


🏗️ Engineering & Architecture

This project explores how strong backend decisions improve the quality of an educational product.

Key Architectural Pillars

  • 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.

SRS Implementation

The system implements a custom SM-2 logic:

  1. Grading: Learner assigns a quality score (0-5).
  2. Calculation: Srs::Sm2Calculator computes interval, ease factor, and schedule.
  3. Persistence: Cards::Grade service orchestrates the atomicity of the state update and ReviewLog creation.

📚 Learning Domains

  • 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.

🛠️ Tech Stack

  • Language: Ruby
  • Framework: Ruby on Rails
  • Database: PostgreSQL
  • Frontend: Hotwire (Turbo / Stimulus) + Tailwind CSS
  • Testing: RSpec, Capybara, FactoryBot

🚀 Getting Started

Prerequisites

  • Ruby 4+
  • PostgreSQL

Installation

git clone git@github.com:FragozoLeonardo/komorebi
cd komorebi
bundle install
bin/setup

About

Rails 8 and Hotwire Built Japanese Learning Platform

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors