Skip to content

About

✨ Only Notes is a fast, clean, and offline-first notes app built with Jetpack Compose, MVVM, and Room. Create, edit, and organize notes with ease — no internet required. Built with modern Android architecture and Material 3 UI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

📝 Only Notes – Fast, Clean & Offline Note Taking App

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.


🚀 Features

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

🧱 Architecture

The app follows Clean Architecture:

UI (Compose)
↓
ViewModel (MVVM)
↓
Use Cases (Domain Layer)
↓
Repository Interface
↓
Repository Implementation (Room DB)


🛠️ Tech Stack

  • Kotlin
  • Jetpack Compose (Material 3)
  • MVVM + Clean Architecture
  • Room (local DB)
  • Hilt (DI)
  • Navigation Compose
  • State Management with remember, mutableStateOf, and viewModel

🧪 Unit Testing

This project uses JUnit4, Mockito, and Kotlin Coroutines Test for ViewModel testing.

✅ ViewModel Test Coverage

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

📁 Test Location

  • Location: com.sadxlab.notescompose.presentation.viewmodel.NoteViewModelTest

🔧 Tools Used

  • kotlinx.coroutines.test – Coroutine testing utilities
  • Mockito / Mockito-Kotlin – For mocking repository behavior
  • JUnit4 – Test framework

🧪 Sample Test Case

@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)
}

📸 Screenshots

🔐 Privacy

Only Notes does not collect or share any personal data. Privacy Policy: Read here

📲 Play Store

Rate & support us on the Google Play Store ⭐

Download on Play Store

👨‍💻 Author

Developed by Darshan Khatri

About

✨ Only Notes is a fast, clean, and offline-first notes app built with Jetpack Compose, MVVM, and Room. Create, edit, and organize notes with ease — no internet required. Built with modern Android architecture and Material 3 UI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages