Server

Introduction

Understand how OpenSya orchestrates the NestJS backend runtime.

Nest Runtime

The backend runtime of OpenSya is powered by NestJS and orchestrated through filesystem conventions, runtime discovery and generated typings.

Instead of manually configuring controllers, services, modules or providers, OpenSya continuously discovers and orchestrates the backend application automatically.

NestJS is the engine. OpenSya is the orchestration layer.

Philosophy

OpenSya does not replace NestJS.

It extends and orchestrates NestJS through conventions and runtime orchestration.

This allows developers to benefit from:

  • The NestJS ecosystem
  • Dependency injection
  • Scalable backend architecture
  • Modular development
  • Strong TypeScript support

while drastically reducing repetitive backend wiring and configuration.

Runtime Responsibilities

The OpenSya runtime automatically handles:

  • Route discovery
  • Service registration
  • Database model loading
  • Plugin initialization
  • Guard registration
  • Runtime bootstrapping
  • Type generation

Developers focus on business logic while OpenSya handles runtime orchestration.

Filesystem Structure

The backend runtime is organized around filesystem conventions.

Backend Structure
server/
├── controllers/
├── services/
├── database/
│   ├── models/
│   └── plugins/
├── guards/
└── locales/

Each directory has a predefined runtime responsibility automatically understood by OpenSya.

Runtime Discovery

OpenSya continuously scans the backend filesystem to discover runtime definitions.

Examples:

DirectoryRuntime Responsibility
server/controllersHTTP route discovery
server/servicesBusiness service registration
server/database/modelsDatabase model discovery
server/database/pluginsDatabase plugin loading
server/guardsAccess control registration

The runtime transforms these discovered definitions into a fully orchestrated NestJS application.

Runtime Generation

OpenSya automatically generates and executes the backend runtime.

The generated runtime is placed inside:

.opensya
.opensya/server

During development and production startup, OpenSya:

  1. Discovers the filesystem structure
  2. Generates the backend runtime
  3. Registers runtime definitions
  4. Bootstraps the NestJS application
  5. Executes the generated runtime automatically
Runtime Lifecycle
Filesystem Discovery
Runtime Generation
NestJS Orchestration
Application Bootstrap
Runtime Execution

The generated backend runtime is fully managed by OpenSya and should not be edited manually. ::

Why OpenSya + NestJS?

OpenSya leverages the power of NestJS while reducing configuration complexity through conventions and runtime orchestration.

This provides:

Convention Driven

Organize backend applications through filesystem conventions.

Runtime Orchestration

Automatically discover and orchestrate backend runtime definitions.

Generated Typings

Generate strong typings automatically from discovered runtime structures.

Scalable Architecture

Build modular and scalable recruitment infrastructures.

Philosophy

OpenSya is not a NestJS boilerplate.

It is a runtime architecture layer designed to orchestrate scalable backend infrastructures through conventions, runtime discovery and generated typings.

This allows teams to build modern recruitment and business platforms with less configuration and more consistency.