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
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 instructionsA minimal interface-only package:
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: campusOmitting 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.
workload:
type: firecracker
image: example/notes:0.1.0
port: 3000
dataPath: /data
persistentData: true
defaults:
lifecycle:
mode: automatic
idleTimeoutSeconds: 300
warmOnCampusOpen: falseThe 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.
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: /statusThe 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:
npm run test:packagesFirst-party Campus interfaces additionally compile from Squint ClojureScript and pass the UI contract suite:
npm run build:frontend
npm run test:ui-contractsDistribution snapshots the complete schema-9 package and its immutable frontend/workload provenance. Continue with Campus Distribution and the public package specification.