Inspiration

Walk into almost any building on campus and you will see it: students moving between assignments, notifications, social media, and an endless stream of digital stimulation. Even while building this project, we noticed our own attention drifting.

Most existing solutions frame focus as a personal-discipline problem: limit screen time, set another alarm, or simply try harder. These recommendations overlook how differently people respond to their environments and how difficult it is to improve something that cannot be observed.

We wanted to make attention visible, trainable, and personal. That idea became AttUne: a non-diagnostic attention-training platform that combines behavioral responses, camera-based eye-movement estimation, optional EEG neurofeedback, and adaptive voice coaching.

AttUne does not claim to diagnose ADHD or replace professional care. Its purpose is to help users practise attention, observe patterns, and understand how their performance changes over time.

What it does

AttUne offers two training experiences.

Attention Training

During Attention Training, a large orb travels clockwise or counterclockwise around the screen. The user follows it with their eyes. At unpredictable moments, the orb turns red and the user presses a fixed response button as quickly as possible.

AttUne combines three components:

  • Click performance — 45%: hit rate, reaction time, reaction-time variability, missed targets, and false alarms.
  • Eye movement — 35%: how closely the user’s estimated eye movement follows the orb’s circular path.
  • Optional EEG — 20%: engagement-related changes in beta, theta, alpha, and delta band power relative to a short personal baseline.

The resulting attention proxy is a training metric from 1–100. It is not an ADHD score, IQ score, or clinical measurement.

Relaxation Training

Relaxation Training removes the orb and reaction task. Instead, the user observes a single-channel EEG waveform while Gemini produces brief meditation cues and ElevenLabs reads them aloud.

The goal is not to force the EEG into a particular state. The user is encouraged to breathe slowly, observe the waveform gently, and avoid judging moment-to-moment changes.

Personalized coaching

AttUne uses Gemini as a concise focus and relaxation coach. During training, Gemini receives the current training estimate and generates one short, practical suggestion. Users can also ask questions or request support when they feel distracted.

Gemini is constrained to:

  • Remain warm and concise.
  • Provide no more than two sentences of guidance.
  • Avoid diagnosing ADHD.
  • Avoid medication recommendations.
  • Direct medication questions to a qualified clinician or pharmacist.

ElevenLabs converts this guidance into speech. AttUne manages the audio queue so instructions and coaching do not speak over one another.

Accounts and progress

Users can:

  • Create an account and edit their profile.
  • Review completed exercises and focus estimates.
  • View daily average attention over 7 days, 30 days, one year, or all time.
  • View the best score sustained for at least two seconds each day.
  • Compare eligible sessions lasting more than one minute through a global ranking.
  • Install AttUne on a phone as a Progressive Web App.

Solana completion proof

Users can connect a Phantom wallet and create an optional completion proof on Solana Devnet. The wallet signs a timestamped Memo transaction, which can be inspected through Solana Explorer.

No EEG, camera data, focus score, email, or health information is written to Solana. AttUne stores only the public wallet address in the user profile.

Hardware concept and current demo

Our long-term hardware concept is the AttUner, an affordable EEG wearable designed around a small number of accessible electrode locations, contact-quality checks, local processing, and wireless communication.

The custom AttUner has not yet been manufactured. Our current demonstration uses an OpenBCI Cyton + Daisy as the EEG acquisition system. OpenBCI GUI processes the signal and streams Band Power data to the local AttUne server over UDP.

A future AttUner could use four dry electrodes near F3, F4, P3, and P4, plus reference and ground electrodes. Reducing the channel count could lower cost and setup time, but this design must be validated for signal quality, comfort, motion artifacts, placement across different hair types, battery life, and reliability before being treated as a finished product.

How we built it

AttUne is a full-stack web application built with HTML, CSS, JavaScript, Node.js, Express, PostgreSQL, and browser-based machine learning.

We used Codex as a coding assistant to help scaffold features, debug integration problems, and explain unfamiliar tools. We reviewed and adapted the generated code to connect the user interface, signal-processing logic, APIs, database, and cloud deployment.

Eye-movement estimation

AttUne uses Google MediaPipe Face Landmarker in the browser. MediaPipe detects one face, both iris centers, eye corners, and eyelid landmarks.

Camera frames are processed locally. AttUne does not upload or store camera video.

For each eye \(e\), AttUne normalizes the iris position relative to the surrounding eye landmarks:

$$ g_{x,e} = \frac{ x_{\mathrm{iris}}- \frac{x_{\mathrm{edgeA}}+x_{\mathrm{edgeB}}}{2} }{ \left|x_{\mathrm{edgeA}}-x_{\mathrm{edgeB}}\right| } $$

$$ g_{y,e} = \frac{ y_{\mathrm{iris}}- \frac{y_{\mathrm{upper}}+y_{\mathrm{lower}}}{2} }{ \left|y_{\mathrm{upper}}-y_{\mathrm{lower}}\right| } $$

Here, \(g_{x,e}\) and \(g_{y,e}\) represent approximate horizontal and vertical movement for one eye. Dividing by the eye’s width or height reduces the effect of face size and camera distance.

AttUne averages both eyes:

$$ g_x = \frac{g_{x,\mathrm{left}}+g_{x,\mathrm{right}}}{2}, \qquad g_y = \frac{g_{y,\mathrm{left}}+g_{y,\mathrm{right}}}{2} $$

The expected position of the orbiting target is:

$$ o_x(t)=\cos(\theta_t), \qquad o_y(t)=\sin(\theta_t) $$

AttUne compares the measured eye movement with the expected orbital movement. It tests several short delays \(k\) because human smooth pursuit naturally trails a moving target:

$$ P = \max_k \left[ \frac{ \left|\operatorname{corr}(g_x(t+k),o_x(t))\right| + \left|\operatorname{corr}(g_y(t+k),o_y(t))\right| }{2} \right] $$

The pursuit value \(P\) approaches 1 when the movement patterns match and approaches 0 when they do not.

Eye-data quality increases only after enough valid frames have been collected:

$$ Q_{\mathrm{eye}} = \min\left(1,\frac{n-120}{180}\right) \min\left(1,\frac{P}{0.45}\right) $$

Here, \(n\) is the number of valid samples. This prevents a few early or unreliable frames from having full influence on the attention proxy.

This is a gaze-following estimate, not a calibrated measurement of the exact point the user is viewing.

Reaction-time evaluation

Reaction time is measured from the instant the orb turns red until the user presses the fixed response button:

$$ RT_i = t_{\mathrm{response},i}- t_{\mathrm{target},i} $$

AttUne evaluates:

  • Target hit rate
  • Median reaction time
  • Reaction-time variability
  • Lapse rate
  • False-alarm rate

Because these measurements use different units, each feature is standardized:

$$ z_k = \operatorname{clip} \left( d_k \frac{v_k-\mu_k}{\sigma_k}, -3, 3 \right) $$

In this equation:

  • \(v_k\) is the observed value.
  • \(\mu_k\) is the expected or personal baseline mean.
  • \(\sigma_k\) is the baseline standard deviation.
  • \(d_k=+1\) when higher is better, such as hit rate.
  • \(d_k=-1\) when lower is better, such as reaction time or false alarms.
  • Clipping between \(-3\) and \(3\) prevents a single extreme value from dominating the session.

In the current calibration, a reaction time near 700 milliseconds is centered near the middle of its individual reaction-time scale. The complete click component also considers accuracy, consistency, lapses, and false alarms.

EEG evaluation

AttUne receives processed Band Power values from OpenBCI GUI rather than calculating every frequency band directly from raw voltage samples.

It currently uses delta, theta, alpha, and beta power:

$$ R_{\mathrm{EEG}} =

\ln\left(\frac{\beta}{\theta}\right)

0.35\ln(\alpha)

0.15\ln(\delta) $$

A higher beta-to-theta ratio, reduced alpha, and reduced delta relative to the initial baseline increase this experimental engagement estimate.

The first 50 valid Band Power packets establish a local baseline:

$$ \mu_{\mathrm{EEG}} = \frac{1}{N} \sum_{i=1}^{N}R_i $$

$$ \sigma_{\mathrm{EEG}} = \sqrt{ \frac{1}{N} \sum_{i=1}^{N} (R_i-\mu_{\mathrm{EEG}})^2 } $$

Each later EEG value is compared with that baseline:

$$ z_{\mathrm{EEG}} = \operatorname{clip} \left( \frac{ R_{\mathrm{EEG}}-\mu_{\mathrm{EEG}} }{ \max(\sigma_{\mathrm{EEG}},0.15) }, -3, 3 \right) $$

The minimum denominator of \(0.15\) prevents very small baseline variation from exaggerating tiny signal changes.

The displayed EEG estimate is:

$$ A_{\mathrm{EEG}} = \operatorname{clip} \left( 50+25z_{\mathrm{EEG}}, 1, 100 \right) $$

A value near 50 means the current signal is near the session baseline. Values above or below 50 represent relative changes, not a universal measurement of attention.

Multimodal attention proxy

AttUne combines only the components that currently have usable data:

$$ S_{\mathrm{total}} = \frac{ w_{\mathrm{click}}S_{\mathrm{click}} + w_{\mathrm{eye}}S_{\mathrm{eye}} + w_{\mathrm{EEG}}S_{\mathrm{EEG}} }{ w_{\mathrm{click}}+ w_{\mathrm{eye}}+ w_{\mathrm{EEG}} } $$

The base weights are:

$$ w_{\mathrm{click}}=0.45Q_{\mathrm{click}}, \qquad w_{\mathrm{eye}}=0.35Q_{\mathrm{eye}}, \qquad w_{\mathrm{EEG}}=0.20Q_{\mathrm{EEG}} $$

The final training score is:

$$ \mathrm{Attention\ Proxy} = \operatorname{clip} \left( 50+25S_{\mathrm{total}}, 1, 100 \right) $$

Data-quality factors reduce the influence of components that are missing, still calibrating, or unreliable. Available component weights are renormalized, so the score can still operate without an EEG connection.

Backend and database

The Node.js/Express server keeps Gemini and ElevenLabs credentials out of the browser. Passwords are hashed with bcrypt, and authenticated sessions use secure HTTP-only cookies.

Tiger Data/PostgreSQL stores:

  • User accounts and public wallet addresses
  • Training sessions
  • Time-stamped attention readings
  • Completed-session averages
  • Exercise history and progress summaries

Raw camera video is never stored. The continuous raw EEG waveform used by Relaxation Training remains in memory rather than being written to the history database.

Cloud and mobile installation

We deployed AttUne on a Vultr Ubuntu server using Docker Compose. The deployment contains:

  • An AttUne Node.js container
  • A Caddy reverse-proxy container
  • Automatic HTTPS
  • A public installable Progressive Web App

HTTPS enables camera permission on supported mobile browsers. Android users can install AttUne from Chrome, while iPhone users can add it to the Home Screen through Safari.

Challenges we ran into

Combining signals with different units

Reaction time is measured in milliseconds, pursuit is a correlation, and EEG contains relative frequency-band power. Directly averaging these numbers would be meaningless. We standardized each component relative to a baseline and limited extreme values before combining them.

Browser-based eye tracking

Professional eye trackers use calibrated infrared hardware. We needed an accessible alternative using a normal webcam. MediaPipe provided iris landmarks, but lighting, glasses, camera position, head movement, and frame rate still affect accuracy.

Connecting local EEG to a hosted application

OpenBCI GUI sends UDP packets to 127.0.0.1, which only reaches the same computer. Our current EEG demonstration therefore runs AttUne and OpenBCI GUI locally. The Vultr-hosted mobile version cannot directly receive that local stream without a secure companion gateway.

Preventing overlapping speech

Introductory directions and adaptive coaching initially played simultaneously. We added audio state management so Gemini-generated guidance waits until the current ElevenLabs speech finishes.

Privacy and responsible language

Attention and ADHD are sensitive topics. We deliberately describe the output as a training proxy, avoid diagnostic claims, keep camera processing on-device, and prevent health information from being written to Solana.

Accomplishments that we’re proud of

  • Built a working multimodal attention-training experience.
  • Combined reaction behavior, webcam-based pursuit, and optional EEG.
  • Created separate attention and relaxation experiences.
  • Added Gemini coaching with ElevenLabs speech.
  • Added accounts, profiles, session history, progress charts, and rankings.
  • Connected Tiger Data/PostgreSQL for persistent storage.
  • Added a privacy-preserving Solana Devnet completion proof.
  • Deployed an HTTPS Progressive Web App on Vultr.
  • Designed the software so it remains usable when EEG is unavailable.

What we learned

We learned that collecting data is easier than deciding what the data means. Multimodal scoring requires normalization, reliability checks, and honest communication about uncertainty.

We also learned that consumer webcams can estimate eye movement patterns, but they should not be presented as equivalent to calibrated eye-tracking hardware. EEG creates similar responsibilities: electrode contact, artifacts, individual baselines, and signal quality matter as much as the scoring equation.

Finally, we learned how many layers are required to turn an experiment into a usable product: hardware integration, browser permissions, databases, authentication, AI safety constraints, mobile installation, cloud deployment, and privacy-conscious design.

Startup readiness

Initial users

AttUne’s initial users would be college students who want structured support for studying, deep work, and relaxation. A secondary customer could be university student-success or wellness programs seeking optional, non-diagnostic attention-training tools.

Go-to-market approach

Our initial strategy would be:

  1. Run small, consent-based student pilots.
  2. Partner with campus learning and accessibility organizations.
  3. Recruit student ambassadors to demonstrate the training experience.
  4. Measure retention, comfort, perceived usefulness, and training consistency.
  5. Use pilot results to improve calibration before expanding.

Business model

The proposed AttUner hardware could be sold near cost to reduce the barrier to entry. A subscription could support:

  • Personalized baselines
  • Long-term trend analysis
  • Guided training libraries
  • Progress reports
  • Secure multi-device synchronization

No medical or diagnostic subscription features would be offered without appropriate research, validation, privacy review, and regulatory guidance.

What’s next for AttUne

Our next technical priorities are:

  • Build a secure local EEG companion that sends processed features—not raw public UDP—from OpenBCI GUI to the authenticated cloud app.
  • Add an explicit eye-tracking calibration sequence.
  • Compensate for head motion and distinguish mirrored pursuit from correct directional pursuit.
  • Add channel-level EEG quality and artifact rejection.
  • Evaluate electrode placement and accessibility across different hair types.
  • Validate the scoring system with controlled repeated-session testing.
  • Replace placeholder population baselines with personal baselines after enough sessions.
  • Connect Snowflake for de-identified aggregate analytics.
  • Bind Solana proofs to verified completed-session identifiers.
  • Package the PWA as an Android application.
  • Conduct privacy, accessibility, and clinical-advisory reviews before making any health-related claims.

Technologies used

  • HTML, CSS, and JavaScript
  • Node.js and Express
  • MediaPipe Face Landmarker
  • OpenBCI Cyton + Daisy and OpenBCI GUI
  • Gemini
  • ElevenLabs
  • Tiger Data / PostgreSQL
  • Solana Devnet and Phantom
  • Vultr
  • Docker and Caddy
  • Codex

Built With

Share this project:

Updates

Submission history