A secure, cyberpunk-themed note-taking application for Android, built with modern Android technologies and a distinct visual style.
Developed live as part of live stream series: https://www.youtube.com/playlist?list=PL0zZBw8Dq429NOr4MPDZHolp8UoFVuNPI
- Language: Kotlin
- UI Framework: Jetpack Compose (Material3)
- Architecture: MVP (Model-View-Presenter)
- Database: Room (SQLite abstraction)
- Security: AndroidX Security Crypto (EncryptedSharedPreferences)
- Asynchronous: Kotlin Coroutines & Flow
- Serialization: GSON
- PDF Generation: iText7
The application follows the MVP (Model-View-Presenter) pattern to separate UI logic from business logic.
-
NotesActivity(Main Entry)- Role: Displays and manages the primary note list.
- Logic:
- Validates session and passcode state with
SessionManager/PreferencesManager. - Loads notes via
NotesPresenter/NotesRepositoryand keeps trash-bin visibility in sync.
- Validates session and passcode state with
- UI:
NotesListScreen(Compose) with search, grid/list toggle, JSON import/export, and quick access to settings, trash, pinned notes, and URL-filtered notes.
-
NoteDetailActivity- Role: Create, view, and edit individual notes.
- Features:
- Auto-save functionality.
- Export to PDF (
FileUtils). - Share note content.
- UI:
NoteDetailScreen(Compose).
-
LoginActivity- Role: Handles secure access to the application.
- Modes:
SETUP: Create a new passcode.CONFIRM: Verify the new passcode.VALIDATE: Unlock the app.
- UI:
LoginScreen(Compose) with custom 4-digit PIN input and cyberpunk styling.
-
SettingsActivity- Role: Manage application settings.
- Features:
- Toggle "Require passcode on opening".
- Initiates the passcode setup flow.
-
TrashBinActivity- Role: Shows soft-deleted notes with options to restore individually, restore all, or empty the bin permanently.
- UI:
TrashBinScreen(Compose) driven byTrashBinPresenter/NotesRepository.
-
PinnedNotesActivity- Role: Presents notes that have been marked as pinned from the main list.
- UI:
PinnedNotesScreen(Compose) with unpin support and navigation back to details.
-
UrlNotesActivity- Role: Filters notes containing URLs for quick link discovery.
- UI:
UrlNotesScreen(Compose) powered byUrlNotesPresenterquerying URL-bearing notes.
The app implements a robust security model to protect user notes.
- Storage: Passcodes are stored using
EncryptedSharedPreferences(AES256-GCM), ensuring they are encrypted at rest and cannot be read even on rooted devices without the Keystore key. - Session State:
- Managed by
SessionManager(Singleton). isLoggedInflag tracks the current session.- Session is cleared on process death or when the passcode is disabled.
- Prevents infinite login loops by checking both the enabled flag and session state.
- Managed by
AppDatabase: Room database instance.Note: Entity representing a note (id, title, content, timestamp) with flags for soft deletion and pinning.NoteDao: Data Access Object for database operations including search, trash management, pin toggling, and URL filtering.NotesRepository: Abstraction layer between Presenters and the DAO.
- Theme: Custom Cyberpunk theme (
NotesAppTheme). - Colors: Neon palette (Cyan, Magenta, Yellow) on dark backgrounds.
- Components: Custom
CyberpunkCard,NeonButton, and glitch-effect text styles.
com.dmitryy.notesapp
├── data/ # Room entities, DAO, Database, Repository
├── ui/
│ ├── base/ # Base MVP interfaces
│ ├── list/ # Notes list screen (Activity, Presenter, Contract)
│ ├── detail/ # Note detail screen (Activity, Presenter, Contract)
│ ├── login/ # Login screen (Activity, Presenter, Contract)
│ ├── settings/ # Settings screen (Activity, Presenter, Contract)
│ ├── trash/ # Trash bin screen for soft-deleted notes
│ ├── pinned/ # Pinned notes screen
│ ├── url/ # Notes filtered to links/URLs
│ └── theme/ # Compose theme and color definitions
└── utils/ # Helpers (Logger, FileUtils, PreferencesManager, SessionManager, NavigationUtils)
