Runtime
Runtime
At the core of OpenSya lies a convention-driven runtime system responsible for discovering, orchestrating and bootstrapping applications automatically.
The runtime is designed to minimize manual configuration while keeping applications modular and scalable.
Runtime Philosophy
OpenSya relies on runtime orchestration instead of boilerplate generation.
Rather than generating static code templates, the runtime continuously discovers and orchestrates the application from the filesystem structure.
This includes:
- Controllers
- Services
- Database models
- Plugins
- Guards
- Runtime hooks
- Generated typings
Backend Runtime
The backend runtime is powered by NestJS and heavily orchestrated by OpenSya.
server/
├── controllers/
├── services/
├── database/
├── guards/
└── locales/
OpenSya automatically:
- Discovers routes
- Registers services
- Loads database models
- Initializes plugins
- Registers guards
- Generates typings
- Bootstraps the NestJS application
Developers focus on business logic while OpenSya handles runtime orchestration.
Runtime Discovery
The backend runtime continuously scans the filesystem to discover application definitions.
Examples:
| Directory | Runtime Responsibility |
|---|---|
server/controllers | HTTP route discovery |
server/services | Business service registration |
server/database/models | Database model discovery |
server/database/plugins | Database plugin loading |
server/guards | Access control registration |
The runtime transforms these discovered definitions into a fully orchestrated NestJS application.
Frontend Runtime
The frontend runtime is powered by Nuxt.
Unlike the backend runtime, most frontend orchestration is already handled natively by Nuxt itself.
client/
├── pages/
├── components/
└── plugins/
Nuxt already provides:
- File-based routing
- Component auto-imports
- Plugin loading
- Runtime orchestration
- Module ecosystem
- Frontend build system
Because of this, OpenSya intentionally keeps the frontend runtime lightweight.
OpenSya only adds a thin layer of shared conventions and runtime integrations on top of Nuxt.
This includes:
- Shared runtime conventions
- Shared typings
- Runtime integrations
- OpenSya-specific configuration
- Fullstack interoperability
Runtime Lifecycle
The backend runtime generally follows this lifecycle:
Filesystem Discovery
↓
Runtime Registration
↓
Plugin Initialization
↓
Type Generation
↓
Application Bootstrap
↓
Runtime Execution
This orchestration process happens automatically during application startup.
Generated Typings
Generated typings are deeply integrated into the runtime system.
The runtime uses discovered filesystem definitions to generate strongly typed contracts across the application.
This provides:
- Strong type safety
- Shared runtime contracts
- Better IDE autocompletion
- Consistent developer experience
Runtime Goals
The OpenSya runtime is designed around four main goals:
Convention Driven
Reduce configuration complexity through filesystem conventions.
Modular
Keep applications modular and independently scalable.
Typed
Generate strong typings automatically from runtime definitions.
Fullstack
Create a unified backend and frontend developer experience.
Philosophy
OpenSya does not try to replace NestJS or Nuxt.
Instead, it orchestrates and extends them through conventions, runtime discovery and generated typings.
This allows OpenSya to provide a scalable infrastructure layer for modern recruitment and business platforms while still benefiting from the ecosystems of both frameworks.