📔
node-ts-architecture
  • Node TypeScript Architecture (WIP)
  • The thousand-foot view
  • The example app
  • Project structure
  • Writing a library
    • Entities
    • Operations
    • Errors
    • Events
    • Context
    • Library root
  • Creating adapters
    • How adapters work
  • Creating bindings
    • What are bindings?
  • Putting it all together
    • Assembling apps
  • Testing
  • Testing an NTA application
Powered by GitBook
On this page

Was this helpful?

Node TypeScript Architecture (WIP)

A suggested approach for writing extendable, readable, reliable Node applications. WORK IN PROGRESS.

NextThe thousand-foot view

Last updated 5 years ago

Was this helpful?

This project and documentation are work in progress

Welcome to NTA! This is an opinionated, newbie-friendly guide to writing Node.js applications in TypeScript. It is accompanied by example code in a .

It offers a project structure, naming conventions, example code and recommended habits for building extendable, readable, reliable systems. Although TS is the focus, you can adapt it to plain JavaScript systems too.

You can use this architecture to build backend apps, CLI programs, REST APIs, GraphQL boxes or even use it as part of an SPA.

It's suggested that you read these docs in tandem with the code repository. The repo implements a simple 'community library' application in Express, Postgres (with transactions) and RabbitMQ. I've aimed to write a system that's large enough to illustrate the patterns but still small enough to eyeball fairly quickly.

My hope is that you should be able to get through this guide in well under an hour, even if you're relatively new to writing Node.js apps.

Github repository