Skip to main content

Your First Entity

Get a software entity into the ForgePortal catalog by adding an entity.yaml file to a Git repository. The platform discovers it via a repo scan (scheduled or manual) or via webhooks when you push.

The entity.yaml format​

ForgePortal expects a single file per repo (or per path), by default named entity.yaml at the repo root. It must be valid YAML and match this structure (from the catalog schema):

  • apiVersion β€” Must be forgeportal/v1.
  • kind β€” One of: service, library, website, api, component, resource, system, domain, group, user, template.
  • metadata β€” Name, namespace, optional description, tags, links.
  • spec β€” Optional owner, lifecycle, relations (e.g. dependsOn, providesApi, consumesApi).

Example: a backend service​

apiVersion: forgeportal/v1
kind: service
metadata:
name: my-backend
namespace: default
description: Order and payment backend API
tags:
- java
- spring-boot
links:
- title: Repo
url: https://github.com/my-org/my-backend
- title: Runbook
url: https://wiki.my-org.com/runbooks/my-backend
spec:
owner: team-platform
lifecycle: production
dependsOn:
- component:auth-service
providesApi:
- https://api.my-org.com/orders
  • metadata.name β€” Short name (1–255 chars); must be unique within the namespace.
  • metadata.namespace β€” Defaults to default if omitted.
  • metadata.tags / metadata.links β€” Optional; used for filtering and display.
  • spec.lifecycle β€” One of experimental, production, deprecated.
  • spec.dependsOn / spec.providesApi / spec.consumesApi β€” Arrays of strings for relationships (exact format can depend on your conventions).

Minimal valid file​

apiVersion: forgeportal/v1
kind: component
metadata:
name: my-app
spec: {}

This is enough for the catalog to ingest the entity; other fields are optional.

Add the file to your repo​

  1. Create entity.yaml in the root of your repository (or the path you configured in discovery.entityFilePath in forgeportal.yaml).

  2. Commit and push to the default branch (e.g. main):

    git add entity.yaml
    git commit -m "Add ForgePortal entity"
    git push origin main

How the entity gets into the catalog​

ForgePortal discovers entities in two ways:

  1. Repo scan β€” The worker (or a cron) runs a repo-scan job. It uses the SCM provider (GitHub/GitLab) and the configured discovery orgs in forgeportal.yaml to list repos and look for entity.yaml. When found, it reads the file and upserts the entity into the catalog.
  2. Webhooks β€” If you configured SCM webhooks (e.g. push events), the API receives the event and can trigger ingestion for the changed repo/path.

So either:

  • Configure discovery in forgeportal.yaml (and ensure SCM credentials are set), then run a manual scan from the Admin β†’ Scan page or wait for the scheduled scan, or
  • Configure webhooks for your repo so pushes trigger ingestion.

Until discovery orgs and/or webhooks are set up, the platform won’t see new repos automatically; use Admin β†’ Scan to trigger a manual repo scan if your setup supports it.

See the entity in the catalog​

  1. Trigger discovery β€” Run a manual repo scan (Admin β†’ Scan) or wait for the next scheduled scan / webhook.
  2. Open the catalog β€” In the UI, go to Catalog (or the main catalog view).
  3. Filter or search β€” Find your entity by name, kind, or tags. Click it to see its detail page (metadata, spec, relations, docs if indexed).

You’ve just gone from zero to a visible entity in the catalog. Next you can add more entities, set up templates and scorecards, and plug in OIDC for production use.

Reference: full metadata and spec​

From the catalog schema:

FieldTypeRequiredNotes
apiVersionforgeportal/v1YesLiteral
kindstringYesOne of the 12 kinds listed above
metadata.namestringYes1–255 chars
metadata.namespacestringNoDefault default
metadata.descriptionstringNoFree text
metadata.tagsstring[]NoDefault []
metadata.linksarrayNo{ title, url }; url must be valid URL
spec.ownerstringNoOwner ref (e.g. team name)
spec.lifecyclestringNoexperimental | production | deprecated
spec.dependsOnstring[]NoDefault []
spec.providesApistring[]NoDefault []
spec.consumesApistring[]NoDefault []

For more on the entity model and relations, see Concepts β€” Entity model.