Seed project (boilerplate) for RESTful API that leverages the concept of Domain Driven Design (DDD)
This API project utilises information from multiple sources to create the fine-tuned API product with the following objectives
- To build a maintainable enterprise grade application
- The application that follows
SOLID
principles as much as possible - To build an pplication that benefits most of the stakeholders in an organisation
This project uses DDD with Onion Architecture as illustrated in below images
- Node.js
- TypeScript
- MongoDB with MongoDB native driver (mongodb package on NPM)
- InversifyJS as an IoC container
- Express (via Inversify Express Utils) as an API framework
To run the project, make sure you have these dependencies installed on your system
- Node.js v8 or later
- Typescript with
tsc
command - Nodemon
- ts-node
- MongoDB
You also need to setup and initialise MongoDB database. Then, copy the .env_example
file into .env
file by firing the command
cp .env_template .env
Do adjust the DB_NAME and MONGODB_URI to match your configuration then run
yarn dev