portalBeta

Your first checked pull request

From installing the app to a pull request that portal checks against your architecture. Most repos take a few minutes.

  1. Install the GitHub App on a repo

    Sign in with GitHub and pick the repos to add. Portal reads each one and draws its map, usually within a minute.

  2. Check the map

    Services, datastores, queues and the calls between them, read from your Compose, Kubernetes, Helm, Terraform or cloud files and your code. If something's off, tell us in the community: the readers get better from real repos.

  3. Add the starter spec

    The system's Spec tab shows a spec written from what portal read. Copy it into architecture/model.c4, name things your way if you like, and merge it. From then on, every change is checked against it.

  4. Open a pull request

    Every pull request gets a check. It fails when the code adds a connection the spec doesn't have, or breaks one of your rules, with the file and line.

  5. Add a rule

    One line on an element in the spec, such as never_calls 'payments-db' on the web app. Portal checks it on every pull request and every push.

  6. One system across several repos

    One repo per service? Keep one spec, in the repo you choose, and say where each part's code lives: metadata { repo 'acme/payments' } on the element, or on a domain around several. Install the GitHub App on those repos too (the same account). Portal reads them into one map, connects services across them by address, and checks a pull request in any of them against that spec. A repo it can't read is listed, not guessed.

  7. Let an agent build

    Plan the change in the spec, then let Claude Code, Codex or Cursor work on a branch. The system page lists the branch under Agent branches, with each push read against the spec.

Reference: the spec

Why not just LikeC4? LikeC4 draws the system you planned. Portal reads the code and config to see the system you actually have, and checks every pull request and agent push against your spec. Your spec stays a standard LikeC4 file, so you can keep using any LikeC4 tool with it.

The spec is LikeC4 in architecture/*.c4. Portal reads each element's kind, its connections, and these lines in its metadata { } block. The element kinds and connection kinds are portal's vocabulary: any your spec doesn't define, portal supplies when it reads it, so a missing or edited specification block can't break the map. Your own extra kinds work beside them. Tag one with a portal kind, as in element queue { #event }, to draw it in that row.

LineWhat it does
code 'src/cart/**'

The files that are this element. A changed file marks it changed on a pull request; when none of its files exist yet, it's planned.

docs 'docs/cart.md'

Its docs. A pull request that changes the code but not these is flagged as stale docs.

resource 'cart-queue'

The deployed thing it is: a container, Worker, queue, database or bucket name, as the config names it.

otel_service 'cart'

Its OpenTelemetry service.name, so traffic from traces lands on it. Several are comma-separated.

only_writes_from 'orders'

A rule on a datastore: nothing else may write to it. See Rules.

never_calls 'payments-db'

A rule on any element: it may not call these. See Rules.

Kinds portal draws in their own row: actor, domain, api, service, component, event, datastore and infra. Connection kinds: request, publishes, consumes, reads and writes (a -[writes]-> b).

Reference: rules

A rule is one line on an element. Portal checks it against three things: the spec's own connections, the code (config bindings and calls in the source, with file and line), and traffic from traces.

  • only_writes_from 'Checkout, Refunds' on an element: A write to it, or to what's inside it, from anything other than these (or what's inside them) breaks it.
  • never_calls 'payments-db' on an element: Any connection from it, or from what's inside it, to these breaks it.
  • only_called_by 'Checkout, Web' on an element: A connection to it, or to what's inside it, from anything other than these (or what's inside them) breaks it.
  • entry 'Orders API' on a domain: A connection from outside the domain to any part other than these, such as another domain calling its database directly, breaks it.
  • max_major '19' on an element: A pull request that makes its part run a higher major version (a newer image tag, a Terraform engine version) breaks it.
  • planned 'true' on an element: Not a rule that breaks: the check says when the marker can go.
  • Names are element ids or titles. A name that matches nothing is reported, so a typo doesn't quietly turn a rule off. A metadata key a letter or two off one portal reads, such as only_write_from, is reported too, with the key it was probably meant to be.
  • A pull request is flagged only for breaks it adds. Breaks already on the default branch show on the system page, not on every pull request.

Reference: the check

Each pull request gets a GitHub check named portal facts and one comment, updated on each push. No AI decides the result.

  • Success, "Nothing to act on": the code and the spec agree, as far as the change goes.
  • Neutral, "Needs confirmation": the only findings are dropped tables or columns, a major version upgrade, or a version that's no longer pinned. Each can be the point, so approving the pull request is the confirmation. A neutral check doesn't block merging. A downgrade fails.
  • Failure: a connection or part the spec doesn't have, a broken rule, a spec that doesn't parse, stale docs, or a drop of 3 points or more in how much of the code the spec covers. The check lists each one with its file and line, and the edit that would fix the spec.
  • To require it: in the repo's settings, under Branches, add a branch protection rule for the default branch, turn on "Require status checks to pass" and pick portal facts.
  • Optional AI review: off by default. Someone with write access turns it on for the repo, or comments /portal review on one pull request.

Reference: agent branches

  • Which branches: every branch except the default one, and except Dependabot, Renovate, release-please and gh-pages branches. Portal reads each push.
  • Which agent: from the commits (a Co-Authored-By line for Claude, Codex, Cursor or Copilot, or Claude Code's footer), else from the branch name (claude/, codex/, cursor/, copilot/). Branches with neither are listed as a person's.
  • Planned: what the branch's own spec adds. Parts and connections it adds are planned until the code makes them, then built.
  • What's flagged: a broken rule, or code that adds a part or connection the spec doesn't have, each with the push that did it. Someone with write access can mark a break as intended or to be fixed; the decision is kept with their login.

Reference: database schemas

  • Which files: .sql files (plain SQL, Flyway's V1__init.sql, golang-migrate and the like), Prisma's schema.prisma, Alembic migrations (alembic/versions/*.py, migrations/versions/*.py) and Entity Framework migrations (Migrations/*.cs). Tables created in code as SQL strings count too. Test, fixture and seed folders are left out.
  • What you see: each datastore's tables and columns after every migration, and the history, oldest first. Click a datastore on the map.
  • On a pull request: the schema files it changes are compared before and after: tables and columns created, moved or dropped. A drop is "Deletes data on deploy". When it's the only finding, the check is neutral and approving the pull request is the confirmation.

Reference: versions

  • In the code: each datastore's and broker's version, from its image tag (Compose, Kubernetes, Helm, with .env values) or its Terraform engine version (RDS, ElastiCache, Cloud SQL, Azure). Click it on the map. A version that isn't pinned says why.
  • On a pull request: each version it changes. A major upgrade needs a confirmation, a downgrade fails, a minor one is listed.
  • Running: what your own infrastructure reports, next to what the code says: running what the code says, not deployed yet, or changed outside the code. A reading over a day old is shown as stale. Portal holds no cloud or database credentials. Services report theirs in the traces they already send (service.version, and the container image when the OpenTelemetry Collector adds it). For a database, which sends no traces, a collector you run sends the reading with the repo's telemetry key.

For example, from a scheduled job with access to the cluster:

kubectl get pods -n shop -o json \
 | jq '{env: "prod", source: "kubectl", parts: [.items[]
     | .spec.containers[] | {name, image}]}' \
 | curl -sS -X POST https://getportal.build/running/OWNER/REPO \
     -H "Authorization: Bearer $PORTAL_TOKEN" \
     -H "Content-Type: application/json" --data-binary @-

Managed databases report their own version, for example aws rds describe-db-instances (EngineVersion), sent as { name, engine, version }.

Reference: where a change is

  • The steps: read from .github/workflows. Portal reads which workflows a pull request or a push starts (with their branch filters), their jobs, which job waits for which (needs), matrix sizes, environments, and the paths a job names, such as a Dockerfile per service, to say which parts it builds. Jobs from a reusable workflow are shown inside the job that calls it.
  • The results: GitHub's check runs on the change's latest commit, matched to the jobs by name. A matrix job sums its runs, and a job after a failed one says it didn't run and why. Results are fetched when the page is opened, at most once every 15 minutes per commit.
  • On a pull request: the change, portal's check, CI, then review (approvals and requested changes), merge, and the deploy jobs that run afterwards. On an agent's branch: the plan and its pushes, portal's check on the latest push, the workflows a push to that branch starts, and those that start once a pull request is opened.
  • GitHub Actions only, for now.

Reference: the bar

Type to find a part or a file on the page. Press Enter to ask a question instead: Claude answers from portal's facts about that system (its spec, what was read from the code with file and line, pull requests' checks, traffic and agent branches), not from its source code, and says when the facts don't cover it. A system gets 100 questions a day from signed-in readers and 30 from visitors.

Want more?

See How it works for everything portal reads, Explore for real systems with real pull requests, or ask in the community.