Admin, Frontend, and API: three distinct responsibilities

Public reading, editorial actions, and machine requests need different permissions. How to keep shared rules consistent across these channels.

Reading, editing, and machine interaction: three ways to work with the same content.
Reading, editing, and machine interaction: three ways to work with the same content.

Why reading a page, performing an editorial action, and making a machine request need their own boundaries.

The same article can be available to a reader on a website, to an editor in a management panel, and to another program through an API. The subject remains the same, but the permitted actions differ. The reader needs the published text. The editor needs to create and change the material. The program receives only the data and actions allowed by its contract.

Solution200 treats these roles as separate application responsibilities. Shared domain behavior can be reused. Route, dependency, and permission boundaries need to be defined for each role.

The frontend presents the product to the reader

The frontend handles the public presentation: pages, navigation, content presentation, and browser assets. For a journal, that means finding an article, opening it, and reading it in the appropriate locale and presentation.

This application does not need all the powers of the editorial panel. When a page reads completed material, the ability to change the database schema or manage editorial accounts does not follow from its task.

Article's public application combines shared reading and delivery capabilities with its own templates, styles, and presentation rules. Changing a button's color or a card's geometry remains its decision.

Admin manages editorial actions

Admin handles authenticated work with editorial data. Its scenarios raise different questions: who may change the text, which values a form accepts, what gets stored, and how an action affects related data.

The management panel has its own access controls and dependencies. Its technical capabilities should not accidentally become part of a public page. At the same time, the rules of the material itself need to retain the same meaning regardless of how an editorial action arrives.

In Article, editorial work and public pages belong to separate applications. But separating repositories alone does not establish an effective permission boundary: that boundary needs to be checked in the runtime environment.

The API defines machine interaction

An API is a contract for another program. It needs to define inputs, results, errors, and access conditions independently of how elements are arranged on a page.

Suppose an external program receives a list of published articles. That capability does not grant permission to see drafts or change text. If editorial actions are needed through the API, their permissions must be defined separately.

Solution200's architecture allows a separate API role. This does not mean every product already has a running API or must create one. The needs of the particular product determine which applications it requires.

Separate the channels, preserve the meaning

The main risk of this separation is creating a copy of the business rules in each channel. The editorial form could then accept one set of values, the API another, while the public page interprets the material's state in its own way.

A shared domain capability is needed to keep that meaning consistent. Channels handle how an action arrives or a result is presented. They should not independently define what an article, its locale, or its accepted state means.

RoleMain questionPermissions that do not follow from the role
FrontendWhat can the user see?Editing material and changing the schema
AdminWhich editorial action may a person perform?Unrestricted access to other products
APIWhich request and result are allowed for a program?Access to every field and every action

This is a functional matrix, not a ready-made authorization scheme. A real product may contain additional scenarios that need explicit rules.

An example machine request

In this illustrative example, an external program requests a list of published articles. The API checks whether the request is authorized and returns only permitted fields. Requesting drafts or performing an editorial action requires a different permission.

The shared rules of the material retain the same meaning for a machine request and a public presentation. The request and response format belongs to the API. If the program later gains an editorial scenario, its domain checks need to remain consistent with the rules used by Admin.

Application boundaries and access rights

A separate application does not automatically create a separate server, database, or independent failure boundary. Access, configuration, and actual routing need to be checked. Separating responsibilities establishes boundaries for these decisions, but does not implement them by itself.

A useful consequence for design is to start with the action and its permissions. That makes it clear which channel accepts the action and where the shared rules belong.

  1. Databases Four database access roles for one product
  2. Architecture An application layout in /srv: code, public files, and writable data
  3. Architecture Shared model, different use cases: public reading and editorial writes
  4. Symfony Core Independent sites with a shared Symfony foundation
  5. Editorial Article: how a personal journal becomes a product

A project by the author · Weather Solution200

After reading, a look outside.

Temperature, rain and wind in your city. Check the forecast and plan the hours ahead.

Check the forecast
Next article