A REST API that attempts to follow Clean Architecture.
Uses express for the web server, winston for logging, and prisma for database access. The architectural design allows any of these to be swapped out with minimal difficulty.
The structure of the project is divided into four layers:
- Domain Entities
- Use Case Interactors
- Interface Adapters
- Frameworks and Drivers
To install dependencies run
npm install
To compile the project run
npm run build
You will need a .env
file in the root directory, next to package.json
. See .env.example
for the format.
After setting up the environment, set up the database by running
prisma db push
You will need to create your own custom built prisma client library by running
prisma generate
To start the project run
npm start
Testing is done with Jest, using ts-jest for typescript support.
To run tests run
npm test