Synfacts logo

Synfacts

Real-time multisignal recording and export

Real-time signal recording. Timestamp-aligned data. Research-ready export.

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

ModalitySourceWhat it measures
EEGMuse 2 / Muse S (WebBluetooth)4-channel electroencephalography (AF7, AF8, TP9, TP10) at configurable sample rates (128–512 Hz), plus optional accelerometer and gyroscope
Mouse trackingDOM pointer eventsCursor position, clicks, dwell times, and movement trajectories, captured via a dedicated Web Worker with configurable sampling and budget
Event markersSession lifecycleStimulus onset, response, feedback, and session-type-specific markers aligned to the signal stream
Future sensorsPlugin architectureDesigned 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:

  1. Independent service: Synfacts has its own Express server, build pipeline, and dependency tree.
  2. Network-only: Communication happens over HTTP POST / WebSocket. No direct function calls or shared memory.
  3. Separate types: All types defined independently in Synfacts' own source tree; no shared imports.
  4. 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         │
               └────────────────────────────────┘

Documentation

Launch App MoFaCTS on GitHub