The dashboard for multiagency.ai — an on-chain agency: a DAO-shaped entity sourcing contributors, budgeting treasury to projects, and billing against those budgets.
Maintained by MultiAgency. Built on everything.dev.
A Module Federation site composed at runtime, using the every-plugin architecture and the everything-dev api & cli, with NEAR Protocol integration.
Built with Tanstack Start, Hono.js, oRPC, better-auth, and rsbuild.
The app is split into four auth-gated sections plus public pages:
- Public (
/) — Landing, projects directory, apply forms, contact, docs, treasury, team, work /platform— Super admin only (user.role === "admin"). App owner dashboard for creating and managing all organizations. Init the agency org here on first deploy./admin— Agency admin & owner (Better Auth org roleadminorowner). Manage agency settings (/admin/settings), members (/admin/members), and projects (/admin/projects/:slug)./dashboard— Agency members, admins, and owners (org rolemember,admin, orowner)./client— Any authenticated user. Client portal for organizations with metadatatype: "client".
API routes are gated server-side with Better Auth organization roles:
- Read-only (list projects, contributors, budgets, etc.):
admin,owner,member - Write & financial (create/delete, budget transfers, billing):
admin,owner - Platform (org creation, global listing):
user.role === "admin"super admin only
On-chain treasury operations (proposals, token balances, FT holdings) integrate with Sputnik DAO contracts when the org's metadata includes a daoAccountId. Non-DAO orgs treat the org account as self-owned.
Deploy the app, then make yourself a super admin to set up the initial agency.
- Sign in with your NEAR wallet at the deployed URL.
- Open the auth database and set your user role to
admin:In the Drizzle Studio UI, navigate to thebun bos db studio auth
usertable and set therolecolumn toadminfor your user row. - Visit
/platformand create your agency organization (type: "agency") with an optionaldaoAccountIdif you have a Sputnik DAO. - Invite agency admins and members from
/admin/members.
bun install # Install dependencies
bun run dev:postgres # Boot docker compose Postgres + start dev (persistent local dev)
# or:
bun run db:migrate && bun run dev # Use the configured API_DATABASE_URL, or in-memory pglite by defaultThe API plugin uses PostgreSQL via Drizzle. Without API_DATABASE_URL set, it boots against an in-memory pglite database — fine for quick exploration but state resets on every restart. For persistent local dev, bun run dev:postgres boots PostgreSQL instances via docker-compose.yml (api/auth/projects on 5432/5433/5434) and starts the dev server. Migrations run automatically on startup; bun run db:migrate applies them manually against the configured database.
To inspect databases locally:
bos db studio api # API database (agency schema)
bos db studio auth # Auth database (users, sessions, organizations)
bos db studio projects # Projects plugin database
bos db studio <plugin> # Any registered plugin databaseThis serves the UI and API locally and mounts them on a remote host (loaded via bos.config.json's extends). See AGENTS.md for the full port table. UI defaults to http://localhost:3003 (rsbuild auto-bumps if occupied — check the dev server output).
everything-dev is the canonical runtime package and CLI. bos is a command alias for the same tool. See the framework skills at .opencode/skills/everything-dev/ — dev-workflow/SKILL.md for the dev cycle and publish-sync/SKILL.md for deployment, sync, and upgrade flows.
everything-dev dev --host remote # Remote host, local UI + API (typical)
everything-dev dev --ui remote # Isolate API work
everything-dev dev --api remote # Isolate UI work
|/ --proxy # Use a proxy
everything-dev dev # Full local, client shell by default
# `bos` is an alias for the same commands
bos dev --ssr # Opt into local SSReverything-dev start --no-interactive # All remotes, production URLsbos build # Build all packages (updates bos.config.json)
bos publish # Publish config to the FastKV registry under `account`
bos publish --deploy # Build/deploy all workspaces, then publish
bun run publish # Same publish command via root scriptbos info # Show configuration
bos status # Check remote health
bos clean # Clean build artifacts- UI Changes: Edit
ui/src/→ hot reload automatically → publish withbos publish --deploy - API Changes: Edit
api/src/→ hot reload automatically → publish withbos publish --deploy - Runtime Config: Edit
bos.config.json→ publish withbos publish --deploy(the host is remote — see Architecture)
Always run these commands before committing:
bun test # Run all tests
bun typecheck # Type check all packages
bun lint # Run linting (see lint setup below)See CONTRIBUTING.md for detailed contribution guidelines including:
- Branch naming conventions
- Semantic commit format
- Pull request process
- AGENTS.md - Quick operational guide for AI agents
- CONTRIBUTING.md - Contribution guidelines and git workflow
- ui/public/README.md - Public-facing description of the maintainer's reference deployment
- ui/public/skill.md - Agent-oriented usage notes for the deployed site
Module Federation monorepo with runtime-loaded configuration. The host is remote (loaded via bos.config.json's extends); this repo owns ui/ and api/ only.
┌─────────────────────────────────────────────────────────┐
│ Host (Remote — not in this repo) │
│ Hono.js + oRPC + bos.config.json loader │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Module Federation│ │ every-plugin │ │
│ │ Runtime │ │ Runtime │ │
│ └────────┬─────────┘ └────────┬─────────┘ │
│ ↓ ↓ │
│ Loads UI Runtime Loads API Plugins │
└───────────┬─────────────────────────┬───────────────────┘
↓ ↓
┌───────────────────────┐ ┌───────────────────────┐
│ ui/ (Runtime) │ │ api/ (Plugin) │
│ React + TanStack │ │ oRPC + Effect │
│ ui/src/app.ts │ │ remoteEntry.js │
└───────────────────────┘ └───────────────────────┘
Key Features:
- ✅ Runtime Configuration - All URLs from
bos.config.json(no rebuild needed) - ✅ Independent Deployment - UI and API deploy separately
- ✅ Type Safety - End-to-end with oRPC contracts
- ✅ UI Runtime Boundary -
everything-dev/ui/clientand/serverown router/runtime glue - ✅ CDN-Ready - Module Federation with Zephyr Cloud
All runtime configuration lives in bos.config.json. The agency surface lives in api/, which proxies the upstream projects plugin via pluginsClient.projects(proxyCtx(orgAccountId)) for project CRUD (list/get/create/update). See AGENTS.md for the plugin model and proxy-as-org rule.
bos publish --deploy is the release path when you want Zephyr URLs refreshed before publishing the config.
This project uses Biome for linting and formatting:
# Check linting
bun lint
# Fix auto-fixable issues
bun lint:fix
# Format code
bun formatBiome is configured in biome.json at the project root. Generated files (like routeTree.gen.ts) are automatically excluded.
Frontend:
- React 19 + TanStack Router (file-based) + TanStack Query
- Tailwind CSS v4 + shadcn/ui components
- Module Federation for microfrontend architecture
Backend:
- Hono.js server + oRPC (type-safe RPC + OpenAPI)
- every-plugin architecture for modular APIs
- Effect-TS for service composition
Database & Auth:
- PostgreSQL + Drizzle ORM (
pglitein-memory by default;node-postgreswhenAPI_DATABASE_URLis set) - Better-Auth with NEAR Protocol support
- everything.dev - Upstream foundation and runtime
- every-plugin - Plugin framework for modular APIs
- near-kit - Unified NEAR Protocol SDK
- better-near-auth - NEAR authentication for Better-Auth
MIT