Back to topics

2 Interface Chain

API Services

The development process of API services can be roughly divided into the following layers:

  • Receive Request

  • Request data validation, corresponds to pipe

  • Authentication, corresponds to guard

  • Routing, corresponds to controller + interceptor

  • Business logic, corresponds to service

  • Database operations, corresponds to repository

  • Return response