Skip to content

Build a Campus app ​

A Campus app is one installable package. Add only the components your software needs; a frontend, workload, agent, public endpoint, or paid service all compose under the same installation principal.

Package shape ​

text
your-app/
├── campus.yaml
├── frontend/
│   └── index.html
├── backend/              optional workload source
├── Dockerfile            required for a source-built workload
├── agent/                optional private agent material
├── README.md
└── AGENTS.md             optional publisher instructions

A minimal interface-only package:

yaml
schemaVersion: 9
id: example-notes
name: Notes
version: 0.1.0
publisher: Example
summary: Keep notes in a fast Campus interface.
category: Productivity
icon: "◇"
defaultInstall: false

frontend:
  entrypoint: index.html
  chrome: auto
  theme: both
  tint: campus

Omitting workload is a complete steady state. Campus installs an application principal, publishes the immutable frontend revision, and reports that no workload exists.

Add durable execution ​

Declare an isolated workload when the app needs a private backend, persistent volume, public service, agent process, or background work.

yaml
workload:
  type: firecracker
  image: example/notes:0.1.0
  port: 3000
  dataPath: /data
  persistentData: true

defaults:
  lifecycle:
    mode: automatic
    idleTimeoutSeconds: 300
    warmOnCampusOpen: false

The user owns lifecycle policy. Packages declare interfaces that are eligible to wake a workload; they do not grant themselves indefinite background execution. See application lifecycle.

Request exact authority ​

Permissions are maximum requested authority and every entry explains why the app needs it.

yaml
permissions:
  - id: notifications.send
    resources: [self]
    reason: Tell the owner when a long-running export finishes.
  - id: endpoints.public
    resources: [GET:/status]
    reason: Publish the owner-approved service status page.

publicEndpoints:
  - method: GET
    path: /status

The package declaration and the installation grant must both allow an operation. Public routes, provider access, tools, data, and payments each retain their own policy boundary.

Connect with CampusSDK ​

Browser and native software receive a scoped launch descriptor. Workloads receive an installation-local service address and Gateway credential. Neither path reveals the private backend address or a reusable provider credential.

Use CampusSDK for typed requests, JSON, sockets, server-sent events, notifications, files, Content, intelligence, lifecycle leases, and shell interaction.

Validate and distribute ​

Bundled packages are validated with:

sh
npm run test:packages

First-party Campus interfaces additionally compile from Squint ClojureScript and pass the UI contract suite:

sh
npm run build:frontend
npm run test:ui-contracts

Distribution snapshots the complete schema-9 package and its immutable frontend/workload provenance. Continue with Campus Distribution and the public package specification.

Software belongs to people. Campus gives it a durable place to run.