Repository navigation
Submission Kelas : Belajar Membuat Aplikasi Web dengan React
π Aplikasi Catatan Pribadi
Aplikasi web React modern untuk mengelola catatan pribadi dengan fitur pencarian dan arsip
β¨ Fitur Utama
π― Kriteria Utama
- π Menampilkan Daftar Catatan - Tampilkan semua catatan dengan data awal
- β Menambah Catatan Baru - Form input dengan controlled components
- ποΈ Menghapus Catatan - Hapus catatan dengan konfirmasi visual
π Fitur Premium
- π Pencarian Real-time - Cari catatan berdasarkan judul
- π Limit Karakter - Pembatasan 50 karakter untuk judul dengan counter
- π¦ Sistem Arsip - Arsipkan dan restore catatan dengan mudah
π Quick Start
# Clone repository
git clone https://github.com/username/notes-app-react.git
# Masuk ke directory
cd notes-app-react
# Install dependencies
npm install
# Jalankan development server
npm run devBuka http://localhost:5173 di browser Anda.
π Struktur Project
notes-app-react/
βββ public/ # π Static assets
βββ src/
β βββ components/ # π§© React Components
β β βββ Header/ # π Header with search
β β βββ Input/ # β¨οΈ Input components
β β βββ Notes/ # π Note-related components
β β βββ NoteBody.jsx # Note content wrapper
β β βββ NoteInput.jsx# Create new note form
β β βββ NoteItem.jsx # Individual note card
β β βββ NoteList.jsx # Notes grid layout
β βββ styles/ # π¨ CSS Styles
β βββ utils/ # π οΈ Utility functions
β βββ App.jsx # π Main app component
β βββ main.jsx # π App entry point
βββ package.json # π¦ Dependencies
βββ README.md # π Documentation
π― Fitur Detail
π Membuat Catatan
- Judul dengan limit 50 karakter dan real-time counter
- Konten unlimited di textarea
- Auto-clear form setelah submit berhasil
- Timestamp otomatis menggunakan
+new Date()
π Pencarian
- Real-time filtering berdasarkan judul catatan
- Case-insensitive search untuk kemudahan penggunaan
- Instant results tanpa perlu reload
π¦ Sistem Arsip
- Toggle archive/unarchive dengan satu klik
- Separated views untuk catatan aktif dan arsip
- Visual indicators dengan icons yang berbeda
π¨ Tech Stack
| Kategori | Teknologi | Versi | Alasan Pemilihan |
|---|---|---|---|
| Frontend | React | 18.3.1 | Modern UI library dengan hooks |
| Build Tool | Vite | 6.0.5 | Fast build dan HMR |
| Icons | React Icons | 5.4.0 | Consistent icon library |
| Styling | CSS3 | - | Custom CSS dengan modern features |
| Linting | ESLint | 9.17.0 | Code quality enforcement |
π§ Development
Available Scripts
| Command | Fungsi |
|---|---|
npm run dev |
π Start development server |
npm run build |
π¦ Build for production |
npm run preview |
π Preview production build |
npm run lint |
π Check code quality |
State Management
const [searchQuery, setSearchQuery] = useState(""); // Kata kunci pencarian
const [notes, setNotes] = useState(getInitialData()); // Array semua catatan
// Filter catatan berdasarkan search query
const filteredNotes = notes.filter((note) =>
note.title.toLowerCase().includes(searchQuery.toLowerCase())
);
// Pisahkan catatan aktif dan arsip
const activeNotes = filteredNotes.filter((note) => !note.archived);
const archivedNotes = filteredNotes.filter((note) => note.archived);π Usage Guide
Membuat Catatan Baru
- Ketik judul catatan (max 50 karakter)
- Tulis konten di textarea
- Klik tombol "Buat Catatan π"
- Form akan otomatis ter-reset
Mengarsip Catatan
- Klik icon arsip (π¦) pada catatan
- Catatan akan pindah ke section "Catatan Arsip"
- Untuk unarchive, klik icon restore (π€)
Mencari Catatan
- Gunakan search box di header
- Ketik judul catatan yang dicari
- Results akan muncul real-time
π¨ UI/UX Features
Design System
- Modern glassmorphism dengan backdrop blur
- Consistent color scheme dengan CSS variables
- Responsive grid layout yang adaptive
- Clean typography dengan Inter font
- Interactive animations pada hover states
User Experience
- Instant feedback untuk semua actions
- Loading states yang smooth
- Error handling yang user-friendly
- Mobile-first responsive design
β Best Practices
Code Quality
- Controlled Components untuk form inputs
- Proper key props untuk list rendering
- ES6+ syntax (destructuring, arrow functions, etc.)
- Descriptive naming untuk variables dan functions
- Component separation yang logical
Performance
- Efficient filtering dengan array methods
- Minimal re-renders dengan proper state management
- Lightweight components tanpa over-engineering
Accessibility
- Semantic HTML structure
- Color contrast yang baik
- Keyboard navigation support
π€ Contributing
Kontribusi selalu welcome! Silakan:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
Distributed under the MIT License. See LICENSE for more information.
π¨βπ» Author
Aditya Pratama
- GitHub: @aditypraa
- Email: aditypraa@gmail.com