Nova is a decorator-based HTTP framework built on top of Fastify. Enjoy dependency injection, Zod validation, JWT authentication, and OpenAPI generation out of the box.
npm install @abrahambass/nova Everything you need to build production-ready APIs with TypeScript and Fastify.
Define routes with intuitive @Controller, @Get, @Post decorators. Clean, expressive, and type-safe.
Built-in DI powered by Inversify. Register singletons, transients, and factories with a clean API.
Validate request bodies with Zod schemas using the @Body decorator.
Auto-generated error responses.
First-class JWT support with @RequiresAuth and @Scopes decorators for role-based access.
Auto-generate Swagger documentation from your route definitions, Zod schemas, and decorators.
CORS, Helmet, Rate Limiting, CSRF, and Compression — all configurable
through a unified Security API.
Organize your app with Module. Register controllers,
services, and nest sub-modules cleanly.
Handle multipart file uploads with the @File decorator. Required
or optional uploads supported.
Built on Fastify — one of the fastest Node.js frameworks. Get performance without compromise.
Build a complete REST API in minutes with decorators and type safety.
import { NovaFactory, Controller, Get, Post, Body } from '@abrahambass/nova';
import { z } from 'zod';
const CreateUserSchema = z.object({
name: z.string().min(2),
email: z.string().email(),
});
@Controller('/users')
class UserController {
@Get()
async findAll() {
return [{ id: 1, name: 'Nova' }];
}
@Post()
async create(@Body(CreateUserSchema) data: z.infer<typeof CreateUserSchema>) {
return { id: 2, ...data };
}
}
async function bootstrap() {
const app = await NovaFactory.create();
app.includeController(UserController);
await app.listen(3000);
}
bootstrap();