Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Notadd | 2,673 | 3 months ago | 44 | February 07, 2018 | 45 | apache-2.0 | TypeScript | |||
A microservice development architecture based on nest.js. —— 基于 Nest.js 的微服务开发架构。 | ||||||||||
Awesome Nest Boilerplate | 1,719 | 2 days ago | 7 | mit | TypeScript | |||||
Awesome NestJS Boilerplate 😍, Typescript 💪, Postgres 🎉, TypeORM 🥳 | ||||||||||
Bank | 1,235 | a year ago | mit | |||||||
🏦 Full Stack Web Application similar to financial software that is used in banking institutions | React.js and Node.js | ||||||||||
Ddd Hexagonal Cqrs Es Eda | 797 | a day ago | 11 | mit | TypeScript | |||||
Complete working example of using Domain Driven Design (DDD), Hexagonal Architecture, CQRS, Event Sourcing (ES), Event Driven Architecture (EDA), Behaviour Driven Development (BDD) using TypeScript and NestJS. Like what you see? Don't forget to star! ⭐ ^^^ | ||||||||||
Ngx Starter Kit | 545 | a year ago | 14 | mit | TypeScript | |||||
:a: Angular :rocket: NestJS :monkey: Starter Kit | ||||||||||
Truthy | 308 | 2 months ago | 1 | mit | TypeScript | |||||
Open source headless CMS API written using NestJS, that has pre built modules like User Management, Role Management, Permission Management, Email Module, Account Settings, OTP, Throttling, RBAC support, Localization, and many more. | ||||||||||
Stator | 272 | 6 months ago | 15 | mit | TypeScript | |||||
Stator, your go-to template for the perfect stack. 😍🙏 | ||||||||||
Nest Auth Example | 270 | 18 hours ago | 2 | mit | TypeScript | |||||
Nest.js authentication with Passport. Realworld example | ||||||||||
Nestjs Sequelize Typescript | 259 | 9 months ago | 14 | TypeScript | ||||||
Nest + sequelize-typescript + JWT + Jest + Swagger | ||||||||||
Speedtyper.dev | 198 | 25 days ago | 14 | mit | TypeScript | |||||
Type racing for programmers |
Nest framework TypeScript starter repository.
In this starter you may find a working application pre configured with the PostgreSQL and JWT Auth.
Please go through Nest Docs before playing with the code.
To run the application you need to have PostgreSQL installed.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# debug mode
$ npm run start:debug
# production mode
$ npm run start:prod
With Docker you can run it easily. Now port 3000
will be open and 9229
can be connected to debugger as well.
PostgreSQL is exposed via 5432
port.
$ docker-compose up
The project setup follows standard NestJS conventions. Checkout NestJS docs for more.
Directory structure follows module based on features.
src
@types # type defs goes here
common # common stuffs
decorators # custom decorators
dto # common DTOs
exceptions # exceptions
filters # filters for app
guards # guards for app
config # app config
database # database module
migrations # db migrations
stubs # migration/seed stubs
modules # modules of app
auth # auth module
dto
health # health module
user # user module
dto
entities
For database we have used PostgreSQL. And for ORM we have used Knex.js with ObjectionJS.
Knex is an awesome query builder which is closer to SQL. Objection also a thin wrapper around Knex.
For all database migrations please use snake_case
conversion when creating tables or columns.
In PostgreSQL it is natural to work with snake_case
when writing queries.
Knex will automatically map your snake_case
names into camelCase
on application side. Dont use snake_case
in JS side. Instead always use camelCase
. Read more
Please change the database name in docker-compose file and .env
Api docs can be geneated thanks to @nestjs/swagger
package. Since we are using cli
plugin you can comment your Dto
s with JSDocs and the documentation will be done automatically. Please follow conventions mentioned here
Env Variable | Description | example |
---|---|---|
SECRET | Secret for JWT | somesecret |
DATABASE_URL | PostgreSQL connection string | postgres://admin:[email protected]:5432/syetalabs |
LOGGER_LEVEL | Level of logger | info |
LOGGER_FORMAT | Format for logging | pretty or json |
You can find helpers by pressing CTRL + SHIFT + P
in VSCode