backend-system: doc tweaks

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-02-22 14:30:46 +01:00
parent bc6653f4e2
commit c3dc3fedda
6 changed files with 8 additions and 14 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
---
id: index
title: Backend System Architecture
sidebar_label: System Architecture
sidebar_label: Overview
# prettier-ignore
description: The structure and architecture of the new Backend System and its component parts
---
@@ -43,7 +43,3 @@ export const catalogModuleExampleCustomProcessor = createBackendModule({
Notice that we're placing the extension point we want to interact with in the `deps` option, while also depending on the logger service at the same time. When initializing modules we can depend on both extension points and services interchangeably. You can also depend on multiple extension points at once, in case the implementation of the module requires it.
It is typically best to keep modules slim and to each only add a single new feature. It is often the case that it is better to create two separate modules rather than one that provides both features. The one limitation here is that modules can not interact with each other and need to be self contained.
## HTTP Handlers
Since modules have access to the same services as the plugin they extend, they are also able to register their own HTTP handlers. For more information about the HTTP service, see [core services](../core-services/01-index.md). When registering HTTP handlers, it is important to try to avoid any future conflict with the plugin itself, or other modules. A recommended naming pattern is to register the handlers under the `/modules/<module-id>` path, where `<module-id>` is the kebab-case ID of the module, for example `/modules/example-custom-processor/v1/validators`. In a standard backend setup the full path would then be `<backendUrl>/api/catalog/modules/example-custom-processor/v1/validators`.
@@ -11,12 +11,12 @@ description: Building backends using the new backend system
> NOTE: If you have an existing backend that is not yet using the new backend
> system, see [migrating](./08-migrating.md).
This section covers how to set up and customize your own Backstage backend. It covers some aspects of how backend instances fit into the larger system, but for a more in-depth explanation of the role of backends in the backend system, see [the architecture section](../architecture/02-backends.md).
# Overview
A minimal Backstage backend is very lightweight. It is a single package with a `package.json` file and a `src/index.ts` file, not counting surrounding tooling and documentation. The package is typically placed within the `packages/backend` folder of a Backstage monorepo, but that is up to you. The backend package is part of any project created with `@backstage/create-app`, so you typically do not need to create it yourself.
You'll get a brief description here, but for a more in-depth explanation of the role of backends in the backend system, see [the architecture section](../architecture/02-backends.md).
When you create a new project with `@backstage/create-app`, you'll get a backend package with a `src/index.ts` that looks something like this:
```ts
@@ -11,11 +11,9 @@ description: Building backend plugins and modules using the new backend system
> NOTE: If you have an existing backend and/or backend plugins that are not yet
> using the new backend system, see [migrating](./08-migrating.md).
## Overview
Backend [plugins](../architecture/04-plugins.md) and
[modules](../architecture/06-modules.md), sometimes collectively referred to as
backend _features_, are the building blocks that adopters add to their
This section covers how to build your own backend [plugins](../architecture/04-plugins.md) and
[modules](../architecture/06-modules.md). They are sometimes collectively referred to as
backend _features_, and are the building blocks that adopters add to their
[backends](../architecture/02-backends.md).
## Creating a new Plugin
@@ -1,7 +1,7 @@
---
id: index
title: Core Backend Service APIs
sidebar_label: Core Services
sidebar_label: Overview
# prettier-ignore
description: Core backend service APIs
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
id: index
title: The Backend System
sidebar_label: Overview
sidebar_label: Introduction
# prettier-ignore
description: The Backend System
---