date
Sep 5, 2025
slug
base-core
status
Published
tags
NestJs
summary
Base dự án NestJs scale Worker, Schedule, API
type
Post
// =================================
// PROJECT STRUCTURE
// =================================
/*
blockchain-core-api/ ├── src/ │ ├── app.module.ts │ ├── main.ts │ ├── worker.ts │ ├── common/ │ │ ├── decorators/ │ │ │ ├── auth.decorator.ts │ │ │ └── roles.decorator.ts │ │ ├── dto/ │ │ │ ├── pagination.dto.ts │ │ │ └── base-response.dto.ts │ │ ├── exceptions/ │ │ │ └── custom.exception.ts │ │ ├── filters/ │ │ │ └── http-exception.filter.ts │ │ ├── guards/ │ │ │ ├── auth.guard.ts │ │ │ └── roles.guard.ts │ │ ├── interceptors/ │ │ │ ├── logging.interceptor.ts │ │ │ └── transform.interceptor.ts │ │ ├── pipes/ │ │ │ └── validation.pipe.ts │ │ └── utils/ │ │ ├── crypto.util.ts │ │ └── response.util.ts │ ├── config/ │ │ ├── app.config.ts │ │ ├── database.config.ts │ │ ├── redis.config.ts │ │ └── queue.config.ts │ ├── database/ │ │ ├── entities/ │ │ │ ├── base.entity.ts │ │ │ ├── user.entity.ts │ │ │ ├── wallet.entity.ts │ │ │ ├── transaction.entity.ts │ │ │ └── block.entity.ts │ │ └── migrations/ │ ├── modules/ │ │ ├── auth/ │ │ │ ├── auth.controller.ts │ │ │ ├── auth.service.ts │ │ │ ├── auth.module.ts │ │ │ ├── dto/ │ │ │ │ ├── login.dto.ts │ │ │ │ └── register.dto.ts │ │ │ └── strategies/ │ │ │ └── jwt.strategy.ts │ │ ├── users/ │ │ │ ├── users.controller.ts │ │ │ ├── users.service.ts │ │ │ ├── users.module.ts │ │ │ └── dto/ │ │ │ ├── create-user.dto.ts │ │ │ └── update-user.dto.ts │ │ ├── blockchain/ │ │ │ ├── blockchain.controller.ts │ │ │ ├── blockchain.service.ts │ │ │ ├── blockchain.module.ts │ │ │ ├── blockchain.gateway.ts │ │ │ ├── dto/ │ │ │ │ ├── transaction.dto.ts │ │ │ │ └── block.dto.ts │ │ │ └── processors/ │ │ │ ├── block.processor.ts │ │ │ └── transaction.processor.ts │ │ └── websocket/ │ │ ├── websocket.gateway.ts │ │ ├── websocket.module.ts │ │ └── websocket.service.ts │ └── workers/ │ ├── blockchain-worker.ts │ ├── notification-worker.ts │ └── data-sync-worker.ts ├── docker/ │ ├── Dockerfile │ ├── docker-compose.yml │ └── docker-compose.prod.yml ├── k8s/ │ ├── deployment.yaml │ ├── service.yaml │ ├── configmap.yaml │ └── hpa.yaml ├── .env ├── .env.example ├── .gitignore ├── README.md ├── nest-cli.json └── tsconfig.json
  • /
 

“Success is not final, failure is not fatal: it is the courage to continue that counts.“

Winston Churchill


© Hiếu Trần 2020 - 2025

Tip: Use console.table() for better array logging!
Anime Character