@adonisjs/core

v7.3.0 MIT

Core of AdonisJS

Weekly Downloads
54.9K
Stars
18.8K
Forks
666
Open Issues
4
Gzip Size
186.7 kB
Unpacked Size
452.3 kB
Dependencies
24
Last Updated
1mo ago

@adonisjs/core Download Trends

Download trends for @adonisjs/core079.4K158.8K238.2K317.6KMar 2025JunSepDecMarApr 2026
@adonisjs/core

About @adonisjs/core

AdonisJS Core is the foundational package for the AdonisJS full-stack TypeScript framework, offering a robust, opinionated structure for building server-side applications. It addresses the complexity of Node.js development by providing a cohesive set of tools and conventions for routing, middleware, request lifecycle management, and dependency injection, thereby reducing boilerplate and promoting maintainable code.

The framework's core philosophy centers around developer experience and productivity, targeting developers who appreciate convention over configuration and seek a structured environment for building scalable web APIs and server-rendered applications. It emphasizes a clear separation of concerns and leverages TypeScript extensively for type safety and improved developer tooling.

Key architectural patterns include a powerful dependency injection container for managing application services, a flexible middleware system to intercept requests and responses, and an event emitter for decoupled system logic. Features like the IoC Container and the robust HTTP context management ensure that application components are loosely coupled and easily testable. The request lifecycle is well-defined, allowing for predictable execution flow.

AdonisJS Core integrates seamlessly with other AdonisJS packages, such as the ORM (Lucid) and validation libraries, to provide a complete development experience. It also plays well with the broader Node.js ecosystem, enabling the use of various third-party libraries for tasks like database management or authentication, fitting into modern CI/CD workflows and project structures.

With a significant GitHub presence (18.8K stars, 666 forks) and consistent weekly downloads (77.2K), the framework demonstrates maturity and community adoption. The core package itself has a manageable unpacked size of 452.3 kB and a gzipped bundle size of 160.5 kB, making it a considerable but optimized choice for feature-rich server-side applications.

However, developers should be aware that AdonisJS Core is an opinionated framework. While this promotes consistency, it may present a steeper learning curve for those new to its particular conventions. For extremely minimal setups or microservices where only a single, isolated HTTP endpoint is required, a simpler HTTP server library might be more appropriate.

When to use

  • When building full-stack applications that require convention-driven routing, controller orchestration, and a structured approach to request handling.
  • When leveraging AdonisJS's built-in dependency injection system to manage application services and dependencies effectively.
  • When developing APIs or server-rendered applications that benefit from a rich middleware pipeline for request modification and response handling.
  • To integrate with other AdonisJS ecosystem packages like Lucid ORM for database operations and Edge for server-side templating.
  • When prioritizing TypeScript integration for enhanced type safety and developer tooling within your Node.js backend.
  • For projects where a clear separation of concerns and testability are paramount, facilitated by the IoC container and framework patterns.

When NOT to use

  • If your primary need is a minimalist HTTP server for a single, isolated API endpoint, consider a lighter, unopinionated HTTP routing library.
  • When building a highly specialized, real-time application that demands a custom event loop architecture not easily accommodated by the default middleware flow.
  • If you prefer to architect your entire application from scratch without relying on framework conventions for routing, dependency injection, or request lifecycle management.
  • For projects where extreme build-time performance is the absolute highest priority, and the overhead of a full-featured framework is a concern, explore ultra-lightweight, fast-startup alternatives.
  • When needing to integrate into an existing, highly unconventional Node.js project structure that resists structured frameworks and dependency injection.

@adonisjs/core Alternatives

@adonisjs/core Categories