https://github.com/hoojinguyen/nestjs-base
This is a basic project with Nest framework, along with neat source code organization and many pre-configured features and techniques.
https://github.com/hoojinguyen/nestjs-base
aws-s3 bull docker docker-compose logger mailer nestjs passport-jwt queue redis redis-commander scheduled-task typeorm typescript winston-logger
Last synced: 7 months ago
JSON representation
This is a basic project with Nest framework, along with neat source code organization and many pre-configured features and techniques.
- Host: GitHub
- URL: https://github.com/hoojinguyen/nestjs-base
- Owner: hoojinguyen
- License: mit
- Created: 2022-03-29T01:21:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-11T03:20:57.000Z (over 2 years ago)
- Last Synced: 2025-01-16T21:36:40.103Z (9 months ago)
- Topics: aws-s3, bull, docker, docker-compose, logger, mailer, nestjs, passport-jwt, queue, redis, redis-commander, scheduled-task, typeorm, typescript, winston-logger
- Language: TypeScript
- Homepage:
- Size: 241 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
This is a basic project with [Nest](https://github.com/nestjs/nest) framework, along with neat source code organization and many pre-configured features and techniques.
## Features and Techniques
- Authentication (passport JWT)
- Authorization (ACL)
- Security
- Emailing Queue (bull)
- API Document (swagger)
- File uploads. Support local and Amazon S3 drivers
- Server static
- Schedule with cronjobs
- Check health
- Caching (redis)
- Cache manager (redis-commander)
- Logging (winston)
- CRUD
- Pagination (nestjs-paginate)
- Request Validation
- Config Service
- TypeORM
- Migration and seeding
- E2E and units tests
- CI/CD## Getting Started
To start developing the project please check if you have these tools installed on your machine:
- [Node.js](https://nodejs.org/en/download/)
- [Yarn](https://yarnpkg.com/getting-started/install)
- [Docker](https://www.docker.com/get-started)### Installation
1. Clone the repo
```sh
git clone https://github.com/hoojinguyen/nestjs-base
```2. Move into project
```sh
cd nestjs-base
```3. Install project dependencies
```sh
yarn
```4. Copy .env.example file as .env and fill it with your environment variables
```sh
cp .env.example .env
```5. Running with docker
- Start development environment:
```sh
docker-compose -f docker-compose.dev.yml up -d# or run script
# sh run.sh up-dev
```- Start development environment with debugger on vscode:
```sh
docker-compose -f docker-compose.debug.yml up -d# or run script
# sh run.sh up-debug
```> - **You can access to API by URL: http://localhost:3001/api in browser**
> - **You can access to redis commander by URL: http://localhost:8081 in browser**6. Stopping
```sh
docker-compose -f docker-compose.dev.yml up -d # dev envdocker-compose -f docker-compose.debug.yml up -d # debug env
# or run script
# sh run.sh down-dev || sh run.sh down-debug
```## Todo
- [ ] Write API document with Swagger
- [ ] Write units tests for every module
- [ ] Switch the way authorization from ACL to RBAC
- [ ] Switch Message queues from bull to RabbitMQ or Kafka
- [ ] Create migration and seeding
- [ ] Multiple databases
- [ ] CI/CD
- [ ] Deployment to product## License
This project is available under the [MIT licensed](LICENSE). See `LICENSE` for more information.