NotesAI/README.md
2026-01-05 12:50:08 +07:00

575 lines
21 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<img title="Logo NotesAI" src="docs/Logo%20Aplikasi.png" width="150" height="150">
# NotesAI - AI-Powered Note Taking App 1.1.0
![NotesAI Banner](https://img.shields.io/badge/NotesAI-v1.1.0-blue?style=for-the-badge)
![Platform](https://img.shields.io/badge/Platform-Android-green?style=for-the-badge&logo=android)
![Kotlin](https://img.shields.io/badge/Kotlin-100%25-purple?style=for-the-badge&logo=kotlin)
**Aplikasi pencatatan cerdas berbasis AI untuk Android dengan fitur organisasi terstruktur dan AI Assistant**
[📖 Dokumentasi Lengkap](./docs/Laporan%20Dokumentasi%20Aplikasi%20-%20Kelompok%201.pdf) | [🧪 Test Report](./TEST_SUMMARY_REPORT.md) | [📋 Changelog](./CHANGELOG.md)
Unduh [NotesAI.apk](./NotesAI.apk)
---
## 👥 Tim Pengembang
**Kelompok 1 - Kelas F5A5**
| Nama | NPM |
|------|-----|
| Dendi Yogia Pratama | 202310715051 |
| Raihan Ariq Muzakki | 202310715297 |
| Fazri Abdurahman | 202310715082 |
**Dosen Pengampu:** Arif Rifai Dwiyanto, ST., MTI
**Mata Kuliah:** Pemrograman Perangkat Bergerak
**Institusi:** Universitas Bhayangkara Jakarta Raya
---
## 📌 Informasi Proyek
- **Nama Aplikasi:** NotesAI
- **Repository:** [NotesAI](https://git.lab.ubharajaya.ac.id/202310715297-RAIHAN-ARIQ-MUZAKKI/NotesAI.git)
- **Platform:** Android (Minimum API 24 / Android 7.0)
- **Bahasa:** Kotlin 100%
- **UI Framework:** Jetpack Compose + Material 3
---
## 🎯 Tujuan dan Sasaran Aplikasi
### Masalah yang Dipecahkan
1. **Catatan tidak terorganisir** - Catatan bercampur tanpa struktur yang jelas
2. **Sulit mencari informasi** - Kehilangan waktu mencari catatan penting
3. **Kurang interaktif** - Tidak ada bantuan untuk merangkum atau menganalisis catatan
4. **Risiko kehilangan data** - Catatan terhapus permanen tanpa backup
### Target Pengguna
- 🎓 **Mahasiswa** (18-25 tahun) - Catatan kuliah, tugas, ringkasan dokumen
- 💼 **Profesional** (22-40 tahun) - Meeting notes, to-do lists, catatan kerja
- 👤 **Pengguna Umum** (18-40 tahun) - Catatan pribadi, jurnal, daftar belanja
### Keunggulan NotesAI
**Organisasi Terstruktur** - Sistem kategori dengan visual gradien warna
**AI Assistant** - Powered by Gemini 2.5 Flash untuk respons kontekstual
**Rich Text Editor** - WYSIWYG editor dengan drag-and-drop toolbar
**Smart Search** - Pencarian realtime dengan filter kategori
**Data Safety** - Soft delete dengan trash & restore functionality
**Document Parser** - Upload PDF/TXT/DOCX dengan auto-summary
---
## ✨ Fitur Utama
### 1⃣ Note Management System
- ✏️ **CRUD Operations** - Create, Read, Update, Delete catatan
- 📁 **Category Organization** - Pengelompokan visual dengan gradien warna
- 📌 **Pin Priority** - Pin notes/kategori untuk akses cepat
- 🗄️ **Archive & Trash** - Soft delete dengan kemampuan restore
- 🎨 **Rich Text Editor** - Bold, italic, underline, heading, bullet list
- 🔍 **Smart Search** - Realtime search dengan case-insensitive
### 2⃣ AI Assistant
- 🤖 **Contextual AI Chat** - AI memahami konteks dari catatan Anda
- 📄 **Document Upload** - Support PDF, TXT, DOCX
- 📝 **Auto Summary** - Ringkasan otomatis dari dokumen
- 💬 **Chat History** - Penyimpanan percakapan persistent
- 🎯 **Category Filter** - Filter konteks berdasarkan kategori
- ✍️ **Markdown Support** - Formatted AI responses
### 3⃣ Data Management
- 💾 **Local Storage** - DataStore Preferences untuk data persistence
- 🔄 **Autosave** - Lifecycle-aware autosave dengan debounce 500ms
- 🌙 **Theme Preference** - Dark/Light mode support
- 📊 **Reactive Data** - Flow-based reactive data loading
-**Fast Performance** - Optimized untuk pengalaman smooth
---
## 📊 Riset dan Analisis
### Analisis Pasar
Berdasarkan riset pasar 2025:
- **70% responden** percaya AI meningkatkan produktivitas kerja *(Eurobarometer, Feb 2025)*
- **Pasar note-taking apps** menunjukkan pertumbuhan dengan tren integrasi AI
- **Gemini 2.5 Flash** dipilih sebagai model "price-performance" terbaik untuk low-latency tasks
### Diferensiasi NotesAI
🎯 **AI Contextual** - AI dapat membaca semua catatan sebagai konteks
🎯 **Document to Summary** - Upload file langsung dapat ringkasan
🎯 **Local-First** - Tidak butuh login, data tersimpan lokal
🎯 **Free & Open** - Tidak ada paywall untuk fitur utama
---
## 🎨 Desain UI/UX
### Design System
- **Material Design 3** - Modern, clean, consistent
- **Color Scheme** - Dynamic gradients untuk kategori
- **Typography** - Clear hierarchy untuk readability
- **Spacing** - Consistent 4dp baseline grid
### User Flow
```
┌─────────────────────────────────────────────┐
│ 🏠 Main Screen (Home) │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Category │ │ Category │ │
│ │ Card │ │ Card │ │
│ └─────────────┘ └─────────────┘ │
└───────────┬─────────────────────────────────┘
│ Select Category
┌─────────────────────────────────────────────┐
│ 📄 Notes List Screen │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Note Card │ │ Note Card │ │
│ │ (Pinned) │ │ (Regular) │ │
│ └─────────────┘ └─────────────┘ │
└───────────┬─────────────────────────────────┘
│ Open Note
┌─────────────────────────────────────────────┐
│ ✏️ Full-Screen Editor │
│ • Rich Text Toolbar (Draggable) │
│ • Bold, Italic, Underline │
│ • Heading, Bullet List │
│ • Auto-save on background │
└─────────────────────────────────────────────┘
```
### Wireframe & Mockup
📐 **Wireframe lengkap** tersedia di [Dokumentasi](docs/Laporan%20Dokumentasi%20Aplikasi%20-%20Kelompok%201.pdf) Halaman 15
📸 **Screenshot aplikasi** tersedia di Panduan Pengguna (Halaman 21-28)
---
## 🛠️ Teknologi dan Alat
### Tech Stack
#### Core Technologies
```
// Build Configuration
Kotlin 1.9.0
Android Gradle Plugin 8.2.0
Compile SDK 34
Min SDK 24 (Android 7.0)
Target SDK 34
```
#### UI & Architecture
- **Jetpack Compose** - Modern declarative UI
- **Material 3** - Latest Material Design components
- **Navigation Compose** - Type-safe navigation
- **Lifecycle** - Lifecycle-aware components
#### Data & Storage
- **DataStore Preferences** - Key-value storage
- **Kotlinx Serialization** - JSON serialization
- **Kotlin Coroutines** - Asynchronous programming
- **Flow** - Reactive data streams
#### AI & Integration
- **Gemini API** - Google Generative AI (Gemini 2.5 Flash)
- **PDFBox-Android** - PDF text extraction
- **Activity Result API** - File picker for document upload
#### Development Tools
- **Android Studio**
- **Git** - Version control (git.lab.ubharajaya.ac.id)
- **Gradle** - Build automation
- **Claude AI** - AI-assisted development
### Dependencies
```gradle
dependencies {
// Compose
implementation("androidx.compose.ui:ui:1.6.0")
implementation("androidx.compose.material3:material3:1.2.0")
// DataStore
implementation("androidx.datastore:datastore-preferences:1.0.0")
// Serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
// AI
implementation("com.google.ai.client.generativeai:generativeai:0.1.2")
// PDF Parser
implementation("com.tom-roush:pdfbox-android:2.0.27.0")
// Testing
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
}
```
---
## 🏗️ Arsitektur Aplikasi
### Architecture Pattern
```
┌──────────────────────────────────────────────────┐
│ PRESENTATION LAYER │
│ ┌──────────────────────────────────────────┐ │
│ │ Composable Screens │ │
│ │ • MainScreen │ │
│ │ • AIHelperScreen │ │
│ │ • ArchiveScreen, TrashScreen │ │
│ └──────────────────────────────────────────┘ │
└────────────────────┬─────────────────────────────┘
│ Uses
┌──────────────────────────────────────────────────┐
│ DATA LAYER │
│ ┌──────────────────────────────────────────┐ │
│ │ DataStoreManager │ │
│ │ • saveNotes() / notesFlow │ │
│ │ • saveCategories() / categoriesFlow │ │
│ │ • saveChatHistory() / chatHistoryFlow │ │
│ └──────────────────────────────────────────┘ │
└────────────────────┬─────────────────────────────┘
│ Stores
┌──────────────────────────────────────────────────┐
│ MODEL LAYER │
│ • Note (id, title, content, isPinned...) │
│ • Category (id, name, gradients, isPinned...) │
│ • ChatHistory (messages, timestamp...) │
└──────────────────────────────────────────────────┘
```
### Package Structure
```
com.example.notesai/
├── 📁 config/
│ └── APIKey.kt
├── 📁 data/
│ ├── 📁 local/
│ │ └── DataStoreManager.kt
│ └── 📁 model/
│ ├── Note.kt
│ ├── Category.kt
│ ├── ChatHistory.kt
│ └── ChatMessage.kt
├── 📁 presentation/
│ ├── 📁 components/
│ │ ├── DrawerMenu.kt
│ │ ├── ModernTopBar.kt
│ │ └── ModernBottomBar.kt
│ └── 📁 screens/
│ ├── 📁 main/
│ ├── 📁 ai/
│ ├── 📁 archive/
│ ├── 📁 trash/
│ └── 📁 note/
└── 📁 util/
├── FileParser.kt
├── Constants.kt
└── AppColors.kt
```
---
## 📚 Resource yang Digunakan
### Visual Assets
- 🎨 **Icons** - Material Icons & Lucide Icons
- 🌈 **Colors** - Material 3 Dynamic Color
- 🖼️ **Illustrations** - Custom empty states
### Content & Data
- 📖 **Sample Data** - Test categories & notes untuk demo
- 📄 **Documents** - Sample PDF/TXT untuk testing parser
### External Services
- 🤖 **Gemini API** - Google Generative AI
- 📚 **Documentation** - Android Developers, Kotlin Docs
### Learning Resources
Referensi utama yang digunakan:
- [Android App Architecture Guide](https://developer.android.com/topic/architecture)
- [Jetpack Compose Documentation](https://developer.android.com/jetpack/compose)
- [Gemini API Documentation](https://ai.google.dev/docs)
- [Kotlin Serialization](https://kotlinlang.org/docs/serialization.html)
---
## 🧪 Pengujian Aplikasi
### Metodologi Testing
**Primary Method:** Black-Box Functional Testing
**Supporting Method:** Automated Unit Testing
Pengujian dilakukan menggunakan metode **Black-Box Functional Testing** sebagai pendekatan utama, dimana setiap fitur divalidasi dari perspektif end-user dengan memverifikasi kesesuaian **Expected vs Actual Result**. Didukung oleh **59 automated unit tests** untuk validasi business logic internal.
### Test Coverage Summary
| Test Case | Fitur | Tests | Status |
|-----------|-------|-------|--------|
| **TC-01** | Create Note & Category + Autosave | 8 tests | ✅ PASSED |
| **TC-02** | Pin Note (Priority) | included | ✅ PASSED |
| **TC-03** | Soft Delete & Restore | 11 tests | ✅ PASSED |
| **TC-04** | Search Realtime | 14 tests | ✅ PASSED |
| **TC-05** | AI Chat with Context | 14 tests | ✅ PASSED |
| **TC-06** | Upload PDF → Summary | 12 tests | ✅ PASSED |
| **TOTAL** | **6 Test Cases** | **59 tests** | **✅ 100%** |
### Test Results
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TEST SUMMARY REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Test Cases: 6
Passed Test Cases: 6
Failed Test Cases: 0
Success Rate: 100%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Unit Tests: 59
Passed Tests: 59
Failed Tests: 0
Execution Time: ~2 minutes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Status: ✅ ALL TESTS PASSED
Quality: ✅ PRODUCTION READY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
📄 **Laporan lengkap:** [TEST_SUMMARY_REPORT.md](./TEST_SUMMARY_REPORT.md)
### Testing Framework
- **JUnit 4** - Unit testing framework
- **AndroidX Test** - Android testing utilities
- **Kotlin Coroutines Test** - Async testing
- **Truth** - Assertion library
---
## 🚀 Instalasi dan Penggunaan
### Prasyarat
- ✅ Android 7.0 (API 24) atau lebih tinggi
- ✅ Koneksi internet (untuk fitur AI)
- ✅ Minimal 50MB storage kosong
### Cara Menjalankan dari Source Code
#### 1. Clone Repository
```bash
git clone https://git.lab.ubharajaya.ac.id/kelompok-3/notesai.git
cd notesai
```
#### 2. Setup API Key
Buat file `local.properties` di root project:
```properties
GEMINI_API_KEY=your_gemini_api_key_here
```
#### 3. Open di Android Studio
1. Buka Android Studio
2. File → Open → Pilih folder project
3. Tunggu Gradle sync selesai
#### 4. Run Aplikasi
1. Pilih device/emulator
2. Klik Run (▶️) atau `Shift + F10`
3. Aplikasi akan terinstall dan berjalan
---
## 📱 Panduan Penggunaan
### Quick Start Guide
#### 1⃣ Membuat Kategori Pertama
```
Main Screen → Tap () → Pilih "Kategori Baru"
→ Isi nama kategori → Pilih warna → Save
```
#### 2⃣ Membuat Note
```
Main Screen → Tap kategori → Tap () floating button
→ Isi judul & konten → Auto-saved ✓
```
#### 3⃣ Menggunakan Rich Text Editor
```
Buka note → Tap area teks → Muncul draggable toolbar
→ Pilih format (Bold/Italic/Heading/Bullet) → Type away!
```
#### 4⃣ Pin untuk Prioritas
```
Long-press note → Tap ⭐ Pin icon
→ Note akan muncul di urutan teratas
```
#### 5⃣ Chat dengan AI
```
Drawer Menu → AI Assistant → Ketik pertanyaan
→ AI akan menjawab berdasarkan catatan Anda
```
#### 6⃣ Upload & Summarize Document
```
AI Assistant → Tap 📎 Upload → Pilih file (PDF/TXT/DOCX)
→ AI otomatis generate summary → Tersimpan di chat history
```
### User Flow Lengkap
📖 Panduan detail dengan screenshot tersedia di [Dokumentasi](./docs/Laporan%20Dokumentasi%20Aplikasi%20-%20Kelompok%201.pdf) Bab III (Halaman 21-28)
---
## ⚠️ Batasan dan Catatan
### Keterbatasan Saat Ini
1. **AI Dependency**
- ⚠️ Fitur AI memerlukan koneksi internet
- ⚠️ Menggunakan free tier Gemini API (rate limited)
- Catatan lokal tetap berfungsi offline
2. **Document Format**
- ✅ Support: PDF, TXT, DOCX
- ❌ Tidak support: XLS, PPT, Images
3. **Data Storage**
- 💾 Data tersimpan lokal (DataStore)
- ⚠️ Tidak ada cloud backup (planned v2.0)
- Risiko data loss jika uninstall app
4. **Performance**
- ⚡ Optimal untuk <1000 notes
- Search dapat melambat pada dataset besar
- 🔜 Indexing optimization planned
### Privasi & Keamanan
- Catatan disimpan **100% lokal**
- Saat menggunakan AI, konten relevan dikirim ke Gemini API
- 🔐 API key tidak hardcoded (menggunakan BuildConfig)
- Tidak ada tracking atau analytics
---
## 🔮 Roadmap & Future Development
### Version 1.2.0 (Q2 2025) 🎯
- [ ] **Cloud Sync** - Firebase/Supabase integration
- [ ] **Backup & Restore** - Export/import data
- [ ] **Widget** - Home screen quick note
- [ ] **Reminder** - Notification untuk note penting
- [ ] **Templates** - Pre-made note templates
### Version 1.3.0 (Q3 2025) 🚀
- [ ] **Collaboration** - Share notes dengan user lain
- [ ] **Voice Input** - Speech-to-text untuk note
- [ ] **Image Support** - Attach images ke notes
- [ ] **Tag System** - Alternative categorization
- [ ] **Advanced Search** - Filter by date, tag, etc.
### Version 1.4.0 (Q4 2025) 💎
- [ ] **Multi-device Sync** - Real-time sync
- [ ] **Encryption** - End-to-end encryption
- [ ] **Premium AI** - Upgrade ke Gemini Pro
- [ ] **Offline AI** - On-device AI model
- [ ] **iOS Version** - Cross-platform support
---
## 📄 Dokumentasi Tambahan
### File Dokumentasi
- 📖 [Laporan Lengkap](./docs/Laporan%20Dokumentasi%20Aplikasi%20-%20Kelompok%201.pdf) - Dokumentasi lengkap 34 halaman
- 🧪 [Test Summary Report](./TEST_SUMMARY_REPORT.md) - Laporan pengujian detail
- 📋 [Changelog](./CHANGELOG.md) - Riwayat perubahan versi
### API Documentation
- 🤖 [Gemini API Docs](https://ai.google.dev/docs)
- 📚 [Android Developers](https://developer.android.com)
- 📝 [Kotlin Documentation](https://kotlinlang.org/docs)
### Referensi Akademik
Semua referensi dan kutipan tercantum di [Daftar Pustaka](./docs/Laporan%20Dokumentasi%20Aplikasi%20-%20Kelompok%201.pdf) halaman 33
---
## 🤝 Kontribusi & Support
### Cara Berkontribusi
1. Fork repository ini
2. Buat branch fitur (`git checkout -b feature/AmazingFeature`)
3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
4. Push ke branch (`git push origin feature/AmazingFeature`)
5. Buat Pull Request
### Coding Standards
- Follow Kotlin coding conventions
- Write descriptive commit messages
- Add unit tests untuk fitur baru
- Update documentation
### Laporkan Bug
Jika menemukan bug, silakan buat issue dengan:
- 📝 Deskripsi bug
- 📱 Device & Android version
- 🔄 Steps to reproduce
- 📸 Screenshot (jika ada)
---
## 🙏 Acknowledgments
### Special Thanks
- 🎓 **Bapak Arif Rifai Dwiyanto, ST., MTI** - Dosen pembimbing dan pengampu mata kuliah
- 🏫 **Universitas Bhayangkara Jakarta Raya** - Dukungan fasilitas
- 🤖 **Claude AI (Anthropic)** - AI assistant untuk pengembangan dan debugging
- 🎨 **Material Design Team** - Design system yang digunakan
- 📚 **Android Developer Community** - Dokumentasi dan best practices
### Tools & Services
- Android Studio - IDE terbaik untuk Android development
- Jetpack Compose - Modern UI toolkit
- Gemini API - AI capabilities
- PDFBox - PDF parsing library
- Git Lab UBHARA - Version control hosting
---
## 📞 Kontak
**Tim Pengembang Kelompok 3**
📧 Email:
1. [202310715297@mhs.ubharajaya.ac.id](mailto:202310715297@mhs.ubharajaya.ac.id)
2. [202310715051@mhs.ubharajaya.ac.id](mailto:202310715051@mhs.ubharajaya.ac.id)
3. [202310715082@mhs.ubharajaya.ac.id](mailto:202310715082@mhs.ubharajaya.ac.id)
🌐 Repository: [NotesAI](https://git.lab.ubharajaya.ac.id/202310715297-RAIHAN-ARIQ-MUZAKKI/NotesAI.git)
🏫 Institusi: Universitas Bhayangkara Jakarta Raya
---
<div align="center">
**Made with ❤️ by Kelompok 3**
**Fakultas Ilmu Komputer - Program Studi Informatika**
**Universitas Bhayangkara Jakarta Raya**
**2025**
</div>