About
Synfacts is a multisignal measurement layer that captures and synchronizes real-time learner signals including EEG (via Muse headsets), mouse tracking, and future sensor modalities across flashcard practice sessions.
It feeds structured, timestamp-aligned data into research export pipelines for analysis. Synfacts integrates with MoFaCTS, an open-source flashcard-based adaptive practice system, via HTTP POST / WebSocket. No shared types, no direct imports, no derivative-work coupling.
Author & Lead Architect: James "Rusty" Haner
Research Context: Institute for Intelligent Systems, University of Memphis
What Synfacts Captures
| Modality | Source | What it measures |
|---|---|---|
| EEG | Muse 2 / Muse S (WebBluetooth) | 4-channel electroencephalography (AF7, AF8, TP9, TP10) at configurable sample rates (128–512 Hz), plus optional accelerometer and gyroscope |
| Mouse tracking | DOM pointer events | Cursor position, clicks, dwell times, and movement trajectories, captured via a dedicated Web Worker with configurable sampling and budget |
| Event markers | Session lifecycle | Stimulus onset, response, feedback, and session-type-specific markers aligned to the signal stream |
| Future sensors | Plugin architecture | Designed for eye tracking, GSR, heart rate, and other browser-accessible sensors via the same SignalProvider registry |
Synfacts Features
Real-time EEG Recording
Captures 4-channel EEG (AF7, AF8, TP9, TP10) at up to 512 Hz via Muse 2 / Muse S headsets over WebBluetooth.
Mouse Tracking
Records cursor position, clicks, dwell times, and movement trajectories via a dedicated Web Worker.
Session Event Markers
Aligns stimulus onset, response, and feedback events to the signal stream for precise temporal analysis.
Calibration Flow
Guided calibration including EEG signal quality check, resting baseline, blink detection, and optional mouse calibration.
Research Data Export
Download session data as TSV or JSON with EEG samples and mouse tracking aligned by UTC epoch timestamp.
Plugin Architecture
Extensible SignalProvider registry designed for eye tracking, GSR, heart rate, and future sensor modalities.
Architecture
Synfacts runs alongside a flashcard practice platform (such as MoFaCTS) using a loose-coupling model:
- Independent service: Synfacts has its own Express server, build pipeline, and dependency tree.
- Network-only: Communication happens over HTTP POST / WebSocket. No direct function calls or shared memory.
- Separate types: All types defined independently in Synfacts' own source tree; no shared imports.
- Configurable endpoint: The practice platform sends session events to Synfacts via a configured URL.
How Synfacts fits into a practice session:
┌──────────────────────────────────────────────┐
│ Learner Browser │
│ │
│ ┌─────────────────┐ POST /events │
│ │ Practice UI │──────────────────────┐ │
│ │ (flashcard app) │ session-start │ │
│ │ │ trial-start │ │
│ │ enableSynfacts │ stimulus-onset │ │
│ │ : true │ response │ │
│ │ │ feedback │ │
│ │ <script src=" │ trial-end │ │
│ │ {endpoint}/ │ session-end │ │
│ │ providers.js"> │ │ │
│ │ │ │ │ │
│ │ ┌─────▼──────┐ │ │ │
│ │ │ Web Workers │ │ │ │
│ │ │ • EEG 512Hz│ │ │ │
│ │ │ • Mouse 20Hz│ │ │ │
│ │ │ • IndexedDB │ │ │ │
│ │ └─────┬──────┘ │ │ │
│ └────────┼─────────┘ │ │
│ │ │ │
│ Calibration iframe │ │
│ (synfacts:3001/calibrate) │ │
│ • EEG quality check │ │
│ • Baseline recording │ │
│ • Blink calibration │ │
│ • Mouse calibration │ │
└──────────┼──────────────────────────────────┘ │
│ │
└─────────────────────────────────────┤
│
▼
┌────────────────────────────────┐
│ Synfacts Service │
│ (Express, port 3001) │
│ │
│ SessionManager ProviderReg │
│ • Event routing • EEG │
│ • Trial buffering • Mouse │
│ • Future │
│ StorageAdapter │
│ • MongoDB (primary) │
│ • HTTP endpoint │
│ • History (16KB) │
│ • None (dry-run) │
│ │
│ GET /health │
│ GET /export/:sessionId │
└────────────────────────────────┘