Skip to content

This is a basic boilerplate code for building a Nest.js API that adheres to the SOLID design principles and follows a package-by-feature structure. Use it as a starting point to build robust, maintainable, and scalable APIs with Nest.js.

License

Notifications You must be signed in to change notification settings

gusttaswe/nest-solid-base-api

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

Nest.js API Boilerplate

This is a simple template for building a Nest.js API that follows SOLID principles and uses a package-by-feature approach.

Features

  • Built with Nest.js, a modern, powerful, and modular Node.js framework
  • Adheres to SOLID design principles, which promote clean, maintainable, and extensible code
  • Follows a package-by-feature structure, which allows for better organization and reduces coupling between modules
  • Includes basic configuration for common features exception handling and validation
  • Uses TypeScript, a statically typed superset of JavaScript that enables better tooling, safer code, and faster development
  • Utilizes neverthrow which provides a simple and expressive way to handle both synchronous and asynchronous errors, while keeping your code clean and concise.
  • Comes with pre-configured scripts for building, testing, and running the application

Getting Started

To use this boilerplate, you'll need to have Node.js and npm installed on your machine. You can download them from the official websites:

Once you have Node.js and NPM installed, follow these steps:

  1. Clone the repository:
$ git clone https://github.com/gusttaswe/nest-solid-base-api.git
  1. Clone the repository:
$ cd nest-solid-base-api
$ npm install
  1. Start the development server:
$ npm run dev
  1. Open your browser and go to http://localhost:3000/docs. You should see the Swagger UI, which provides a graphical interface for testing the API.

You're Ready to go! 🚀🚀🚀

Contributing

Contributions are welcome! If you find a bug, have a feature request, or want to improve the code, feel free to open an issue or submit a pull request.

Before contributing, please read the contributing guidelines to learn about the code of conduct, the development workflow, and the coding standards.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

This is a basic boilerplate code for building a Nest.js API that adheres to the SOLID design principles and follows a package-by-feature structure. Use it as a starting point to build robust, maintainable, and scalable APIs with Nest.js.

Resources

License

Stars

Watchers

Forks

Packages

No packages published