# Why NanoReash Subsystems Don't Use API Calling as Their Core Architecture
API-first architecture has become common in modern software development, but it isn't the best solution for every application.
NanoReash subsystems are built differently. Their core business logic executes locally within each subsystem, while APIs are reserved for communicating with external services. This keeps the system fast, predictable, and entirely in control of its own data.
## The Core Principle
Each subsystem owns its own truth.
Invoices, documents, members, subscriptions, activities, branding, permissions, and configuration all exist within one authoritative subsystem. Instead of repeatedly requesting this information through internal APIs, NanoReash executes the required business logic directly.
A typical API-first workflow looks like this:
**UI → API → Authentication → Routing → Business Logic → Database → Response**
A NanoReash subsystem performs the same task more directly:
**User Action → Business Logic → Document Update → Response**
By removing unnecessary request layers, the system becomes simpler and more reliable.
## Why This Works Better
### Faster Performance
Local business logic executes immediately without HTTP requests, serialization, authentication, or response parsing.
### One Source of Truth
Business rules exist once and are used everywhere, ensuring invoices, payments, reports, emails, PDFs, and activity logs always remain consistent.
### Fewer Failure Points
Without internal API calls there are no network timeouts, CORS issues, authentication failures, or partial responses interrupting normal workflows.
### Simpler Deployment
Each subsystem is self-contained. It can be installed, backed up, restored, or moved to another server without deploying additional internal services.
### Easier Maintenance
Every workflow follows a single execution path, making debugging, testing, and long-term maintenance considerably simpler.
## Where APIs Belong
NanoReash still uses APIs whenever a subsystem communicates with systems outside the platform, including:
* Payment gateways
* Email providers
* SMS services
* Tax and VAT services
* Currency exchange rates
* Shipping providers
* Accounting platforms
* AI services
External communication is exactly what APIs are designed for.
## The Trade-Off
A distributed API architecture can make sense for very large organisations running hundreds of independent services.
NanoReash has different priorities:
* Deterministic execution
* Single source of truth
* Self-hosting
* Minimal dependencies
* Predictable behaviour
* Long-term maintainability
For document-driven business applications such as InvoiSys, keeping the core workflows inside each subsystem provides a cleaner, faster, and more dependable architecture while still allowing external APIs wherever they add real value.
The philosophy is simple:
**Keep each subsystem's intelligence inside the subsystem. Use APIs only when communicating with the outside world.**
Copyright © - NR - Web Operating System 中 控 网 | ... | NR