Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
Instruction file imported from EmperorRAG/my-projects-monorepo (.github/instructions/nestjs/nestjs-controllers-services.instructions.md). Copyright stays with the author.
NestJS Controllers & Services
Controllers
Keep controllers thin: accept requests, trigger validation, and delegate to services for business logic.
Apply guards, interceptors, and pipes at the route or controller level to keep behavior explicit.
Return DTOs or domain objects rather than raw database entities when responses need shaping.
Services
Implement core business logic inside services marked @Injectable() and use constructor injection for dependencies.
Handle side effects (persistence, messaging, emails) within services and surface meaningful errors for filters to translate.
Split large services into focused units to keep responsibilities narrow and testable.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/emperorrag-my-projects-monorepo-nestjs-controllers-servi-325965/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.