How sang-19/elderlycareremindersystem-carenest works
Project Type and Purpose
• This is a mobile full-stack client (Expo/React Native) focused on elderly care: user authentication, medicine & appointment reminders, relative management, notifications, and local data persistence.
• No server code is included, so we’ll model any backend or external services as “External API” or “Push Notification Service.”
File Structure
• app/: Expo Router-based navigation folders
• (auth) branch: login/register flows
• (tabs) branch: main tab screens (Appointments, Reminders, Connections, Profile)
• components/: reusable UI widgets (EmergencyButton, ReminderForm, ScrollableTabBar)
• context/: React Context APIs for global state (Auth, Alert, Reminder, Connection, Notification)
• utils/: business-logic helpers (notifications.ts)
• hooks/: custom hooks (useFrameworkReady)
• assets/: images and static resources
• types/ & expo-env.d.ts: TypeScript definitions
README
• Frontend tech: Expo, React Native, TypeScript, React Navigation/Expo Router
• State mgmt: Context API + AsyncStorage
• Features list clarifies core domain objects: Users, Medications, Appointments, Relatives, Reminders
Main Components & Their Roles
A. Mobile App (front end)
• Navigation Layer (Expo Router)
• UI Layer (Screens under app/(auth) & app/(tabs))
• Presentation Components (components/…)
B. State Management
• AuthContext: handles login, registration, token storage
• ReminderContext: manages medication/activity reminders
• AppointmentContext (implicitly in Reminders or build new)
• ConnectionContext: relatives/contacts CRUD
• NotificationContext: schedules & reacts to push/local notifications
C. Data Layer
• AsyncStorage (via Contexts) for persisting user/profile/reminder data locally
D. External Services
• Expo Push Notification Service (via utils/notifications.ts)
• Backend API (assumed): user auth, data sync (optional, model as external REST/GraphQL)
E. Device APIs
• Local Notifications, Storage, Platform-specific features
Relationships & Data Flows
• UI Screens ←→ Contexts: Screens dispatch actions (e.g., addReminder) to Context providers
• Contexts → AsyncStorage: read/write domain data
• Contexts → External API: sync data if online (login, fetch appointments)
• Contexts → Notification Service: schedule/cancel push or local notifications
• Notification Service → App: delivers push events into NotificationContext
Architectural Patterns & Principles
• Component-Based UI: small reusable components under components/
• Context API for State: isolates domain logic from presentation
• Router-First Navigation: file-system based routing in app/
• Separation of Concerns: UI, state, data/storage, external integration
Final Checklist
• [ ] UI components & screens clearly labeled
• [ ] AsyncStorage block showing persistence interactions
• [ ] Annotations of key frameworks (React Native, Expo, TypeScript, React Navigation)