Architecture overview
Explore Niqat architecture: merchant, operator, and control-plane boundaries, local database ownership, dependency direction, and safe extension surfaces.
Niqat’s governing architecture separates merchant operations, platform support, and the control plane. The merchant surface is one offline application with a cashier workspace and a permissioned back office.
Application boundaries
| Surface | Responsibility |
|---|---|
merchant_app |
Windows and Android merchant operations over a local database |
operator_console |
Platform support, licensing, billing, audit, and health |
control_plane_api |
Identity integration, memberships, provisioning, and cloud administration |
The control plane is not the ordinary business-data replication transport. Do not design a merchant integration by assuming every local operation has a matching public HTTP endpoint.
Dependency direction
platform_contracts + primitives + turso_dart
↓
core_db
↓
domain feature packages
↓
application shells
The maintained Turso bridge contains no tenant policy. core_db owns schema, migrations, connection lifecycle, backup, restore, and recovery. Feature packages own their domain entities and services. The core database package must not import a feature package.
One company boundary
One tenant represents one legal company. A global identity can hold separate memberships in multiple tenants. Roles, capabilities, and branch or warehouse assignments belong to the membership.
An installation identifies a licensed local database and supports audit and recovery. It is not an authority source for staff permissions.
Extension boundaries
Portable configuration is validated data. Import, preview, and activation remain separate authorized operations. Future clients must call the same domain commands rather than mutate database tables directly.
Build Niqat Apps through the supported integration boundaries. Store distribution is coming soon. Use release-specific integration documentation for concrete endpoints and authentication.
Source references
This overview is derived from docs/architecture-overview.md, docs/product-direction.md, and packages/platform_contracts/README.md in the Niqat workspace. Read the source revision that matches the application under review.