⚡ Powered by Fastify

Build APIs with
Decorators & Type Safety

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

Why Nova?

Everything you need to build production-ready APIs with TypeScript and Fastify.

🎯

Decorator-Based Routing

Define routes with intuitive @Controller, @Get, @Post decorators. Clean, expressive, and type-safe.

💉

Dependency Injection

Built-in DI powered by Inversify. Register singletons, transients, and factories with a clean API.

Zod Validation

Validate request bodies with Zod schemas using the @Body decorator. Auto-generated error responses.

🔐

JWT Authentication

First-class JWT support with @RequiresAuth and @Scopes decorators for role-based access.

📄

OpenAPI / Swagger

Auto-generate Swagger documentation from your route definitions, Zod schemas, and decorators.

🛡️

Security Plugins

CORS, Helmet, Rate Limiting, CSRF, and Compression — all configurable through a unified Security API.

📦

Modular Architecture

Organize your app with Module. Register controllers, services, and nest sub-modules cleanly.

📁

File Uploads

Handle multipart file uploads with the @File decorator. Required or optional uploads supported.

Fastify-Powered

Built on Fastify — one of the fastest Node.js frameworks. Get performance without compromise.

See it in action

Build a complete REST API in minutes with decorators and type safety.

main.ts TypeScript
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();