Node TypeScript Architecture (WIP)
A suggested approach for writing extendable, readable, reliable Node applications. WORK IN PROGRESS.
Last updated
A suggested approach for writing extendable, readable, reliable Node applications. WORK IN PROGRESS.
Last updated
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 Github repository.
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.