A modern Android application for managing personal notes, built with Jetpack Compose and following Clean Architecture principles.
NotesApp is designed to demonstrate a robust implementation of modern Android development tools and best practices. It features a reactive UI, a local persistent database, and a clear separation of concerns to ensure maintainability and testability.
- Full CRUD Operations: Create, Read, Update, and Delete notes seamlessly.
- Persistent Storage: Utilizes Room for a reliable local SQLite database.
- Advanced Sorting: Organize notes by Title, Date, or Color in both Ascending and Descending order.
- Undo Functionality: Accidental deletions can be reversed via an interactive Snackbar.
- Note Customization: Personalize notes with a variety of background colors.
- Modern UI: A responsive and fluid user interface built entirely with Jetpack Compose.
- Type-safe Navigation: Robust navigation between screens using the Compose Navigation component.
- Language: Kotlin
- UI Framework: Jetpack Compose
- Dependency Injection: Dagger Hilt
- Local Database: Room
- Asynchronous Programming: Kotlin Coroutines & Flow
- Navigation: Jetpack Compose Navigation
- Annotation Processing: KSP (Kotlin Symbol Processing)
- Dependency Management: Gradle Version Catalog (
libs.versions.toml) - Architecture: Clean Architecture with MVI/UDF (Unidirectional Data Flow)
The project is structured into three distinct layers to ensure a high degree of modularity and testability:
The core of the application containing business logic. It is completely independent of other layers and frameworks.
- Models: Pure Kotlin data classes (e.g.,
Note). - Repositories: Interfaces defining data operations.
- Use Cases: Encapsulated business logic for specific actions (e.g.,
GetNotes,AddNote,DeleteNote).
Handles data persistence and retrieval.
- Room Database: Manages the SQLite database and migrations.
- DAOs: Data Access Objects defining database queries.
- Entities: Room-specific data models.
- Repository Implementation: Concrete implementations of the domain repository interfaces.
- Mappers: Functions to convert between Data Entities and Domain Models.
Handles the UI and user interaction using a unidirectional data flow.
- ViewModels: Manage UI state using
Stateand handle userEvents. - State/Events: Sealed classes defining the UI state and all possible user interactions.
- Components: Modular and reusable Compose UI elements (e.g.,
NoteItem,OrderSection).
com.bober.notesapp
├── data
│ ├── local (Room DB, DAOs, Entities)
│ └── repository (Repository Implementations)
├── di
│ └── AppModule (Hilt Modules)
├── domain
│ ├── model (Domain Data Classes)
│ ├── repository (Repository Interfaces)
│ ├── use_case (Business Logic / Interactors)
│ └── util (Sorting & Utility Logic)
└── presentation
├── add_edit_note (Add/Edit Screen & ViewModel)
├── notes (List Screen & ViewModel)
├── ui.theme (Compose Theme & Styling)
└── util (Navigation & UI Helpers)