|
1 | 1 | # typescript-nestjs-template
|
2 | 2 |
|
3 |
| -<p align="center"> |
4 |
| - <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a> |
5 |
| -</p> |
| 3 | +A simple and idiomatic REST API boilerplate built in TypeScript with [NestJS](https://nestjs.com), designed for clarity, modularity and extensibility. |
| 4 | +Designed to showcase best practices in modular architecture, request validation, documentation, and automated testing. |
6 | 5 |
|
7 |
| -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 |
8 |
| -[circleci-url]: https://circleci.com/gh/nestjs/nest |
| 6 | +## ✨ Features |
9 | 7 |
|
10 |
| - <p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> |
11 |
| - <p align="center"> |
12 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> |
13 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> |
14 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> |
15 |
| -<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> |
16 |
| -<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> |
17 |
| -<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> |
18 |
| -<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> |
19 |
| - <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a> |
20 |
| - <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> |
21 |
| - <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a> |
22 |
| -</p> |
23 |
| - <!--[](https://opencollective.com/nest#backer) |
24 |
| - [](https://opencollective.com/nest#sponsor)--> |
| 8 | +- 🧱 Modular and scalable structure |
| 9 | +- 🚦 RESTful routing with controllers and services |
| 10 | +- 📄 Swagger documentation at `/docs` |
| 11 | +- ✅ Request validation with `class-validator` |
| 12 | +- 🧪 Unit & E2E tests with `Jest` and `Supertest` |
| 13 | +- 🐳 Minimal Docker support |
| 14 | +- 🧰 Designed as a reusable starter template |
25 | 15 |
|
26 |
| -## Description |
| 16 | +## 📦 Stack |
27 | 17 |
|
28 |
| -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. |
| 18 | +- Node.js 20+ |
| 19 | +- NestJS 10+ |
| 20 | +- TypeScript (strict mode) |
| 21 | +- class-validator / class-transformer |
| 22 | +- Swagger via `@nestjs/swagger` |
| 23 | +- ESLint + Prettier |
| 24 | +- Jest + Supertest |
29 | 25 |
|
30 |
| -## Project setup |
| 26 | +## 🚀 Getting Started |
31 | 27 |
|
32 | 28 | ```bash
|
33 |
| -$ yarn install |
34 |
| -``` |
35 |
| - |
36 |
| -## Compile and run the project |
37 |
| - |
38 |
| -```bash |
39 |
| -# development |
40 |
| -$ yarn run start |
41 |
| - |
42 |
| -# watch mode |
43 |
| -$ yarn run start:dev |
44 |
| - |
45 |
| -# production mode |
46 |
| -$ yarn run start:prod |
47 |
| -``` |
| 29 | +# Install dependencies |
| 30 | +yarn install |
48 | 31 |
|
49 |
| -## Run tests |
50 |
| - |
51 |
| -```bash |
52 |
| -# unit tests |
53 |
| -$ yarn run test |
54 |
| - |
55 |
| -# e2e tests |
56 |
| -$ yarn run test:e2e |
57 |
| - |
58 |
| -# test coverage |
59 |
| -$ yarn run test:cov |
| 32 | +# Run the server in watch mode |
| 33 | +yarn start:dev |
60 | 34 | ```
|
61 |
| - |
62 |
| -## Deployment |
63 |
| - |
64 |
| -When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information. |
65 |
| - |
66 |
| -If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps: |
67 |
| - |
68 |
| -```bash |
69 |
| -$ yarn install -g @nestjs/mau |
70 |
| -$ mau deploy |
71 |
| -``` |
72 |
| - |
73 |
| -With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure. |
74 |
| - |
75 |
| -## Resources |
76 |
| - |
77 |
| -Check out a few resources that may come in handy when working with NestJS: |
78 |
| - |
79 |
| -- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework. |
80 |
| -- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy). |
81 |
| -- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/). |
82 |
| -- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks. |
83 |
| -- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com). |
84 |
| -- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com). |
85 |
| -- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs). |
86 |
| -- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com). |
87 |
| - |
88 |
| -## Support |
89 |
| - |
90 |
| -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). |
91 |
| - |
92 |
| -## Stay in touch |
93 |
| - |
94 |
| -- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec) |
95 |
| -- Website - [https://nestjs.com](https://nestjs.com/) |
96 |
| -- Twitter - [@nestframework](https://twitter.com/nestframework) |
97 |
| - |
98 |
| -## License |
99 |
| - |
100 |
| -Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE). |
0 commit comments