APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Application Contexts

APPNETOS structures application execution into distinct contexts. Each context builds on a corresponding shared Base context, allowing applications to implement their own behavior while retaining consistent runtime conventions and context-specific security controls.

Context architecture

A context defines the execution area and responsibilities of an application. APPNETOS uses distinct contexts so public-facing functionality, administrative functionality, APIs, and background processing can follow appropriate runtime and security rules while relying on the same Shared Core.

An application only needs to implement the contexts it actually uses. The presence of a context type in APPNETOS does not mean every application must expose it.

Base contexts and application implementations

The Shared Core provides corresponding Base context classes. An application-specific context class extends its relevant Base class, inheriting the shared structural contract while providing its own configuration and behavior.

Conceptually, the relationship is Shared Base context → application-specific context implementation. The Base context is not a second independently running application; it is the common implementation foundation for that context type.

APPNETOS architecture diagram showing the shared core, application contexts, independent applications, and infrastructure
APPNETOS shared runtime architecture and application infrastructure.

Available execution contexts

Context Primary responsibility
app Public-facing application execution and user interactions.
admin Administrative interfaces and privileged management operations.
rest Application REST endpoints and machine-readable responses.
admin-rest Administrative REST endpoints with dedicated security requirements.
worker Background processing, scheduled work, and queue-oriented execution.

Command-line operations also form part of the wider APPNETOS execution model. Their exact entry points and relationship to the implemented context classes should be covered with the relevant CLI and Runtime Lifecycle documentation rather than assumed to be identical to HTTP contexts.

Security and data access

Context separation allows APPNETOS to apply different security policies to different execution areas. In particular, public application functionality and administrative functionality are treated as separate areas, and REST endpoints can have security requirements distinct from browser-facing pages.

Context-aware access controls can restrict which operations and data are available through a particular context. However, application-level permissions and database-level credentials are separate boundaries: a MongoDB connection is not automatically restricted merely because code runs in a particular context.

Effective isolation depends on the implemented authorization checks, configured connections, database privileges, and deployment setup. See Application Isolation for the broader security model.

Context-specific configuration and optional features

Applications may configure contexts independently and initialize only the capabilities needed for their intended use. For example, an application without multilingual content does not need to adopt the same language handling as a multilingual site, and a service without automatic URI-based routing can implement its own request resolution.

The exact consequences of omitting particular documents or components are documented with the relevant Core Components and Development guides. This page establishes the architectural distinction rather than prescribing a single implementation.

Why the Base contexts matter

  • Consistency: related contexts follow shared runtime conventions.
  • Separation: public, administrative, API, and worker responsibilities remain distinguishable.
  • Extensibility: applications specialize the relevant Base context without duplicating its entire foundation.
  • Maintainability: shared behavior can evolve in the Core while application-specific behavior stays in its own context.

Next Steps

Previous

Shared Core

Explore Shared Core

Next

Runtime Lifecycle

Explore Runtime Lifecycle