serinus-modules-controllers-routes

Organize Serinus projects into modules, controllers, and REST routes.

108|11|Updated Jan 25, 2023
One-click install
npx skills add https://github.com/francescovallone/serinus --skill serinus-modules-controllers-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serinus-modules-controllers-routes
Source: https://github.com/francescovallone/serinus/tree/main/packages/serinus/skills/serinus-modules-controllers-routes
Command: npx skills add https://github.com/francescovallone/serinus --skill serinus-modules-controllers-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams enforce a clean, scalable modular structure in Serinus projects by guiding module organization, controller placement, and route registration patterns.

Core Features & Use Cases

  • Model each feature as a Module with explicit controllers, providers, and imports.
  • Register endpoints in Controllers using on(...) and onStatic(...), with route prefixes derived from the controller path.
  • Enforce unique per-controller route definitions and proper typed RequestContext usage for params, query, and body.
  • Use the provided references to align with official docs and maintain consistency when refactoring modules, controllers, and routes.

Quick Start

Create a new Serinus module with a matching controller and register routes using on(...) to demonstrate the modular pattern.

Frequently Asked Questions about serinus-modules-controllers-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize a Serinus project using a modular architecture?

To organize a Serinus project using a modular architecture, model each feature as a dedicated module with explicit controllers, providers, and imports. This structure enforces scalable module composition and clean separation of concerns across your application.

How do I register REST routes in Serinus controllers?

Register REST routes in Serinus controllers by using the on(...) and onStatic(...) methods. Route prefixes are automatically derived from the controller's defined path, ensuring proper endpoint registration and maintaining route uniqueness per controller.

What is RequestContext used for in Serinus controllers?

RequestContext in Serinus controllers is used to properly handle typed request data such as params, query strings, and body. Using typed RequestContext ensures correct data parsing and validation when processing incoming HTTP requests.

What's the best way to refactor feature modules in a Serinus application?

The best way to refactor feature modules in a Serinus application is to align with official documentation references and enforce unique per-controller route definitions. This maintains consistency when modifying module composition, controllers, and REST routes.

Can I define multiple routes with the same path in a single Serinus controller?

Defining multiple identical routes in a single Serinus controller is not supported due to enforced route uniqueness. This constraint prevents endpoint conflicts and ensures reliable request mapping when registering routes using on(...).