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.
- ๐ง 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
- 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 |
- 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.
- 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.
- 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 |
- 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
- All concrete dependencies are created in
| 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. |
- ๐ 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
- Application initializes required services
- A random word is selected
- User attempts recall
- โณ Meaning is revealed after a delay
- User marks the word as:
- โ Known
- โ Unknown
- System updates learning state and moves forward
- Acts as the central business logic unit.
- Decides how vocabulary should be presented and updated during learning sessions.
- Coordinates between WordManager, UIManager, and AudioService.
- Decides what should happen when a user interacts with the app.
- Connects UI components with the controller actions.
- Takes actual UI events (button clicks, key presses) and calls the correct LexicalController methods.
- Acts as an adapter between controller and UI.
- Decides how UI components reflect the current application state.
- Responsible only for rendering visual elements.
- Decides how visual elements are presented to the user.
- Handles all persistence-related operations.
- Decides how learning progress is stored and updated.
- Provides audio-related functionality.
- Decide when audio should be played based on instructions.
-
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.
- Dependency installation
- Static analysis & linting
- Unit test execution
- Security scanning
- Python package build
Trigger Rules:
- ๐ All branches โ validation & tests
- ๐ Main branch โ release-ready builds
-
๐จ 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.
The project follows a Git Flowโinspired workflow:
- ๐ฟ master โ Stable, production-ready releases
- ๐ฑ develop โ Active development
- โจ feature/* โ New features
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.