I am currently working on the server-side TypeScript framework. My team already widely use this framework in various e-commerce and ERP projects. Structure and semantic were inspired by other popular frameworks like Spring and ASP.NET.
List of main goals:
Testable, supportable, scalable
Minimalistic, idiomatic, clear
Intuitive, readable, understandable
Powerful
Currently, there are a lot of possibilities:
Describing routing using controllers and decorators
Powerful, full-typed Dependency Injection
Incoming data validation (using AJV) with various set of decorators
TypeORM integration (Repositories injection, Transactional support using CLS)
Extendable JWT-based authentication
All parts of the framework are fully typed and integrated with the whole infrastructure.
For the best performance, under the hood, Fastify is used. The framework is declarative, but also avoids using decorators were it's possible. So, it's keep everything simple, clean and minimalistic.
Overview
Controller
Controllers serve as a simple yet powerful routing mechanism in a minimalistic style.
So, as you see, there no need to provide any additional param decorators for injection data from the HTTP request. It's just a small controller overview, there are a lot of other possibilities.You can read more in docs.
Dependency Injection
Odi has powerful dependency injection mechanism out of the box.
(Let's imagine that we already have FooRepository)
And it's all! Odi will automatically inject the validated request body in this argument. If there are some errors during validation, 400 status code will be sent with errors description.
Odi provides a wide set for DTO description, supporting nested DTOs, arrays, enums and etc.
To Sum up
It was a small overview of some features. If you interested in more, check the Docs.
🌪🌌 Opinionated, Declarative, Idiomatic framework for building scalable, supportable and reliable enterprise applications.
TypeScript framework for creating enterprise-grade (web) applications with simple and minimalistic API, that allows you to focus on business logic. Based on declarative and imperative programming, inspiried by ASP.NET / Spring.
Basically, there only a few common things with Nestjs: MVC Pattern and declarative style. But there are a lot of differences, like the whole infrastructure, decorators use, dependency injection and many others. To sum up differences:
Nestjs is heavily using decorators, Odi reduces this usage to the minimum (To keep code clean and readable).
Odi provides built-in validation out of the box for HTTP data via AJV.
DI/IoT behavior is very different. There is much more magic in Odi, in few words :)
Authentication out of the box, that fully integrated with other framework modules.
Controller and WebSockets processing
In the future, it will be the big difference between all integrations and technologies, as Odi was designed from the beginning in another way than Nest.
In my sight, Nestjs is more about Spring, but our framework is more ASP :)
P.S
From the beginning, the framework was designed as opensource. I really need your feedback, it's very important for me!
P.P.S
My small kitten Nancy asking for stars on github 😄😄