Suggest an editImprove this articleRefine the answer for “Express's place in the modern world”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Plain Express is a great "construction kit", but with no frame: no DI, no architectural layers, no DTO validation, no guards/policies out of the box, so on large projects you end up manually assembling a mini-framework from dozens of libraries and enforcing code conventions yourself. **Key point:** for large products it's better to reach for NestJS (modular architecture, DI, guards/pipes/interceptors, Swagger built in), Fastify (speed, type-safe plugins/schemas), or AdonisJS/Hapi - they come with "batteries included" instead of your team becoming a mini-framework team.Shown above the full answer for quick recall.Answer (EN)ImageIn short: **plain Express is a great "construction kit", but with no frame.** For small services that's a plus, but for large products it's a minus: you end up **assembling a framework yourself** out of scattered libraries, and enforcing conventions and code quality by hand. That's expensive, fragile, and slows the team down. Here's why it's better to avoid "bare" Express on large projects. ## The main problems with "plain" Express on large projects 1. **No architectural frame and no DI** - No modules/layers out of the box, no dependency container, lifecycles, request scope, and so on. - You end up with "fat" routes, global singletons, and fragile wiring. Testing and swapping dependencies is hard. 2. **Reinventing basic things** - Async error handling, DTO validation, a normalized error response, a structured logger, per-environment configs, guards/roles, caching, rate limiting, i18n, OpenAPI/Swagger, versioning, health checks, metrics, shutdown hooks, jobs/queues, modularity, and more. - All of this has to be hand-assembled from a dozen packages, keeping compatibility and updates working. 3. **Weak team scalability** - No shared conventions (where controllers live, where services live, where repositories live). - Different developers, different styles. Readability drops, onboarding slows down. 4. **TypeScript pains** - Manually threading `req/res` types, incompatible middleware types, no strict DTOs/validators out of the box, harder to build reliable contract types for the client (tRPC/OpenAPI codegen, etc., all by hand). 5. **Infrastructure and security are all on you** - Helmets (`helmet`), CORS, CSRF, cookies, session/JWT flows, RBAC/ABAC, with no shared abstractions or guards. - Logs/tracing/metrics (Pino, OpenTelemetry, Prometheus), another construction kit. 6. **Stack instability and version "drift"** - Different packages pull different major versions and break each other. Over the long run, this turns into tech debt. 7. **Performance and ecosystem** - Express isn't the fastest of the Node frameworks; modern alternatives (e.g. Fastify) offer higher throughput and a well-thought-out plugin system. - Express's middleware ecosystem is, in places, "tired", with no strict contracts/types. ## What people usually "build on top" of Express (and maintain themselves) - A layer framework: **controller → service → repository → domain**. - A **DI container** (typedi/tsyringe/inversify). - **DTO/validation** (zod/joi/express-validator) + mappers. - **Errors and filters**: centralized handling, codes, trace IDs. - **Auth/ACL**: guards/policies, roles/access rules. - **Documentation**: OpenAPI/Swagger, client generation. - **Observability**: pino, OpenTelemetry, health/metrics. - **Configs**: a config module, env schemas (zod), environment profiles. - **API versioning**, **rate limiting**, **caching**, queues (BullMQ), schedulers, background jobs. - **Quality checks**: eslint/prettier/commit hooks/graph rules. All of these building blocks can be assembled, but you'll turn into a mini framework team. ## What to choose instead of "bare" Express - **NestJS** (often on top of Fastify): modular architecture, DI, guards/pipes/interceptors/filters, DTO/validation, Swagger, configs, microservices, GraphQL, CQRS, integrations, "batteries included". Great for large monorepos and microservices. - **Fastify**: fast, type-safe plugins/hooks/schemas (JSON Schema), built-in validation and serialization, a mature ecosystem. Can be used on its own or as an adapter under Nest. - **AdonisJS / Hapi**: more "complete" frameworks with a frame and conventions, if Nest feels "too enterprise".For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.