Node Api Boilerplate

screenshot of Node Api Boilerplate
express

Node Api Boilerplate

DDD/Clean Architecture inspired boilerplate for Node web APIs

Overview:

This project is a starting point for developing a scalable web API using Node and TypeScript. It follows layered architecture, Clean Architecture, and Domain-Driven Design principles. The project is designed to be extensible and flexible, allowing customization according to team needs and preferences. The current version is still in beta and may have some abstractions that will change or missing features. Contributions from the community are welcome.

Features:

  • Scalable web API development with Node and TypeScript
  • Follows layered architecture, Clean Architecture, and Domain-Driven Design principles
  • Extensible and flexible design for customization according to team needs and preferences
  • Beta version with potential changes and missing features
  • Open to community contributions

Installation:

To run the project in development mode, use the following command:

npm run dev

To run the project in debug mode where execution stops when a debugger statement is called, use:

npm run debug

To run the application in console mode, giving programmatic access to the environment:

npm run console

To run a new instance of the application isolated from the server:

npm run console:new

To access the dependencies registered in the container for the new instance, use:

registry.<dependencyName>

or

container.<dependencyName>

To connect a console to the process of the server, giving access to the current state of it:

npm run console:server

To run tests using Jest:

npm run test

To use Docker to run the project, a docker wrapper is included. Commands can be executed by calling the scripts under the dbin/ folder. The container uses host networking, so there's no need to map ports. Environment variables should be added to the docker-compose.yml file.

Summary:

This project is a scalable web API development boilerplate using Node and TypeScript. It follows the principles of layered architecture, Clean Architecture, and Domain-Driven Design. The boilerplate is designed to be extensible and flexible, allowing customization according to team preferences. It is still in beta and welcomes contributions from the community. The installation process allows running the project in development mode, debug mode, or console mode for programmatic access to the environment. It also supports running tests with Jest and provides a docker wrapper for Docker usage.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

fullstack
Fullstack Boilerplates

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.