Skip to content

tummalah/ts-rest-api-template

Repository files navigation

issues Release&Deploy

Typescript,Express Rest API Template

An opinionated minimal boilerplate for clean architecture
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Devops

About The Project

A minimal Rest API template trying to follow clean acrhitecture guidelines

(back to top)

Built With

(back to top)

Express Server

All the assets related to http server are all located in src/server. All the server related setup is happening in express.api.ts as a single source of truth.

(back to top)

Controller

Controllers which serves the http resources are located under server/controllers. Each controller is encouraged to find the down stream services using service locators using dependency injection

(back to top)

Helpers

The project uses custom helpers located in src/server/helpers to decrease the surface area of dependencies. Notably using custom decorators for controllers and custom logging utility.

(back to top)

Domain

The domain is where all your domain entities and business logic goes. Care should be taken so that the domain is clean and free of framework related assets and should be properly encapuslated using services or usecases.

(back to top)

PreCommit

The project is setup to run ESLint on precommit

(back to top)

Commit

The project is setup with commit zen utility to generate conventional commits

(back to top)

PostCommit

Commitlint will kick in on each commit message to prevent non conventional commits. Use the below command to invoke the commit message generator

npm run commit

(back to top)

Deploy

The project uses Kustomize to generate K8s Manifest

make deploy-dev

deploys to Dev cluster

(back to top)

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Acknowledgments

(back to top)