← All work

Parental control app

Safy ParentSafy KidSafy

Safy Parent · Safy Kid

A parental control app for a child’s phone — Safy Parent and Safy Kid. At Webase I build its backend: location, safe zones, app limits and SOS.

Safy KidSafy Parent.NET 10 APIPostgreSQLRedislocation · SOS · usageSignalR · FCM
Period
2026 — Now
Status
Production
Mobile apps
2
Backend services
3
Platforms
2

My contribution

  1. 01

    Backend for the Safy Parent and Safy Kid apps and the admin panel: a mobile API, an admin API and a background jobs service.

  2. 02

    Sign-in by phone number (SMS code), Google, Apple and Telegram, with JWT access/refresh tokens.

  3. 03

    Pairing a child’s device by QR or a 6-digit code, delivered in real time over SignalR.

  4. 04

    Location and movement history, safe zones, push notifications for SOS and zone events (Firebase Cloud Messaging).

  5. 05

    Screen time and app limits: counting the day’s usage and locking at the limit.

  6. 06

    Moving the PostgreSQL schema to Liquibase, unit and integration tests, CI deploys to staging.

Stack

  • C#
  • .NET 10
  • ASP.NET Core
  • PostgreSQL
  • Redis
  • SignalR
  • Firebase Cloud Messaging
  • Liquibase
  • Docker

(03) — Product

Two apps, one backend.

Safy is a parental control service for a child’s phone. The parent installs Safy Parent, the child gets Safy Kid, and the two are linked in a few seconds by a QR or a 6-digit code.

From then on the parent sees where the child is and where they have been, sets safe zones, limits screen time and individual apps, and can lock the phone remotely. The child can send an SOS or a “Pick me up” signal with one tap.

I build the backend of this service. The main principle is simple: the backend stores a rule and delivers it, and the phone itself enforces it — even while it is offline.

(04) — How it works

How a rule travels from the parent to the phone.

  1. 01

    Pairing

    Safy Kid shows a QR and a 6-digit code. The code changes every 30 seconds and is kept on the server only as a hash. The moment the parent enters it, both apps are told over SignalR.

  2. 02

    The rule

    The parent sets a limit or locks the phone. The backend first writes that intent to the database, then sends the device a push (Firebase Cloud Messaging).

  3. 03

    Enforcement

    The phone enforces the rule itself. If the push never arrives, the app asks for the current state on its next sync, so a rule is not lost on the way.

  4. 04

    The report back

    The phone reports what actually happened: locked, app blocked, limit reached. The parent sees two things side by side — the rule they set and the real state of the device.

  5. 05

    Tracking

    Safy Kid sends locations in batches: coordinates, accuracy, time and battery level. The phone itself detects entering or leaving a safe zone, and the backend delivers the notification in the parent’s language.

(05) — Architecture

Three services, clean layers.

The backend is written in .NET 10 along Clean Architecture lines. Outside systems — SMS, push, file storage, cache — sit behind interfaces, each with a do-nothing default. That is why the business logic can be tested without Firebase and without SignalR.

  • Mobile API

    The REST API for both apps and the SignalR hub used for pairing.

  • Admin API

    A separate service for the admin panel: users and devices, translations, app versions, the audit log.

  • Background jobs

    Scheduled work. Even with several copies of the service running, only one of them runs a job, which a lease row in the database guarantees.

  • Data

    PostgreSQL is the main store, with the schema owned by Liquibase. Redis is the cache and the SignalR backplane. Files live in object storage.

(06) — Hard parts

Problems that only looked small.

  • 119 of 120 minutes

    The phone locked at the limit while the parent saw 119/120. Each app’s time was rounded on its own and the error added up. Time is now stored in milliseconds and the day’s total is rounded once, the same way the phone does it.

  • When a day begins

    Every timestamp is stored in UTC, but “today” is worked out in the time zone of the child’s phone: a screen-time day starts at their local midnight. A day’s total that is sent again overwrites the old one, so a retry cannot break the count.

  • A phone that changes hands

    A phone that reconnected used to get an empty profile. Now a disconnected profile comes back with its history, and when a phone is handed to another child the history stays with its previous owner.

  • Every text in the reader’s language

    Translations live in the database rather than in code, and are cached; a notification is written in the language of whoever receives it. A key used in code but missing from the database fails a test.

  • Who owns the schema

    I moved the schema from EF migrations to Liquibase, with the baseline taken from the live database. The app no longer runs DDL, and at start-up it checks the model against the schema for drift.

  • A cache that may fail

    Redis is an accelerator, not the source of truth. A cache failure never fails a request: the data is read from the database instead.

(07) — Quality

Seeing a failure before the user does.

Business logic is covered by unit tests and the API by integration tests, which take device pairing from start to finish through a real SignalR client. Load tests (k6) simulate an ordinary day for up to a thousand families.

Errors from the running system arrive in Telegram, with duplicates merged and sensitive fields masked. CI builds and ships only the services that changed.