{"id":26385094,"url":"https://github.com/locngoduc/nodejs-typescript-ddd-boilerplate","last_synced_at":"2026-04-04T08:37:12.853Z","repository":{"id":248664813,"uuid":"829338639","full_name":"locngoduc/NodeJS-Typescript-DDD-Boilerplate","owner":"locngoduc","description":"Build Node.js applications with TypeScript and Domain Driven Design (DDD) principles. Includes Redis caching, MongoDB (Mongoose), JWT authentication, and Swagger for API docs. Ideal for scalable, maintainable backend projects.","archived":false,"fork":false,"pushed_at":"2024-07-16T08:56:03.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T05:24:14.195Z","etag":null,"topics":["domain-driven-design","expressjs","jwt","mongoose","nodejs","redis","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locngoduc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T08:27:15.000Z","updated_at":"2024-07-16T16:04:54.000Z","dependencies_parsed_at":"2024-07-16T11:21:41.629Z","dependency_job_id":"0f779b23-edcc-4792-930b-d0f6290ba429","html_url":"https://github.com/locngoduc/NodeJS-Typescript-DDD-Boilerplate","commit_stats":null,"previous_names":["vaderngo/typescript-nodejs-ddd-boilerplate","locngoduc/nodejs-typescript-ddd-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locngoduc%2FNodeJS-Typescript-DDD-Boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locngoduc%2FNodeJS-Typescript-DDD-Boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locngoduc%2FNodeJS-Typescript-DDD-Boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locngoduc%2FNodeJS-Typescript-DDD-Boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locngoduc","download_url":"https://codeload.github.com/locngoduc/NodeJS-Typescript-DDD-Boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243994313,"owners_count":20380550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-driven-design","expressjs","jwt","mongoose","nodejs","redis","typescript"],"created_at":"2025-03-17T07:38:20.493Z","updated_at":"2025-12-30T19:10:29.660Z","avatar_url":"https://github.com/locngoduc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js TypeScript DDD Boilerplate\n\n[![Node.js](https://img.shields.io/badge/Node.js-v14.17-green?logo=node.js)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-v4.5.2-blue?logo=typescript)](https://www.typescriptlang.org/)\n[![Redis](https://img.shields.io/badge/Redis-v6.2-red?logo=redis)](https://redis.io/)\n[![MongoDB](https://img.shields.io/badge/MongoDB-v4.4.10-brightgreen?logo=mongodb)](https://www.mongodb.com/)\n[![JWT](https://img.shields.io/badge/JWT-v8.5.1-orange)](https://jwt.io/)\n[![Swagger](https://img.shields.io/badge/Swagger-v4.0-purple?logo=swagger)](https://swagger.io/)\n\nA boilerplate for building Node.js applications using TypeScript and Domain-Driven Design principles. This setup includes Redis for caching, MongoDB via Mongoose for database operations, JWT for authentication, and Swagger for API documentation.\n\n## Table of Contents\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n  - [Running the Application](#running-the-application)\n- [Project Structure](#project-structure)\n  - [application](#application)\n  - [config](#config)\n  - [domain](#domain)\n  - [infrastructure](#infrastructure)\n  - [interface](#interface)\n  - [shared](#shared)\n  - [template](#template)\n  - [worker](#worker)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Features\n\n- **TypeScript:** Write code in TypeScript for improved type safety and maintainability.\n- **Domain-Driven Design (DDD):** Organize your application into distinct layers based on domain concepts.\n- **Redis:** Utilize Redis for caching to improve application performance.\n- **MongoDB with Mongoose:** Interact with MongoDB using the Mongoose ORM for schema management.\n- **JWT Authentication:** Secure your APIs with JSON Web Tokens for authentication and authorization.\n- **Swagger:** Automatically generate API documentation with Swagger.\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have Node.js (v14.17 or higher) and npm installed on your machine.\n\n### Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/VaderNgo/Typescript-Nodejs-DDD-Boilerplate.git\n   ```\n2. **Install Dependencies**\n   ```bash\n   npm install\n   ```\n### Configuration\n  Create a .env file based on .env.example and configure your environment variables, including MongoDB connection URI, Redis server details, JWT secret, etc.\n\n# Project Structure\n  ```bash\n  /src\n  │\n  ├── /application     # Use cases and business logic implementations\n  ├── /config          # Configuration files (database, authentication, etc.)\n  ├── /domain          # Domain entities, repositories, services\n  ├── /infrastructure  # Adapters for external interfaces (MongoDB, Redis, etc.)\n  ├── /interface       # API controllers, GraphQL resolvers, etc.\n  ├── /shared          # Shared utilities, constants, and cross-cutting concerns\n  ├── /template        # Template rendering logic (if applicable)\n  └── /worker          # Background job processing logic (if applicable)\n  ```\n### application\nContains use cases and business logic implementations that orchestrate interactions between domain entities and infrastructure services.\n\n### config\nHouses configuration files such as database connections, authentication settings, and environment variables.\n\n### domain\nDefines domain entities, repositories for data access, and services encapsulating core business logic.\n\n### infrastructure\nImplements adapters for external interfaces like databases (MongoDB with Mongoose), caching (Redis), external APIs, etc.\n\n### interface\nHandles external communication interfaces such as API controllers, GraphQL resolvers, WebSocket handlers, etc.\n\n### shared\nIncludes shared utilities, helper functions, constants, and other cross-cutting concerns used across different layers.\n\n### template\nDeals with template rendering logic if your application sends templated emails or generates documents.\n\n### worker\nContains background job processing logic using task queues or job schedulers (like Bull, Agenda, etc.) if applicable.\n\n# Contributing\nContributions are welcome! Fork the repository and submit pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocngoduc%2Fnodejs-typescript-ddd-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocngoduc%2Fnodejs-typescript-ddd-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocngoduc%2Fnodejs-typescript-ddd-boilerplate/lists"}