Only Notes is a modern Jetpack Compose Android app for creating and managing notes, completely offline. Designed with minimal UI and smooth performance, it follows MVVM + Clean Architecture and uses Room for local persistence.
- ➕ Add, 📝 Edit, and 🗑 Delete notes easily
- 🎨 Choose from multiple soft background colors
- 📱 Fully responsive grid layout with Compose
- 🧠 Offline-first using Room database
- ❗ Confirmation dialog before delete
- ✏️ Edit screen with pre-filled data and delete button
- ⚙️ Built on MVVM + Clean Architecture
- 🔒 No internet or account required — 100% private
The app follows Clean Architecture:
UI (Compose)
↓
ViewModel (MVVM)
↓
Use Cases (Domain Layer)
↓
Repository Interface
↓
Repository Implementation (Room DB)
- Kotlin
- Jetpack Compose (Material 3)
- MVVM + Clean Architecture
- Room (local DB)
- Hilt (DI)
- Navigation Compose
- State Management with
remember,mutableStateOf, andviewModel
This project uses JUnit4, Mockito, and Kotlin Coroutines Test for ViewModel testing.
| Function | Description |
|---|---|
addNote() |
Adds a new note and refreshes list |
updateNote() |
Updates an existing note (via add) |
deleteNote() |
Deletes a note and reloads notes |
loadNotes() |
Loads all notes into state |
loadNoteById() |
Loads a single note into editingNote |
- Location:
com.sadxlab.notescompose.presentation.viewmodel.NoteViewModelTest
kotlinx.coroutines.test– Coroutine testing utilitiesMockito / Mockito-Kotlin– For mocking repository behaviorJUnit4– Test framework
@Test
fun `update Note should call addNote and load updated notes`() = runTest {
val updatedNote = Note(id = 1, title = "Updated", content = "Updated content")
whenever(repository.addNote(updatedNote)).thenReturn(Unit)
whenever(repository.getNotes()).thenReturn(flowOf(listOf(updatedNote)))
viewModel.updateNote(updatedNote)
advanceUntilIdle()
verify(repository).addNote(updatedNote)
val result = viewModel.notes.first()
assertEquals(listOf(updatedNote), result)
}Only Notes does not collect or share any personal data. Privacy Policy: Read here
Rate & support us on the Google Play Store ⭐
Developed by Darshan Khatri



