Backend Services - tais-yakimovich/nadatrace-app GitHub Wiki
Authentication
- Shopify OAuth for user login and ID
- Firebase Authentication for session handling and Firestore access control
Database Security
- The database security rules are set by Flutterflow and Firebase.
- Firestore rules restrict access by userId
Rules:
- Write/read access
- Delete/create access
- Only authenticated users can read/write their own data
Metrics/Analytics
Metrics and analytics in the Nadatrace app are collected to:
- Monitor user engagement and behavior
- Evaluate feature success and app performance
- Support A/B testing (Remote Config experiments)
- Drive continuous app improvement based on real data
- Identify bottlenecks, crashes, or user drop-off points
Services Used For Metrics Collection:
Firebase Analytics is the primary backend service for metrics collection.
Service | Purpose |
---|---|
Firebase Analytics | Main platform for capturing user events and app usage data. |
Firebase Remote Config | Works with Analytics for A/B testing and feature rollout tracking. |
FlutterFlow Analytics Integration | Automatically tracks page views, user sessions, and critical flows. |
Remote Config Metrics
When running A/B tests via Firebase Remote Config, metrics are tied to experiment IDs. Firebase Analytics automatically logs:
- User assignment to a particular experiment group
- The resulting behavior for each group (e.g., session time, page interaction)
For example: If a user sees Layout A or Layout B, Firebase Analytics associates their event stream with the corresponding layout version. Firebase automatically records engagement or conversion differences between groups for statistical analysis.
Remote Configuration for A/B testing
Purpose of Remote Config in Nadatrace:
Remote Config allows dynamic control of app behavior and appearance without requiring users to download an app update. In Nadatrace, we use Remote Config to perform A/B testing on the Discover Page Layout, aiming to identify which version offers better user engagement and satisfaction.
Remote Config allows:
- Instantly update the app's UI/UX based on user needs or business strategies.
- Perform controlled A/B tests to scientifically determine which designs or features perform better.
- Target different groups of users with different experiences dynamically.
- Improve critical app metrics (e.g., session duration, sign-in success rate) based on data rather than assumptions.
Remote Config Set Up in Flutter Flow:
- Enable Remote Config: Activated.
Parameter Set:
- Name: discoverPageLayout
- Type: Boolean
- Default Value: false
- Condition: 1 condition controlling which layout is shown.
Behavior:
- If discoverPageLayout = true: show alternative Discover Page Layout after sign-in.
- If discoverPageLayout = false: show original Discover Page Layout after login.
A/B Testing Stucture:
Group | Condition | Layout Shown |
---|---|---|
A | False (default) | Original Discover Page Layout |
B | True (alternate) | New Discover Page Layout |
Fetch Behavior
- Remote Config parameters are fetched during app startup/login.
- FlutterFlow automatically caches Remote Config values to ensure performance.
- If the fetch is successful, the new value for discoverPageLayout is applied dynamically without an app update.