Mobile

Plant identification app with smart watering reminders

Mobile app that identifies plants from photos and schedules offline watering and fertilising reminders adjusted by species, season and local weather.

react-nativeexpotypescriptfirebasecloud-functionsrevenuecat

Built 1 time, downloaded 0 times.

Install from your terminal

Run this in your project folder. It signs you in, shows what changes and asks before it overwrites a file.

npx claude-lab add plant-identification-app-with-smart-watering-reminders-c7df0b
10 filesDownload zip
CLAUDE.md
# Plant care app

A mobile app that identifies plants from photos and sends reliable watering and fertilising reminders. Each reminder is based on the species, the season and local weather in the user's city. The app is free and shows ads. The paid tier removes ads and adds a plant diary with side-by-side growth photos.

Stack: React Native with Expo (managed workflow, EAS Build, dev client), TypeScript in strict mode, and Firebase (Auth, Firestore, Storage, Cloud Functions, FCM).

Specs and plan: see SPEC.md (product spec) and PLAN.md (phased build plan).

## Commands

Fill in and confirm these after Phase 1 scaffolding.

- `npx expo start`: start the dev server
- `npx tsc --noEmit`: type check
- `npx eslint .`: lint (CI uses `--max-warnings=0`)
- `npx jest`: unit tests
- `eas build --profile development`: dev client for real devices
- `cd functions && npm test`: Cloud Functions tests
- `firebase emulators:start`: local Auth, Firestore, Storage and Functions

## Folder map

- `app/`: Expo Router screens
- `src/features/identify/`: photo capture and plant ID flow
- `src/features/reminders/`: schedules, local notifications, snooze and done
- `src/features/diary/`: premium growth photo diary
- `src/features/paywall/`: subscription and ad gating
- `src/lib/firebase/`: Firebase init from env variables
- `functions/`: scheduling, weather refresh, notification sender, plant ID proxy

## Notification rules

Reminders are the core feature. Treat them as the highest-risk area.

- Use local scheduled notifications (expo-notifications) for the per-plant watering schedule so they work offline.
- Use FCM only for server-driven weather adjustments.
- Never rely on background timers.
- Keep a rolling window of scheduled notifications. Re-fill on app open.

Platform gotchas:

- Android 13 and later need the POST_NOTIFICATIONS runtime permission and a notification channel.
- Android exact alarms and battery optimisation can delay reminders.
- iOS allows 64 pending local notifications. Schedule a window, not everything.
- Push does not work on simulators. Test on a real device with a dev build.
- Expo Go cannot test notifications, ads or purchases. Use a development build.

## Data rules

- Store each user's timezone and city.
- Compute reminder times in the user's local timezone and handle DST.
- Location is city-level only. Ask for permission with a clear reason.
- Photos go under the user's uid path. Storage and Firestore rules allow only the owner.

## Secrets and services

- The plant ID provider is called only from a Cloud Function. The API key stays server-side.
- Keys come from env variables or Firebase secrets. Never commit them.
- Use placeholders such as `YOUR_API_KEY`, `YOUR_WEATHER_API_KEY` and `YOUR_REVENUECAT_KEY`.
- Ads use react-native-google-mobile-ads. Use test ad unit IDs in development.
- Subscriptions use RevenueCat. The entitlement `premium` gates ad removal and the diary.

## Conventions

- Functional components and hooks only. No `any`.
- One feature folder per feature. Keep PRs small.
- Test Firestore security rules with the emulator.
- Every screen needs loading and error states.
- Give camera and reminder controls accessibility labels.

## Workflow

1. Explore the code first.
2. Plan the change.
3. Code it.
4. Run the verify skill before saying a task is done.

Use `/clear` between unrelated tasks. Use `/compact` at natural breaks.

Review rules are in REVIEW.md, imported below so `/code-review` reads them.

@REVIEW.md
Use for my project