Skip to main content

Developer Guide

Step-by-step coding tutorials for extending FreeBCI DAQ.

#TutorialWhat you'll build
1Environment SetupClone → npm installnpm run dev → run tests
2Architecture TourFollow one sample through the entire pipeline
3Add a PanelNew React component → register in App.tsx → add i18n
4Add an AlgorithmWrite a formula → hook into the analyzer → display on a chart
5Serial ProtocolEEGRST / EEGCFG / SW,START sequencing, binary parser internals
6State ManagementZustand vs. refs boundary, observer bus pattern, waveform rendering
7IIR Filter PipelineButterworth filter implementation, rebuild triggers, window clearing
8AI PipelineFive-band recording, IndexedDB schema, LLM call flow
9i18n & ThemingAdd translation keys, Tailwind v4 theme variables, Card primitives
10TestingVitest patterns, fake-indexeddb, mocking Web Serial
11Build & Deployvite build, dist/ static hosting, HTTPS requirement

Reference

DocCovers
Developer ReferenceArchitecture overview, directory map, coding conventions
Data PipelineFull pipeline diagram and component relationships
ConfigurationVITE_* environment variables and tuning parameters

Prerequisites

Before starting:

  • Node.js 18+ installed
  • Chrome or Edge for Web Serial testing
  • The project cloned and npm install completed
  • Familiarity with React, TypeScript, and Vite

Start with Environment Setup if you haven't already.