Hey everyone! ๐
Building a Flutter app that sends users 1-3 location-based AI-generated challenges per week based on their preferences.
The Flow:
- User selects challenge frequency (1-3 per week)
- App sends notification at random time during day
- 10 minutes to accept (can refresh once for different challenge)
- If accepted, 24h to complete
- Proximity notification (500-1000m) reminds them to take memory photo
- Photos saved to user's collection
Technical Approaches I'm Considering:
Approach 1: Batch Generation
- Weekly batch job generates all challenges for active users via AI including times to send noti
- AI considers: user location, preferences, previous trips, local events/weather
- Store challenges in DB with scheduled send times
- figure out how to send noti's with challenges at these times
Approach 2: Just-in-Time Generation
- Weekly batch job only schedules random notification times (1-3 per user)
- Real-time AI generation when notification time arrives:
- Generate 2 challenges per user
- Send notification with primary challenge
- Store secondary challenge for potential refresh
- Problem: Not sure how to trigger functions at these dynamically generated times in Appwrite
Edge case for both: New users mid-week would need temporary scheduling until next Monday batch run.
My Questions:
- What's the simplest architecture for this MVP? Is purely Appwrite possible for this use case - or do I need to create my own nodejs server with such custom logic?
- Simplest timezone handling approach? Any gotchas?
- Any other gotchas I should be aware of?
Since I'm learning backend as I go, any architectural guidance or simpler alternatives would be super helpful! Thanks! ๐