How ezn24/assessment-4-mad works
1. Overall shape
VizMinder A4 is a React Native + Expo app that targets installed Android APKs. The JavaScript app lives at the repo root and in src/, while the android/ folder contains custom native code for exact alarms and a lock-screen reminder activity.
2. App shell and UI composition
App.js is the entrypoint for the JS side and likely wires the theme, data providers, and the main screen. The primary user experience is centered in src/screens/HomeScreen.js, with Material 3 styling from src/theme.js.
3. Reminder domain layer
The reminder feature is organized around src/models/reminder.js, src/hooks/useReminders.js, and src/data/seedReminders.js. The hook is the main state/use-case boundary for creating, editing, toggling, searching, deleting, and scheduling reminder items.
4. Local-first persistence
src/services/storage.js and expo-sqlite provide the durable local store for reminders, so the app can work offline and survive restarts. This local SQLite layer is the primary source of truth for day-to-day usage.
5. Cloud sync and identity
src/services/firebase.js handles Firebase Authentication and Firestore sync. The app supports anonymous auth fallback plus email/password login, and cloud data is stored under users/{firebaseUserId}/reminders/{reminderId}. Firebase config is injected through app.config.js from environment variables via .env and src/services/expoConfig.js.
6. Background reminder delivery path
Background scheduling is split between src/services/backgroundTasks.js, src/services/notifications.js, and src/services/nativeAlarm.js. On Android, the installed APK path uses native exact alarms; on non-native or fallback paths, Expo notifications provide the scheduling/permission layer.
7. Android native boundary
The android/app/src/main/java/com/ezn24/vizmindera4/ package contains AlarmSchedulerModule.kt, AlarmSchedulerPackage.kt, AlarmReceiver.kt, AlarmActivity.kt, MainActivity.kt, and MainApplication.kt. This is the key architectural boundary between React Native and Android: JS schedules reminders, native Android triggers the alarm, shows a high-priority full-screen notification, and opens a lock-screen reminder UI.
8. User interaction and visual cues
The UI uses react-native-paper, react-native-gesture-handler, react-native-calendars, @react-native-community/datetimepicker, expo-image-picker, expo-haptics, react-native-animatable, and react-native-confetti-cannon. These libraries support the app’s visual-first reminder flow: image/emoji/icon cues, swipe delete, calendar schedule view, date/time picking, tactile feedback, and completion celebration.
9. Settings and app behavior
@react-native-async-storage/async-storage is used for lightweight preferences, such as theme/dynamic color or other app settings. The theme layer is Material 3 oriented, with optional Android dynamic color extraction via @pchmn/expo-material3-theme.
10. Platform/runtime constraints
This repo is intentionally not “Expo Go only.” The README makes it clear that full alarm behavior, exact alarms, and the custom full-screen alarm activity require the built Android app. That is why the android/ directory is checked in and why APK builds are part of the normal workflow.
11. Testing and validation
__tests__/reminder.test.js covers reminder model behavior with Jest, using jest-expo and jest.setup.js. The repository also includes Firebase Test Lab documentation and APK build scripts, reflecting that some behaviors must be validated on a real Android device/emulator, not just in JS tests.
12. Build and delivery tooling
Build orchestration is split across Expo/EAS config (app.json, app.config.js, eas.json) and native Android Gradle files under android/. Scripts such as scripts/build-local-apk.ps1 and the README’s APK/test-lab steps show that the deliverable is an Android install artifact, not just a JS bundle.
13. Main data flow to draw in a diagram
The important end-to-end flow is: user action in HomeScreen → reminder state in useReminders → local SQLite storage → optional Firestore sync via Firebase → scheduled alarm via JS/native bridge → Android AlarmReceiver/AlarmActivity notification and full-screen UI. That flow captures the main architectural seams of the repo.
Main entry points: useReminders.js useReminders · HomeScreen.js Home · backgroundTasks.js Background tasks · AlarmSchedulerModule.kt Alarm module
Components 22
JS App
Expo/React Native application shell, screens, domain logic, and services.
- App.js · JS app entry that wires providers and the main UI.
App.js - Home · Primary reminder UI and user interaction surface.
src/screens/HomeScreen.js - Theme · Material 3 styling and dynamic color behavior.
src/theme.js - useReminders · Main reminder workflow for CRUD, search, toggle, and scheduling.
src/hooks/useReminders.js - Reminder · Reminder data shape and domain rules.
src/models/reminder.js - Seed data · Initial reminder examples and defaults.
src/data/seedReminders.js - Storage · SQLite-backed local source of truth for reminders.
src/services/storage.js - Firebase · Authentication and Firestore sync for user reminders.
src/services/firebase.js - Expo config · Reads environment-driven config for Expo and Firebase.
src/services/expoConfig.js - Background tasks · Coordinates reminder scheduling work in JS.
src/services/backgroundTasks.js - Notifications · Expo notification permissions and fallback scheduling.
src/services/notifications.js - Native alarm · JS bridge for exact alarm scheduling on Android.
src/services/nativeAlarm.js
Android Native
Custom Android alarm and lock-screen delivery boundary.
- Alarm module · Exposes exact-alarm scheduling to React Native.
android/app/src/main/java/com/ezn24/vizmindera4/AlarmSchedulerModule.kt - Alarm package · Registers the alarm module with the app runtime.
android/app/src/main/java/com/ezn24/vizmindera4/AlarmSchedulerPackage.kt - Alarm receiver · Receives alarm events and triggers reminder delivery.
android/app/src/main/java/com/ezn24/vizmindera4/AlarmReceiver.kt - Alarm activity · Lock-screen reminder activity shown on alarm.
android/app/src/main/java/com/ezn24/vizmindera4/AlarmActivity.kt - MainActivity · React Native host activity for the installed app.
android/app/src/main/java/com/ezn24/vizmindera4/MainActivity.kt - MainApplication · Android application bootstrap and package registration.
android/app/src/main/java/com/ezn24/vizmindera4/MainApplication.kt
Tooling
Build, config, and validation support.
- App config · Expo app configuration and environment injection.
app.config.js - EAS config · Expo Application Services build profiles.
eas.json - Tests · Reminder model validation and behavior tests.
__tests__/reminder.test.js - APK script · Local Android APK build automation.
scripts/build-local-apk.ps1
Connections 22
- App.js → Home: renders · App mounts the primary screen.
- App.js → Theme: uses · Global UI theme is applied at the app shell.
- Home → useReminders: drives · User actions flow through the reminder use-case boundary.
- Home → Theme: styles · Screen consumes Material 3 styling.
- useReminders → Reminder: operates on · Business logic is centered on reminder entities.
- useReminders → Seed data: hydrates · Initial reminders can be seeded into state.
- useReminders → Storage: persists · Local SQLite storage is the primary source of truth.
- useReminders → Firebase: syncs · Cloud sync mirrors reminders for authenticated users.
- Firebase → Expo config: configured by · Firebase settings are injected from runtime config.
- useReminders → Background tasks: schedules · Reminder changes trigger background delivery setup.
- Background tasks → Notifications: fallbacks to · Notification permissions and Expo scheduling are the fallback path.
- Background tasks → Native alarm: bridges to · Android exact alarms are used on the native path.
- Native alarm → Alarm module: calls · JS invokes the native scheduling module.
- Alarm module → Alarm package: registered by · Module is exposed through the RN package.
- Alarm module → Alarm receiver: fires · Scheduled alarms are delivered to the receiver.
- Alarm receiver → Alarm activity: opens · Alarm events surface a lock-screen reminder UI.
- MainApplication → Alarm package: loads · Android app bootstrap registers the custom package.
- MainActivity → App.js: hosts · Main Android activity hosts the JS application.
- App config → Expo config: feeds · Build-time config supports runtime environment access.
- EAS config → App config: coordinates · EAS profiles work with Expo app configuration.
- Tests → Reminder: verifies · Jest coverage focuses on reminder behavior.
- APK script → MainApplication: builds · Local build script produces an installable Android artifact.