Skip to content

Architecture Overview

Ikamet OS is operational lifecycle infrastructure for expatriates in Türkiye. This document covers the high-level system design.

Design principles

Workflow-first. Every screen, every API endpoint, every database model exists to move a workflow forward or make its state visible.

Timeline-first. Every meaningful action writes a TimelineEvent. The timeline is the single source of truth for what happened, when, and who did it.

Provider abstraction. Frontend applications never call provider APIs directly. All provider interactions go through the adapter layer in app-api.

Public ID everywhere. No raw database integer IDs are exposed in URLs, APIs, or UI. All entities use prefixed public IDs (cus_xxx, ord_xxx, etc.).

Domain hierarchy

Authority / Acquisition

DomainRepoPurpose
ikamet.comsite-ikametImmigration authority, SEO/AEO
ikametsigorta.comsite-ikametsigortaInsurance authority, quote funnels
ikametstaff.comsite-ikametstaffEmployer/candidate onboarding

Customer Application

DomainRepoPurpose
app.ikamet.comapp-webIntake, uploads, checkout, portal

Operations

DomainRepoPurpose
ops.ikamet.comapp-adminWorkflows, renewals, communications

Orchestration

DomainRepoPurpose
api.ikamet.comapp-apiProviders, queues, automations, AI

Documentation

DomainRepoPurpose
docs.ikamet.comdocs-ikametThis site

Stack

LayerTechnology
Frontend (ops + web)Next.js 14 · TypeScript · TailwindCSS · React Query · shadcn/ui
Authority sitesAstro · TailwindCSS · Cloudflare Pages
BackendNode.js · Express · Prisma · PostgreSQL
DatabasePostgreSQL (DigitalOcean managed)
DeploymentCloudflare Pages (frontends) · DigitalOcean (backend)
MessagingWhatsApp Cloud API · SendGrid · Twilio
PaymentsStripe · Wise
AIOpenAI · Claude