NeRN

Build notes · December 2026

How NeRN is built

NeRN is a family app for Ukrainians split by a border: a student in Warsaw, parents in Lviv. Each person shows one word about their energy, from a 60-second reaction test or a word they pick. This page is the long version: the research behind the test, the rule that decides what family sees, the database that enforces it, and what changed since the first version on 23 September 2026.

screens in the app
25+
lines of TypeScript
13,000+
automated tests
100+
database migrations
8
languages, every screen
2
visual worlds with their own mascot
10

Counted from the app’s code on 3 December 2026.

01

Why one word

In families split by a border, the daily “how are you?” call does two jobs at once: it checks that a person is fine, and it tries to be a conversation. It often fails at both — it comes during a lecture or a shift, the answer is “fine”, and the call that actually matters, the long one about life, gets pushed out.

NeRN splits those two jobs. The check is one word, visible all day. The conversation happens when the person has said it’s a good time, shown in both time zones. Mum sees “An ordinary day” and doesn’t have to call to check.

02

The test comes from sleep research

The 60-second test is a short form of the psychomotor vigilance test (PVT): the screen flashes at random moments and you tap as fast as you can. Sleep labs have used it for decades because it barely depends on practice and reacts to tiredness and sleep loss. NeRN follows the brief version validated by Basner et al. (2011).

Parameters of the two tests in the app
Daily Weekly (PVT-B)
Length 60 s 180 s
Pause before a flash 1–4 s, random 2–5 s, random
Lapse reaction ≥ 355 ms reaction ≥ 355 ms
False start reaction < 100 ms reaction < 100 ms
Counts if ≥ 10 valid reactions ≥ 30 valid reactions

Measuring milliseconds on a phone

A reaction test is only as honest as its clock. The moment of the flash is taken from the UI thread when the frame is drawn, and the touch from the native event’s own timestamp, not from when the code got round to it. If the timing can’t be trusted — frames drop, or the app goes to the background — the session is kept but marked, and it never enters your normal.

The honest limit

A short test is noisy. Even the 3-minute version does not always agree with the full 10-minute one in later studies, and 60 seconds is noisier still. So NeRN never draws a conclusion about a person from one session: the word comes from comparing today with many of your own days, and a single slow morning can’t turn into bad news for your family.

03

The rule: compared only with yourself

People differ a lot in raw reaction time, so comparing anyone with an average would mostly measure who they are, not how they are today. NeRN builds a personal normal on each phone and asks one question: is today unusual for you?

  1. Speed, not time. Each session gives a speed: the mean of 1000 / reaction time. In the PVT literature this is the measure most sensitive to sleep loss (Basner & Dinges, 2011).
  2. Your normal. The median speed of your last 20 valid sessions on this phone, from the past 60 days. It needs at least 5, so the first five tests calibrate.
  3. Your spread. 1.4826 × the median absolute deviation, a version of the standard deviation that one strange day can’t drag around. Never smaller than one frame at 60 Hz (17 ms): a screen can’t show a smaller change, so it is never called a change.
  4. Today. How many spreads today’s speed is above or below your normal.

Try the rule

Twenty example days and today. Move today and see what your family would see.

Only you see

+0.3 spreads

Your family sees

An ordinary day Energy as usual.

Within one spread of your normal.

Better nothing than untruth

When today is a lot slower than usual, the test does not tell your family “Low on energy”. They see only “In touch”. A slow morning can be a cold, a bad night or a cracked screen, and a wrong worrying word costs a family more than no word at all. “Low on energy” exists, but only as a word you pick yourself. “Full of energy” needs two things at once: clearly faster and no more lapses than usual.

04

Who can read what is decided by the database

Privacy rules that live only in the app can be skipped by anyone who talks to the server directly. In NeRN the server enforces them itself.

  1. Your phone

    Expo · React Native, iOS and Android

    • The test engine in plain TypeScript, no UI code inside
    • Milliseconds and trends stay with you
    • “I’m OK” waits offline and sends itself later
  2. Server in the EU

    Supabase · Postgres

    • Row-level security: each table lets you read only your own rows
    • Every write goes through a database function
    • status_for() decides what each relative may see
  3. Mum’s phone

    One word

    • No numbers, ever
    • Nothing you hid from her, and no sign that something is hidden

The same rule, written twice and checked against itself

What a relative sees is decided in two places: in the app, to draw the screen, and in the database, to guard the data. One shared list of cases feeds the tests of both, and the tests fail if the two ever disagree.

Tests against a real Postgres

The access tests run the real migrations in Postgres compiled to WebAssembly, then log in as different family members and try to read what they shouldn’t. Any new table needs its access rules and a test before it ships. Deleting an account removes the login too.

05

Safety without fear

Many of these families live with air-raid alerts. The app had to help on the bad days without becoming another source of alarm.

When it goes quiet
After 24 hours, a reminder to you only. After the window you choose — 36, 48 or 72 hours — one calm message to family with your battery level and when you were last online. Those details exist only after the window; you can read the text in advance or turn it off.
Air-raid alerts
You pick your region by hand; the app never asks for location. After the all-clear, one tap tells family “I’m home, all good”.
Safety is never paid
“In touch”, alerts care, hugs, calling, pause, export and deleting data are free forever. During an alert and for a day after, the app shows no payment offers.
The private AI diary
For adults only. Family never sees a word of it, and the AI can only suggest a status from the closed list of eight, which you confirm yourself. If a message looks like a crisis, the reply with help contacts is written in advance and does not go through the model.

06

What I decided not to build

Most of the design of NeRN is a list of things it refuses to do. Each one was easy to add and would have made the app feel more powerful.

Location

Students abroad are tired of apps their parents install to watch them. Location is what breaks that trust fastest, and other apps already do it.

Mood and emotions

Energy can be measured and is easy to share. Feelings shown to parents every day turn into a duty to perform them.

Numbers for family

“412 ms” or “slept 5 h 12 min” invites worry and interrogation. Family gets a word; the numbers are yours.

Free-text status

Eight fixed words answer only two questions: is everything all right, and is today a day to talk. Nothing else can leak through.

Streaks and timers

A missed day sends nothing to anyone. Guilt is not a reason to open a family app.

A loud alarm on your phone

Cut in the November safety review: easy to misuse, frightening to receive. Instead you can name one person who may wake you, at most once every 6 hours, and you see when they did.

07

Ten weeks, three versions

  1. Version 1: a reaction test on the web. An installable web app with the PVT engine, Ukrainian and English, offline mode, a strict security policy and tests running on every change.
  2. Version 2: one word straight away. An instant result in one word, a challenge for friends, an anonymous average for Ukraine.
  3. Version 3: the turn to families. The test stayed; the question changed from “how sharp am I?” to “how is my family?”. Rebuilt as a native iOS and Android app with a server in the EU: the core, the personal normal and the database schema.
  4. Everything from the concept. Five tabs, parents’ mode with large text, call times across time zones, important days, alerts care, photos of the day, plans.
  5. Worlds and the private AI. Ten visual worlds, each with its own mascot drawn in code; the AI diary and the energy planner.
  6. The site, from scratch. A waitlist page where the proof is the product itself: the live test, the tiles, the two phones.
  7. A safety review, ten changes. You choose the silence window; details of a silence appear only after it; the loud alarm was removed; the AI became 18+ with crisis replies that bypass the model.
  8. This page, and the site in English.

08

Not done yet

Today NeRN runs on test phones through Expo Go. These parts need a full store build and developer accounts, so they come with the beta:

  • Builds for TestFlight and Google Play internal testing
  • Push notifications: hugs, quiet-time messages, alerts
  • Real subscriptions in the App Store and Google Play
  • Sleep and steps from Apple Health and Health Connect
  • A home-screen widget

Who makes NeRN

NeRN is a one-person project by Dinara: the idea, the research, the product rules, the design and the build.

The code is written with Claude Code as a pair programmer. What NeRN shows, what it never shows, and why, are my decisions.