Decorators Overview
Oidis uses TypeScript decorators to define models, expose APIs, map routes, and compose classes. Each decorator has a dedicated reference page.
Pages in This Section
| Decorator | Purpose |
|---|---|
| @Entity & @Property | Map TypeScript classes to MongoDB collections and define model fields with types, defaults, and validation |
| @Extern | Expose backend methods as remotely callable LCP endpoints for frontend connectors |
| @Route | Define REST API endpoints with typed parameters for HTTP access |
| @Resolver | Map URL paths to controller classes for hash-based routing |
| @Partial | TypeScript mixin pattern for composing classes from multiple sources at runtime |
When to Use Which
- Building a data model? →
@Entity+@Property - Frontend needs to call a backend method? →
@Extern - External system needs an HTTP API? →
@Route - Mapping a URL to a page/panel? →
@Resolver - Splitting a large class across files or packages? →
@Partial
See also: Models Overview | LCP & RPC | Routing