Skip to content

A basic TypeScript app (using Node.js) skeleton, with DDD and hexagonal example implementation.

License

Notifications You must be signed in to change notification settings

AlexHHPS/typescript-ddd-hexagonal-ddd

 
 

Repository files navigation

TypeScript | Node.js Bootstrap (template) for DDD/Hexagonal Architecture

This repository is intended to serve as a starting point if you want to bootstrap a more complexTypeScript project.

⚠️ It is meant for larger use cases where you need the extra complexity. However, it still has its shortcomings:

  • No proper DI framework/container/tool (just simple DI via constructor injection)
  • Logging tied to the framework (Fastify)
  • Ready for events, but not yet implemented

If these issues don't matter for your intended use, or you know how to fix them, this will be a fast way to run a quick script or program. If you're looking for a simpler setup, check out my TypeScript API Template or my TypeScript Simple Setup

It is opinionated, but easily adaptable to your needs and preferences. Check out below for more details.

Features

Local dev

You'll need to duplicate the .env.example file and rename it to .env and to .env.test first.

Action Command Description
Install dependencies pnpm i Installs the necessary dependencies
Compile pnpm build Transpiles TS into JS
Run pnpm start Runs the compiled JS
Dev pnpm dev Runs the TypeScript code and watches for changes

Testing (Node Test Runner)

Action Command Description
Test pnpm test Runs all the tests

Formatting (Biome)

Action Command Description
Format pnpm format Ensures code follows style guides
Lint pnpm lint Runs the linter and points out mistakes

About

A basic TypeScript app (using Node.js) skeleton, with DDD and hexagonal example implementation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%