LoopBack 4 defines some key building blocks to represent differentresponsibilities for typical API and/or Microservice applications.

    Key concepts overview diagram

    • Application: The central class for setting up all ofyour module’s components, controllers, servers and bindings. The Applicationclass extends Context and provides the controls for starting andstopping its associated servers.

    • Server: An implementation for inbound transports/protocolssuch as REST (http, https), gRPC (http2) and graphQL (http, https). Ittypically listens on a specific endpoint (protocol/host/port), handlesincoming requests, and then returns appropriate responses.

    • Controller: A class that implements operations definedby the application’s REST API. It implements an application’s business logicand acts as a bridge between the HTTP/REST API and domain/database models. AController operates only on processed input and abstractions of backendservices / databases.

    • Interceptors: A function that intercepts static orinstance method invocations on a class or object.

    • Route: The mapping between your API specification and anOperation. It tells LoopBack which Operation to invoke() when given an HTTPrequest.

    • Sequence: A stateless grouping ofActions that control how a Server responds to requests.

    • Model: The definition of an object in respect to thedatasource juggler. The @loopback/repository module provides specialdecorators for adding metadata to TypeScript/JavaScript classes to use themwith the legacy implementation of DataSource Juggler. In addition,@loopback/repository-json-schema module uses the decorators’ metadata tobuild a matching JSON Schema.

    • DataSources: A named configuration for a Connectorinstance that represents data in an external system.

    • Repository: A type of service that represents acollection of data within a DataSource.

    • Relation: A mapping between two models which describes areal world link between them and exposes CRUD APIs based on the configuration.

    • Decorator: The pattern used to annotate or modify yourclass declarations and their members with metadata.