This repository provides a robust and well-structured base template for projects developed with the NestJS framework. It follows best practices for modularity, maintainability, and scalability, ensuring an optimal development experience.
- 🚀 NestJS - A progressive Node.js framework for building efficient and scalable server-side applications.
- ✨ TypeScript - A strongly typed programming language that builds on JavaScript.
- 🐳 Docker & Docker Compose - Used to containerize the application for easy deployment and development.
- 🎨 ESLint & Prettier - Ensures consistent code formatting and best practices.
- 🧪 Vitest - A fast testing framework for unit and integration tests.
- 🖥 DevContainers (VS Code) - Provides an isolated development environment.
- 🔄 Commitlint - Enforces consistent commit message conventions.
- 🐶 Husky - Automates Git hooks for improved development workflow.
- Ensure you have Node.js and Yarn installed on your system.
- Install dependencies:
yarn install
- Copy the environment file and configure it:
cp .env.example .env
- Start the application in development mode:
yarn start:dev
- The application will be available at:
http://localhost:3000
- Ensure Docker and Docker Compose are installed on your system.
- Build and start the services:
docker-compose up --build
- Access the container shell:
docker exec -it <container_id> sh
- Inside the container, start the application:
yarn start:dev
- The application will be available at:
http://localhost:${PORT}
- To stop and remove containers:
docker-compose down
- Install the Dev Containers extension in Visual Studio Code.
- Ensure Docker is installed and running on your system.
- Open the project in VS Code and select Reopen in Container when prompted.
- The containerized development environment will be automatically set up.
- Run commands inside the container terminal as you would locally:
yarn start:dev yarn test:dev
- The environment ensures consistency across different development setups.
Thank you for using this template! Your feedback and suggestions are highly appreciated. If you find this project useful, feel free to give it a star ⭐ and share it with others.
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Happy coding!