Gabriel Ambrocio · Full-stack developer
In production Independent product · Case study

Northia —
under the hood

Northia is a personal productivity SaaS for tasks and reading, delivered through a web app, Telegram, offline-first native apps and an AI-assistant interface.

Visit northia.app
  • Built and run solo, in production
  • Role: Founder & Full-Stack Developer
Northia web dashboard: Home view with daily tasks, reading progress and the weekly reading queue
Web dashboardReact SPA
Northia Android app: Home view on a phone with daily tasks and reading
Android appExpo
Northia Windows desktop app: Home view with tasks and reading
Windows appElectron
01Architecture

One product, several clients

A Django service owns the data and domain rules. Web, Telegram, native clients and authorized AI assistants reach those capabilities through purpose-built interfaces.

Northia system architecture The React SPA calls the Django REST API. Android and Windows apps share a TypeScript core that works offline and syncs through the API. The Telegram bot runs on the same Django domain services and database. AI assistants connect through the MCP server with custom OAuth. The API integrates Paddle, Resend and Cloudflare R2; everything persists in PostgreSQL on Railway. CLIENTS OFFLINE CORE BACKEND · RAILWAY INTEGRATIONS sync Django ORM · same domain services React SPAWeb dashboard Android · ExpoOffline-first native app Windows · ElectronOffline-first desktop app Telegram botCommands + scheduled jobs AI assistantsUser-authorized access Shared TS core Domain logic · local dataSync queueConflict rules Android + Windows Django REST API Shared domain servicesTenant-scoped accessSync endpointsJWT + Google sign-in PostgreSQLPersistent product data MCP server + OAuthScoped tokens · consent PaddleSubscriptions · MoR ResendTransactional email Cloudflare R2App installers Northia system architecture (stacked) The React SPA calls the Django REST API. Android and Windows apps share a TypeScript core that works offline and syncs through the API. The Telegram bot runs on the same Django domain services and database. AI assistants connect through the MCP server with custom OAuth. The API integrates Paddle, Resend and Cloudflare R2; everything persists in PostgreSQL on Railway. CLIENTS BACKEND · RAILWAY INTEGRATIONS CLIENTS sync Django ORM React SPAWeb AndroidExpo WindowsElectron Telegram botCommands + jobs AI assistantsUser-authorized Shared TS coreLocal data · sync queue · conflicts Django REST API Shared domain servicesTenant-scoped accessSync endpointsJWT + Google sign-in PostgreSQLPersistent product data MCP + OAuthScoped tokens PaddleSubscriptions ResendEmail Cloudflare R2Installers
  • Online requests
  • Offline work & sync
  • Data access

Offline work. Native clients keep a local working copy and send queued changes to the API when connectivity returns.

02Engineering decisions

Four decisions that shaped the system

The design favors predictable behavior across clients and explicit boundaries around user data.

01Offline sync

Offline work without a second product logic

Problem
Native clients should stay useful without a network, while the server remains authoritative when changes sync.
Approach
Keep a local replica and operation queue, apply domain operations locally, then push them through the API; pull changed rows with a cursor and idempotent upserts. A shared TypeScript core powers Android and Windows.
Result
Core task and reading workflows work offline and reconcile through a documented sync contract when the connection returns.
02Cross-language parity

Keep Python and TypeScript behavior in parity

Problem
The backend and offline clients implement overlapping rules, so subtle drift could produce different outcomes online and offline.
Approach
Export golden cases from the Python implementation and run them against the TypeScript core, including function-level examples and simulated API scenarios.
Result
Shared behavior is checked against concrete backend outputs as the core evolves.
03AI access · OAuth

Put a permission boundary around AI access

Problem
AI assistants need useful access to a person’s data without inheriting broad account credentials.
Approach
Built an OAuth authorization-code flow with PKCE, explicit consent, rotating refresh tokens, revocation and user-scoped tools. Destructive access is constrained; tool calls validate current subscription status.
Result
Assistants connect as individually authorized clients, with connections visible and revocable in account settings.
04Payments

Delegate subscription commerce

Problem
Subscription payments introduce tax and payment operations beyond the core product.
Approach
Use Paddle as Merchant of Record, with webhook events driving subscription state and idempotent handling for repeated delivery.
Result
Northia can offer paid subscriptions while Paddle handles the merchant-of-record role.
03Quality and operations

Maintained as a live service

Checks and release steps span the API, web and native clients.

A

Tests at each layer

Backend pytest covers domain services and API behavior; the React app uses Vitest, Testing Library and Playwright; the TypeScript core and Windows app have their own tests and type checks. Python-generated goldens check cross-language parity.

B

Local CI and staged releases

GitHub Actions runs backend checks on pushes and pull requests to staging and main. Services are deployed per environment on Railway; changes move from local development to staging, then production.

C

Production safeguards

Production settings enforce secure cookies, HTTPS and security headers. A guard blocks local development commands from accidentally targeting a remote database. Destructive test tools are disabled in production.

D

Incident response

After Railway disclosed a platform credential exposure incident in October 2026, affected provider credentials and tokens were treated as exposed and rotated at their source. No credential values or account details belong in this case study.

Backend

  • Python
  • Django
  • Django REST Framework
  • PostgreSQL

Clients

  • React
  • TypeScript
  • Expo
  • React Native
  • Electron

Integrations

  • Telegram Bot API
  • MCP
  • OAuth 2.0 + PKCE
  • Paddle
  • Resend
  • Cloudflare R2

Ops & testing

  • Railway
  • GitHub Actions
  • pytest
  • Vitest
  • Playwright

Built end to end, and still evolving.

Northia is an independent product, designed, built and operated by Gabriel Ambrocio. For a conversation about the engineering: