nodefony-framework-dev

Guides backend development of the Nodefony core, HTTP pipeline, framework, and ORM modules.

Updated Dec 19, 2023
One-click install
npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-framework-dev-nodefony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodefony-framework-dev
Source: https://github.com/nodefony/nodefony-core/tree/main/.claude/skills/nodefony-framework-dev
Command: npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-framework-dev-nodefony

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Editing the Nodefony backend core without full context leads to memory leaks, blocking event-loop code, broken DI wiring, and contract drift between backend and frontend. This Skill loads the verified rules, recipes, and API references before the first backend code modification, so changes respect performance budgets, TypeScript strictness, and structural conventions. ## Core Features & Use Cases - Absolute rules enforcement: lazy allocation, listener cleanup, zero synchronous I/O in the pipeline, ALS binding for deferred listeners, and mandatory memory-suite gates before committing pipeline changes. - Verified recipes and API references: on-demand references/ files covering core (Service, Container, Kernel, CLI commands), HTTP pipeline (Context, sessions, TLS), framework (Router, Controller, decorators, admin data plane), ORM, pagination contracts, and realtime. - Full-stack contract coordination: pairs with the frontend skill so data-plane endpoints, page contracts, realtime channels, and shared types stay synchronized across back and front. - Use Case: When asked to add an injectable service, a CLI command, an HTTP/WS endpoint, or an ORM entity in the Nodefony repository, load this Skill first to get the exact decorator signatures, lifecycle hooks, and quality gates instead of re-exploring the source tree. ## Quick Start Load the nodefony-framework-dev skill before editing any Nodefony backend code, then follow its recipe for the specific task such as creating a service, controller, or CLI command.

Frequently Asked Questions about nodefony-framework-dev

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

FAQPage Schema
How do I create an injectable service in Nodefony?

In an application, run the CLI command nodefony create service <Nom> which scaffolds the class, its interface, and the @services wiring. In the framework repository, write a class extending Service with @injectable(), pass the module as first constructor parameter, and name dependencies explicitly with @inject since tsx does not emit design:paramtypes.

How do I add an HTTP or WebSocket endpoint in Nodefony?

Create a Controller class and decorate methods with @Get, @Post, or @route from @nodefony/framework. WebSocket is a first-class transport on the same route table, session, and firewall as HTTP, so one controller action can serve both transports.

Why must Nodefony pipeline changes run a memory suite before commit?

Any modification to @nodefony/http, @nodefony/framework, or the core pipeline requires the memory suite before committing. Blocking thresholds are 35 MB per 1000 HTTP requests, 10 MB per 100 crashes, and 30 MB per 100 WebSocket connections; exceeding them means fixing lazy allocation and listener cleanup first.

Can @nodefony/http import @nodefony/framework?

No, importing framework from http creates a circular dependency and is forbidden. The http package accesses framework-level objects like the resolver through the request context instead, using (context as any)?.resolver.

When should a Nodefony CLI command declare a data run profile?

A command that reads or writes data must declare runProfile: CONSOLE_DATA_RUN_PROFILE so the framework connects the ORM. Without it, durable stores silently fall back to memory; the test is whether the command still makes sense when no database is running.

What are the limitations of performance tests in the Nodefony suite?

Time-threshold microbenchmarks are skipped by default because CPU variance and a loaded event loop make them unreliable in the full suite. They run only in isolation with NF_RUN_PERF=1, and thresholds must never be loosened to mask environment contamination.