SmartRoutine adalah aplikasi mobile berbasis React Native + Expo yang dirancang untuk membantu pelajar mengelola rutinitas harian dengan fokus pada kesehatan, disiplin, etika digital, dan pengembangan karakter.
- Buat rutinitas harian dengan kategori (Belajar, Olahraga, Tidur, Ibadah, Digital, Custom)
- Set waktu mulai dan durasi untuk setiap rutinitas
- Pilih hari aktif (Mon-Sun)
- Tambah catatan untuk setiap rutinitas
- Edit dan hapus rutinitas dengan confirm dialog
- Checklist rutinitas yang sudah selesai hari ini
- Sistem scoring otomatis: (selesai/total) Γ 100%
- Progress tracking dengan trend 7 hari
- Streak counter untuk motivasi berkelanjutan
- Rekomendasi based on data lokal (no API call)
- Grade A-E berdasarkan score harian
- Tips produktivitas sesuai goal (Disiplin/Sehat/Seimbang)
- Suggested plan untuk hari berikutnya
- Tips produktivitas (Pomodoro, Prioritas, No Multitask, dll)
- Tips manajemen waktu (Time Blocking, 80/20 Rule, Buffer Time)
- Tips digital wellness (20-20-20 Rule, No Phone Before Sleep, dll)
- Real-time stats display
- Custom nama user
- Set goal (Disiplin/Sehat/Seimbang)
- Target score (0-100%)
- Wake time & sleep time preferences
- Export data backup
SmartRoutine/
βββ app/ # Expo Router pages
β βββ index.tsx # Root redirect
β βββ _layout.tsx # Root layout
β βββ modal.tsx # Modal pages
β βββ (tabs)/ # Tab-based navigation
β βββ _layout.tsx # Tab layout with Ionicons
β βββ index.tsx # Dashboard
β βββ routine.tsx # Routine management
β βββ coach.tsx # AI Coach
β βββ progress.tsx # Progress tracking
β βββ profile.tsx # User profile
β βββ explore.tsx # Tips & insights
βββ components/ # Reusable React components
β βββ ErrorBoundary.tsx # Error boundary
β βββ RoutineFormModal.tsx # Form untuk routine
β βββ RoutineItem.tsx # List item
β βββ ui/ # UI components
βββ lib/ # Business logic
β βββ routine.ts # Routine CRUD & validation
β βββ profile.ts # User profile
β βββ aiCoach.ts # AI Coach logic
β βββ storage.ts # AsyncStorage wrapper
β βββ errorHandler.ts # Error handling utilities
β βββ categories.ts # Category management
β βββ stats/ # Stats computation
β βββ index.ts # Main stats
β βββ weekly.ts # Weekly trend
βββ types/ # TypeScript types
β βββ routine.ts # Routine types
βββ hooks/ # Custom React hooks
βββ constants/ # App constants
βββ jest.config.json # Jest testing config
- Title: 2-100 karakter, no special chars
- Time: Format HH:MM (00:00-23:59)
- Duration: 1-1440 menit (1 hari max)
- Days: Minimal 1 hari
- Category: 2-30 karakter
- Notes: Max 500 karakter
- React Error Boundary di root untuk catch global errors
- Try-catch di semua async operations
- User-friendly error messages
- Graceful error display
- Max 5MB size check
- JSON parse error handling
- Fallback ke default values
- Auto-cleanup corrupted data
type Routine = {
id: string; // Unique ID
title: string; // Max 100 chars
category: RoutineCategory; // Belajar|Olahraga|Tidur|Ibadah|Digital|Lainnya
time: string; // HH:MM format
days: RoutineDay[]; // Mon-Sun array
durationMin: number; // 1-1440 minutes
notes?: string; // Max 500 chars
createdAt: string; // ISO format
updatedAt: string; // ISO format
doneDates: string[]; // YYYY-MM-DD array (completed dates)
};
type Profile = {
name: string;
goal: "Disiplin" | "Sehat" | "Seimbang";
targetScore: number; // 0-100
wakeTime: string; // HH:MM
sleepTime: string; // HH:MM
};- Node.js 18+
- npm atau yarn
- Expo CLI:
npm install -g expo-cli
# Clone repository
git clone <repo-url>
cd SmartRoutine
# Install dependencies
npm install
# Configure Python environment (if needed)
# The app will automatically detect your Python env
# Start development server
npm start
# Run on specific platform
npm run android # Android Emulator
npm run ios # iOS Simulator
npm run web # Web browser# Run linter
npm run lint
# Run tests (setup required)
npm test
# Reset project to initial state
npm run reset-projectTest files located in __tests__ folder. Example:
npm test -- __tests__/lib/routine.test.ts- Create routine with all fields
- Edit routine
- Delete routine (confirm dialog)
- Toggle done status
- View progress/stats
- View AI coach
- Update profile
- Reset all data
- Test in light/dark mode
- Test error states
- Local Storage Only: Semua data disimpan di device
- No Cloud Sync: Data tidak dikirim ke server
- No Tracking: Tidak ada analytics atau tracking
- No Ads: Ad-free experience
- Data Export: User bisa export/backup data
App supports light/dark mode based on system settings. Colors defined in constants/theme.ts:
- Primary: Telkom Red (#DC143C)
- Background: Light/Dark
- Surface: Cards & modals
- Text: Primary/Secondary colors
- Border: Subtle dividers
- Local React state dengan
useState useMemountuk expensive computationsuseCallbackuntuk memoized functions- AsyncStorage untuk persistence
- Mobile-first approach
- Flex layout for responsive UI
- Safe area handling
- Keyboard-aware inputs
- Notifications: Not yet implemented (dependency installed but not used)
- Offline Support: Works offline but no sync mechanism
- Data Backup: Manual export only (need UI for import)
- Performance: Consider virtualization for 100+ routines
- Accessibility: Minimal a11y labels (WIP)
- Implement push notifications/reminders
- Add more unit tests
- Improve accessibility (ARIA labels)
- Add data import functionality
- Weekly statistics visualization (charts)
- Notification reminders system
- Local authentication (biometric/PIN)
- Habit streak badges
- Cloud sync capability
- Share routines with friends
- Integration with calendar
- Wearable support
expo: ^54.0.31react-native: 0.81.5react: 19.1.0expo-router: ~6.0.22
@react-native-async-storage/async-storage: ^2.2.0
@react-navigation/*: Latest stable
@expo/vector-icons: ^15.0.3expo-splash-screen: ~31.0.13
expo-notifications: ~0.32.16
- Fork repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
MIT License - see LICENSE file for details
For issues and suggestions:
- Check existing GitHub issues
- Create detailed issue report
- Include device/OS info
- Attach error logs if applicable
- Expo team untuk framework excellent
- React Native community
- Students dan educators yang memberikan feedback
Last Updated: January 23, 2026 Version: 1.0.0