Skip to content

๐Ÿ“š LexiCard โ€” Flashcards to master languages, one word at a time! ๐ŸŒโœจ With audio cues, progress tracking, and OOP/SOLID design for effective learning.

License

Notifications You must be signed in to change notification settings

KumudithaSilva/lexicards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

182 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š LexiCard: An Intelligent Vocabulary Learning System

LexiCard is a lightweight modular, extensible vocabulary learning application designed to enhance active recall, retention, and habit-based learning. The system follows solid software engineering principles (SOLID, Clean Architecture) and is built with scalability, testability, and maintainability as first-class concerns. This project serves both as a practical learning tool and a reference implementation for academic and professional software design practices.

Vocabulary acquisition is a critical component of language proficiency, yet traditional memorization techniques lack adaptability and feedback mechanisms. LexiCard addresses this gap by providing an interactive, logic-driven vocabulary learning system that separates concerns between data handling, business logic, and presentation.


๐ŸŽ“ Purpose

  • ๐Ÿง  Improve vocabulary retention through active recall
  • ๐Ÿ“– Separate word exposure from meaning reveal
  • ๐Ÿงช Ensure testability through isolated components
  • ๐Ÿ”ฎ Enable future extensions without modifying core logic
  • ๐Ÿ› ๏ธ Apply SOLID principles and Clean Architecture

๐Ÿงฉ Design Principles & Patterns

1๏ธโƒฃSingle Responsibility Principle (SRP)

  • A class should have one, and only one, reason to change.

Each class in the system has a single, clearly defined responsibility:

Component Responsibility
WordManager Vocabulary logic (selection, known/unknown tracking)
LexicalController Application flow & coordination
UiManager UI state updates only
UI Builders UI construction only
Orchestrators Event wiring only
Data Retrievers Data loading only
Data Savers Persistence only
AudioService Audio playback only

2๏ธโƒฃ Open/Closed Principle (OCP)

  • Software entities should be open for extension, but closed for modification.

Example in LexiCard:

  • To add a new data source (e.g., Database or API), implement a new DataRetriever without changing existing components.

3๏ธโƒฃ Liskov Substitution Principle (LSP)

  • Objects of a superclass should be replaceable with objects of a subclass without altering correctness.

Example in LexiCard:

  • Any class implementing IDataRetriever (e.g., CSVDataRetriever, JsonDataRetriever, DatabaseDataRetriever) can be used interchangeably without breaking the system, as long as the interface contract is honored.

4๏ธโƒฃ Interface Segregation Principle (ISP)

  • Clients should not be forced to depend on interfaces they do not use.

Example in LexiCard:

  • Instead of a single large data interface, LexiCard defines small, purpose-specific abstractions.
  • A read-only retriever does not need to implement save or delete behavior.
Interface Purpose
DataRetriever Load vocabulary
DataSaver Persist updates
DataRemover Remove learned words

5๏ธโƒฃ Dependency Inversion Principle (DIP)

  • High-level modules should not depend on low-level modules. Both should depend on abstractions.

Example in LexiCard:

  • High-level modules - LexicalController, WordManager

  • Low-level modules - CSV loaders, File writers

  • High-level modules depend on interfaces and factories

  • Concrete implementations are injected at runtime

    • All concrete dependencies are created in main.py
    • Controllers receive abstractions

โ˜‘๏ธ Design Pattern Usage in LexiCard

Pattern Example Classes Purpose
Singleton ResourceLoader Single instance for resource management.
Factory DataRetrieverFactory, DataSaverFactory, DataRemoverFactory Creates and controls the creation of data access objects (retriever, saver, remover) separately.
Builder + Director DesktopLexiUiBuilder, DesktopUiDirector Construct complex UI in steps, decoupled from controller.
Orchestrator UiOrchestrator Connects UI events to controller actions and decouples presentation from logic.

โœจ Key Features

  • ๐Ÿ“š Vocabulary Flashcards โ€” One word at a time, distraction-free
  • ๐Ÿ–ฅ๏ธ Platform-Aware UI Construction - Different operating systems handle different UI
  • โฑ๏ธ Timed Meaning Reveal โ€” Meaning appears after a controlled delay
  • ๐Ÿ” Next Word Navigation โ€” Independent of known/unknown state
  • ๐Ÿง  Learning State Tracking โ€” Known vs unknown words
  • ๐Ÿงฉ Extensible Architecture โ€” Add spaced repetition, analytics, or APIs

๐Ÿ“ธ LexiCard App Output (UI Preview)

image

๐Ÿ“Œ How It Works

  1. Application initializes required services
  2. A random word is selected
  3. User attempts recall
  4. โณ Meaning is revealed after a delay
  5. User marks the word as:
    • โœ… Known
    • โ“ Unknown
  6. System updates learning state and moves forward

๐Ÿ”ง Core Functionalities

โœ… WordManager

  • Acts as the central business logic unit.
  • Decides how vocabulary should be presented and updated during learning sessions.

โœ… LexicalController

  • Coordinates between WordManager, UIManager, and AudioService.
  • Decides what should happen when a user interacts with the app.

โœ… Orchestrator

  • Connects UI components with the controller actions.
  • Takes actual UI events (button clicks, key presses) and calls the correct LexicalController methods.

โœ… UI Manager

  • Acts as an adapter between controller and UI.
  • Decides how UI components reflect the current application state.

โœ… UI

  • Responsible only for rendering visual elements.
  • Decides how visual elements are presented to the user.

โœ… Data Access Layer

  • Handles all persistence-related operations.
  • Decides how learning progress is stored and updated.

โœ… AudioService

  • Provides audio-related functionality.
  • Decide when audio should be played based on instructions.

๐Ÿงช Testing Strategy

  • WordManager โ†’ business logic tests

  • LexicalController โ†’ coordination / integration tests

  • ๐Ÿงฉ Unit tests for WordManager to validate core business logic.

  • ๐Ÿ”— Unit tests for Controller focus on coordination between components.

  • ๐Ÿ”„ Mocked data retrievers, data saver and data remover

  • ๐Ÿ› Ensure UI-independent logic and event handling are fully tested.


๐Ÿ” CI/CD Pipeline

The CI pipeline includes:

  • Dependency installation
  • Static analysis & linting
  • Unit test execution
  • Security scanning
  • Python package build

Trigger Rules:

  • ๐Ÿ”€ All branches โ†’ validation & tests
  • ๐Ÿš€ Main branch โ†’ release-ready builds

๐Ÿ“ฆ Future Enhancements

  • ๐ŸŽจ Modern UI & Language Selection โ€” Allows users to choose which language they want to learn.

  • ๐Ÿ”” Custom Alerts โ€” Notify users about events such as data saving or errors.

  • ๐Ÿ‘ค User Profiles & Progress Tracking โ€” Track individual learning progress over time.

  • ๐Ÿ“ˆ Learning Analytics & Reports โ€” Provide insights into user performance and vocabulary mastery.


๐Ÿ”€ Git Flow Workflow

The project follows a Git Flowโ€“inspired workflow:

  • ๐ŸŒฟ master โ€” Stable, production-ready releases
  • ๐ŸŒฑ develop โ€” Active development
  • โœจ feature/* โ€” New features

๐Ÿ’ก Inspiration

LexiCard is inspired by active recall and spaced learning techniques widely used in cognitive science. The project also serves as a demonstration of how clean architecture and SOLID principles can be applied to educational software.

About

๐Ÿ“š LexiCard โ€” Flashcards to master languages, one word at a time! ๐ŸŒโœจ With audio cues, progress tracking, and OOP/SOLID design for effective learning.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages