NeuroFlex Behavioral Event Model · v1

A structured event architecture for future longitudinal behavioral research.

The MVP can remain offline and simple, but every activity should be designed to emit consistent behavioral events that can later support research infrastructure.

Core rule: never store only final scores. Store the process: timing, hesitation, corrections, retries, errors, abandonment, and change over time.

Event Envelope

Every NeuroFlex event should share the same base structure so local MVP data can later map cleanly into a backend or research data pipeline.

{
  "event_id": "uuid",
  "anonymous_user_id": "uuid",
  "session_id": "uuid",
  "timestamp_utc": "2026-06-01T10:00:00Z",
  "app_version": "2.4",
  "event_type": "memory_card_selected",
  "event_category": "cognitive",
  "screen": "memory_cards",
  "activity_id": "memory_cards",
  "sequence_index": 14,
  "payload": {}
}

Data Tiers

Tier 1

Core MVP Events

Safe and useful local events: activity starts, completions, abandonment, score, difficulty, reaction time, duration, task completion, and check-in values.

Tier 2

Research Detail

Interaction sequences, hesitation per decision, navigation paths, correction frequency, detailed notification behavior, and retries.

Tier 3

Advanced Motor Data

Full touch paths, drawing trajectories, tracing tasks, finger stability, spiral drawing, and high-frequency tap timing. Research consent required.

Event Levels

0 · System

app_open, app_close, session_start, session_end, app_version_changed.

1 · Navigation

screen_view, screen_exit, button_press, menu_opened, invalid_tap, repeated_tap.

2 · Activity Lifecycle

activity_start, activity_complete, activity_abandoned, activity_skipped, activity_retry.

3 · Cognitive

memory cards, sequence memory, missing item, number sequence, reaction tests, recall, attention, visual search.

4 · Emotional

mood, energy, motivation, focus, stress, loneliness, confidence, perceived difficulty, memory self-rating.

5 · Wellness

train, drink, move, eat, connect, relax events and completion patterns.

6 · Routine

task_created, task_completed, task_postponed, task_skipped, task_ignored, routine_day_summary.

7 · Notifications

notification_scheduled, received, opened, dismissed, ignored, and action_selected.

8 · Behavioral Pattern

challenge_avoided, difficulty changes, long pauses, return after gap, preference signals.

9 · Motor

tap precision, touch paths, drag events, line tracing, hold-still tests, spiral drawing.

10 · Consent

research_consent_shown, accepted, declined, revoked, export requested, local data deleted.

Example: Memory Cards

A useful event model captures not only whether the user solved the round, but how they solved it.

{
  "event_type": "memory_pair_attempt",
  "event_category": "cognitive",
  "screen": "memory_cards",
  "activity_id": "memory_cards",
  "payload": {
    "first_card_position": 5,
    "second_card_position": 9,
    "is_match": false,
    "time_between_cards_ms": 1800,
    "hesitation_ms": 1800
  }
}

Example: Number Sequence

Typing behavior may contain signals beyond the final answer.

{
  "event_type": "number_sequence_submit",
  "event_category": "cognitive",
  "payload": {
    "sequence_length": 5,
    "is_correct": false,
    "error_type": "substitution",
    "first_error_position": 3,
    "typing_duration_ms": 4100,
    "backspace_count": 2,
    "submit_latency_ms": 900
  }
}

Derived Metrics

  • reaction time variability
  • learning curve slope
  • retention curve
  • first-error position
  • correction rate
  • task adherence rate
  • postponement frequency
  • abandonment rate
  • confidence-performance gap
  • usage time drift
  • session fragmentation
  • touch precision

MVP Implementation

Local first

Implement local event logging only. The app does not need backend, login, cloud sync, or AI in Phase 1.

Future-ready

Use the same schema that a future backend would expect: event ID, anonymous user ID, session ID, timestamp, type, category, screen, activity, and payload.

Exportable

For development, add a way to export local events, clear local events, and inspect event count.

today:
saveLocally(event)

future:
saveLocally(event)
syncToCloud(event)

Privacy Rules

NeuroFlex should minimize personal data and avoid collecting identity by default.

  • no name by default
  • no email by default
  • no phone number
  • no precise location
  • no contacts
  • no camera images
  • no microphone recordings
  • no medical records by default

Scientific Framing

NeuroFlex should investigate behavioral trajectories, not claim diagnosis. The initial machine learning objective should be discovery, not prediction.