---
lang: en
title: 'API docs: core'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md)

## core package

The core foundation for LoopBack 4. It can also serve as the platform to build large-scale Node.js applications and frameworks.

## Remarks

For examples of how to leverage `@loopback/core` to build composable and extensible projects, check out the [core tutorial](https://loopback.io/doc/en/lb4/core-tutorial.html)<!-- -->.

## Classes

|  Class | Description |
|  --- | --- |
|  [Application](./core.application.md) | Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models. |
|  [LifeCycleObserverRegistry](./core.lifecycleobserverregistry.md) | A context-based registry for life cycle observers |

## Functions

|  Function | Description |
|  --- | --- |
|  [addExtension(context, extensionPointName, extensionClass, options)](./core.addextension.md) | Register an extension for the given extension point to the context |
|  [asLifeCycleObserver(binding)](./core.aslifecycleobserver.md) | A <code>BindingTemplate</code> function to configure the binding as life cycle observer by tagging it with <code>CoreTags.LIFE_CYCLE_OBSERVER</code>. |
|  [asService(serviceInterface)](./core.asservice.md) | Create a binding template for a service interface |
|  [createServiceBinding(cls, options)](./core.createservicebinding.md) | Create a service binding from a class or provider |
|  [extensionFilter(extensionPointNames)](./core.extensionfilter.md) | A factory function to create binding filter for extensions of a named extension point |
|  [extensionFor(extensionPointNames)](./core.extensionfor.md) | A factory function to create binding template for extensions of the given extension point |
|  [extensionPoint(name, specs)](./core.extensionpoint.md) | Decorate a class as a named extension point. If the decoration is not present, the name of the class will be used. |
|  [extensions(extensionPointName, metadata)](./core.extensions.md) | Shortcut to inject extensions for the given extension point. |
|  [filterByServiceInterface(serviceInterface)](./core.filterbyserviceinterface.md) | Create a binding filter by service class |
|  [isLifeCycleObserver(obj)](./core.islifecycleobserver.md) | Test if an object implements LifeCycleObserver |
|  [isLifeCycleObserverClass(ctor)](./core.islifecycleobserverclass.md) | Test if a class implements LifeCycleObserver |
|  [lifeCycleObserver(group, specs)](./core.lifecycleobserver.md) | Sugar decorator to mark a class as life cycle observer |
|  [mountComponent(app, component)](./core.mountcomponent.md) | Mount a component to an Application. |
|  [service(serviceInterface, metadata)](./core.service.md) | <code>@service</code> injects a service instance that matches the class or interface. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [ApplicationConfig](./core.applicationconfig.md) | Configuration for application |
|  [ApplicationMetadata](./core.applicationmetadata.md) | Type description for <code>package.json</code> |
|  [ClassMap](./core.classmap.md) | A map of classes to be bound to a context |
|  [Component](./core.component.md) | A component declares a set of artifacts so that they can be contributed to an application as a group |
|  [LifeCycleObserver](./core.lifecycleobserver.md) | Observers to handle life cycle init/start/stop events |
|  [ProviderMap](./core.providermap.md) | A map of provider classes to be bound to a context |
|  [Server](./core.server.md) | Defines the requirements to implement a Server for LoopBack applications: start() : Promise<void> stop() : Promise<void> It is recommended that each Server implementation creates its own child Context, which inherits from the parent Application context. This way, any Server-specific bindings will remain local to the Server instance, and will avoid polluting its parent module scope. |
|  [ServiceOptions](./core.serviceoptions.md) | Options to register a service binding |

## Namespaces

|  Namespace | Description |
|  --- | --- |
|  [CoreBindings](./core.corebindings.md) | Namespace for core binding keys |
|  [CoreTags](./core.coretags.md) |  |
|  [extensions](./core.extensions.md) |  |

## Variables

|  Variable | Description |
|  --- | --- |
|  [DEFAULT\_ORDERED\_GROUPS](./core.default_ordered_groups.md) |  |
|  [lifeCycleObserverFilter](./core.lifecycleobserverfilter.md) | Find all life cycle observer bindings. By default, a binding tagged with <code>CoreTags.LIFE_CYCLE_OBSERVER</code>. It's used as <code>BindingFilter</code>. |

## Type Aliases

|  Type Alias | Description |
|  --- | --- |
|  [ControllerClass](./core.controllerclass.md) |  |
|  [LifeCycleObserverGroup](./core.lifecycleobservergroup.md) | A group of life cycle observers |
|  [LifeCycleObserverOptions](./core.lifecycleobserveroptions.md) |  |
|  [MixinTarget](./core.mixintarget.md) | A replacement for <code>typeof Target</code> to be used in mixin class definitions. This is a workaround for TypeScript limitation described in - https://github.com/microsoft/TypeScript/issues/17293 - https://github.com/microsoft/TypeScript/issues/17744 - https://github.com/microsoft/TypeScript/issues/36060 |
|  [ServiceInterface](./core.serviceinterface.md) | Representing an interface for services. In TypeScript, the <code>interface</code> does not have reflections at runtime. We use a string, a symbol or a Function as the type for the service interface. |
|  [ServiceOrProviderClass](./core.serviceorproviderclass.md) |  |
|  [ShutdownOptions](./core.shutdownoptions.md) | Options to set up application shutdown |


