Fix onboarding UX and add replaceable journey analytics
Make recipient changes explicit, prioritize verification retry, and label simulated outcomes prominently. Add shared typed analytics with bounded dummy capture, correlated service events and documented PostHog adapter contract. Validate privacy, retries, abandonment, keyboard recovery and accessibility. Related to #12.
This commit is contained in:
1 parent
bf7778f312
commit
f1cbf64282
28 files changed
+1158
-64
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# SXCHNGE analytics
|
||||
|
||||
Shared pure-Dart analytics contract, semantic journey recorder and bounded
|
||||
in-memory dummy service. No PostHog SDK, network, persistence or logging.
|
||||
|
||||
```dart
|
||||
final analytics = DummyAnalyticsService();
|
||||
final recorder = JourneyRecorder(analytics);
|
||||
final operation = recorder.begin(JourneyKind.login, JourneyStep.login);
|
||||
recorder.finish(operation, simulated: true, terminal: true);
|
||||
final captured = analytics.events; // immutable snapshot
|
||||
recorder.dispose();
|
||||
```
|
||||
|
||||
Inject an `AnalyticsService` implementation to replace the sink. Consumers do not
|
||||
await analytics. See [the auth journey contract](../../../docs/ux/auth-journeys.md)
|
||||
for schema, metric definitions, simulation rules, privacy, retry/abandonment
|
||||
semantics, PostHog adapter guidance and measurement limitations.
|
||||
|
||||
Run `flutter test` and `flutter analyze` here. The production library imports
|
||||
only Dart SDK libraries and can be reused by web and mobile.
|
||||
Reference in new issue
Block a user