Peripheral by Nepheli

Many apps. One platform.

Build internal applications on one multi-tenant platform. File conventions and a declarative DSL connect screens to named operations. Your developers write the business rules in PostgreSQL and can use them from another backend.

Application architecture

What comes with your next application.

Shared workspaceRead pipelinesPostgreSQL

Shared application environment

Start with the platform already in place.

A new app can use the existing employee identity, organisation selector and navigation. Your team can concentrate on what this application does for the business.

Application development

Make the data flow readable.

A named read pipeline lists the queries, their order and any transformations. Developers can follow the data in the source. A colleague who reads SQL can review what the application shows and how it was calculated.

Business logic

Keep each rule with the data it governs.

PostgreSQL functions define business decisions and state changes. Python coordinates requests and integrations. Updating a business rule has a clear starting point, even when several applications use it.

Domain-specific languages

What the team declares. What the database decides.

A DSL is a domain-specific language. Peripheral assigns each decision to the language that can express it directly. SQL describes business rules. YAML declares which operation to run and where its inputs come from.

Convention over configuration

An HTML template and its companion route file share a predictable location and name. Beside a SQL query, the matching .meta file describes its parameters. A developer moving between apps knows where to look.

Configuration over backend code

For an action the platform already supports, the team declares the query, the condition that selects it and the sources of its inputs. The shared runtime interprets the declaration. Developers add Python for specialised orchestration or integrations.

Direct Menu

Show or hide a menu item

The menu route selects the same named operation when a form or JSON request asks to change visibility. Its input declaration binds the item identifier and the visibility flag. PostgreSQL updates the item and returns visible or hidden. The function also defines invalid_input and not_found outcomes.

menu.yml

- name: crUd_op_direct_menu_item_visibility_set
  when:
    form: $form.action == 'item_visibility_set'
    json: $json.action == 'item_visibility_set'

Visibility input · .meta

p_is_visible:
  type: bool
  from:
    form: $form.p_is_visible
    json: $json.p_is_visible

From the URL to the data on screen

In Next.js, a file’s location defines the route to a page. The convention has spread across ecosystems, from SvelteKit to Expo Router for mobile apps. Open a second Peripheral app and you already know where to look. An HTML template or Python handler can have a same-named .yml file alongside it declaring that route’s methods, roles and operations.

Next.js · App Router · SvelteKit · Routing · Expo Router

What can Jinja2 read?
In Cashier, new-payment.yml declares a direct database query and the payment_context read pipeline. The pipeline names its three reads. In new-payment.html, Jinja2 can read the SQL results from payload.db_results and the available counterparties from payload.pipelines.payment_context.counterparties.
How does an external integration reach the screen?
For an external API, app-owned files describe the request sequence and, where needed, the SQL data source and field mappings. A runner makes the calls. On Metadminer’s integration management page, the Python handler passes the integration data to Jinja2 under the explicit name external_api_bootstrap_json.
Where do you change a web scraping workflow?
A separate YAML workflow declares the collection steps, the fields to extract and the checks on the result. When a source page changes its layout, the maintainer can start with the declaration that locates the affected field.

What the agent sees and the developer checks

If an AI agent invents a step reference or refers to a result before it exists, the pipeline check rejects the declaration. A developer taking over the change can follow the same trail from route to SQL and judge whether the business rule is right. These conventions give the agent fewer decisions to guess at and the developer fewer architectural details to memorise between apps.

Application gallery

Inside Peripheral.

A restaurant menu, a shift roster, a sports desk and a cashier each need a different interface. These four apps run on Peripheral.

Identity & access

One account across internal applications.

Employees choose an organisation and an authorised app from the shared navigation. Their account travels with them. The active tenant sets the data context, and the role assigned in that app determines which actions are available. A new internal app can use the same account, selectors and menu.

Peripheral access model
Employee identity
ScopeWhat it determines
OrganisationThe active tenant
App assignmentWhich app the employee can open
Role in the appWhich actions the employee can take

Maintenance & handover

A familiar layout in every new app.

Peripheral generates the starting folders for routes, templates, metadata, SQL and migrations. Apps can reuse the HTMX layout for navigation. When a developer takes over an app, those conventions point to the files behind a screen and the SQL a colleague can review with them. Developers can use their usual editor and choose whether to work with AI.

An application’s source layout

Where the team makes a change

apps_logic/<app>/
routes/html/
pipelines/
sql_logic/
db_migrations/

Routes and templates define the screen. Named read pipelines describe how data is assembled. SQL files and their input metadata define operations, and migrations keep schema changes with the app.

At startup

Preflight checks inspect the source layout and validate the declarations that connect routes, queries and read pipelines.

In continuous integration

The CI workflow calls the broader integrity checks and the regression suite. Reviewers can use those checks when a change spans several files.

Pages & integrations

One authorised result. Two ways to use it.

A compatible Peripheral page can serve a human in a browser or another application. Both receive data from the same operation under the same organisation and app permissions.

What the caller receives

HTTP Accept

Accept: text/html

The shared shell presents the result as an HTML page. Templates control how the data appears and HTMX handles navigation within the application.

HTTP Accept

Accept: application/json

The caller requests JSON and receives the authorised page data directly. A team integrating that page can reuse the existing data path and its access checks.

HATEOAS in the kitchen queue

In Direct Menu’s kitchen queue, a pending order has an active “Done” button. Once the order is complete, the HTML from the server enables “Not done”. The form already contains the method, the address and the status change to submit.

The original model for REST was the Web itself. In 2000, Roy Fielding described its architecture as Representational State Transfer. One of its constraints is HATEOAS (Hypermedia as the Engine of Application State). Just as a browser discovers where it can go from the links on a page, here it discovers what it can do from the form on the order.

Fielding · REST §5.1.5 · REST and the Web · REST APIs must be hypertext-driven

HTMX islands

A new order arrives. Only the queue updates.

In Direct Menu, the kitchen queue declares which event it listens for, where to fetch the HTML and which part of the screen to replace. Read the queue’s own markup and you can follow the whole refresh. This is what HTMX calls locality of behaviour.

Direct Menu · simulated order feed
Navigation
1Waiting
Order feed
Page heading

Direct Menu / routes/html/index.html

<section id="dm-order-feed"
  hx-get="/direct_menu"
  hx-trigger="dm-refresh-orders from:body"
  hx-select="#dm-order-feed"
  hx-target="#dm-order-feed"
  hx-swap="outerHTML">

HTMX selects the order feed from the returned HTML and swaps it into that same spot on the page.

Where should a business rule live?

For a team maintaining several apps, that choice determines what has to change when a client requests a new rule or when the team replaces a service.

Architectural parallels

Phoenix / Elixir

Phoenix gives Elixir applications a predictable layout through generators such as mix phx.gen.html. In LiveView, the initial app.js already includes the client that connects a page over a WebSocket. In Peripheral, the shared template loads htmx 1.9.10 with the page. A developer can declare a connection with hx-ws on the HTML element that needs live updates.

mix phx.gen.html · Phoenix LiveView · htmx 1.x · hx-ws

Supabase

In Supabase, application code can call a PostgreSQL function through rpc(). In Peripheral’s Direct Menu, for example, PostgreSQL decides whether a restaurant is taking orders right now. In both designs the application can call the rule where the data lives.

Supabase · Database functions

How enterprise systems use database logic

Oracle Workflow

A configured workflow step can call a PL/SQL stored procedure. Its parameters can be exposed as activity attributes, so different steps can use the same procedure with different inputs.

Oracle Workflow Developer’s Guide

SAP Business One

A customer implementation can add checks in the stored procedure SBO_SP_TransactionNotification. Transaction validation becomes a place to apply a company rule across the application.

SAP Business One · 3396055

Entersoft Business Suite

In Entersoft’s example, changing the customer or business unit on a sales document triggers a SQL calculation. The database sums that customer’s turnover for the selected company and unit, and the application fills the document field with the result.

Entersoft · Technology guide

Business logic without vendor lock-in

Change the backend. Keep the business rule.

Can a guest place an order now? In Direct Menu, a PostgreSQL function reads the business timezone and ordering hours. It tests the local time, including the opening minute and excluding the closing time. If the team adds a service in Go or Rust, it can call that same function on its PostgreSQL installation. Change the opening hours once and both services use the revised schedule.

Peripheral can serve as an application incubator. The team can keep the other screens in Peripheral and move one service at a time.

Possible deployment design
PeripheralApplication route
Go / RustSpecialised service
PostgreSQLShared business operation

A replacement service supplies the tenant and user context, enforces the same permissions and preserves the transaction boundary. Teams can adapt the screens and route declarations independently.

Evaluating a switch

Bring an application your team maintains.

Choose one operation from your internal SaaS stack. A developer can trace its implementation while the person responsible for the business rule explains the behaviour the team needs to preserve.

What to bringOne operation, end to end

Start with the current entry point, the code that makes the decision and the screens or services that call it. Include the user roles, tenant scope and transaction boundary the operation depends on.

  1. Decide what moves

    Identify the rule that belongs in PostgreSQL. If it already lives there, assess whether Peripheral can call it as it stands. List the screens, integrations and access checks that need adaptation.

  2. Compare the behaviour

    In a test environment, run representative inputs through the current and proposed paths. Compare outputs, errors and database changes for each relevant role and tenant.

  3. Rehearse the handover

    Ask a developer who did not implement the change to locate the rule, make a small revision and run the checks. Use that experience to decide who will maintain the application and whether to move another operation.

Working with Nepheli

Explore the source.

Explore the underlying architecture in Mycelium, the public open-source evaluation edition. Then ask to see the commercial Peripheral distribution, including its newer named read pipelines, query contracts and shared application shell.

Commercial source and handover

Agree which platform and application files your team receives, what it can change and how it can use the source after handover. Choose any implementation services separately.

Training on your application

Developers can work through a real change in their own application. A colleague who reads SQL can trace the same rule and confirm that it reflects the intended policy.

Maintenance and managed delivery

Your team can operate and extend the application. Optional arrangements with Nepheli can cover annual maintenance, hosting, support or custom development, with responsibilities agreed for each service.

Architecture advisory

Technical leads and investors can discuss a separate architecture engagement on how these design principles might apply to another codebase or portfolio.

Application screen