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 thepnpm 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.
pnpm install # Install dependencies
pnpm run dev # Start dev; creates .env on first runThe API plugin uses PostgreSQL via Drizzle. Without API_DATABASE_URL set, bos dev uses a persistent per-workspace pglite data directory under .bos/db, so local state survives restarts. Set API_DATABASE_URL, AUTH_DATABASE_URL, PROJECTS_DATABASE_URL and BUILDERS_DATABASE_URL in .env to use your own Postgres instead. Migrations run automatically on startup; pnpm 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.app.ts'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
bos publish # Publish config only to the FastKV registry under `account`
bos deploy # Build, upload bundles to the CDN, publish config, redeploy the runtime
bos deploy --env staging # The same for staging (CI runs this on push to `staging`)Staging CI deploys with a project-scoped Railway token, which can redeploy the dashboard service but cannot change its image. After a bos upgrade moves to a new release, switch the staging service's source to the new image by hand once the staging deploy has published: Railway → staging → dashboard → Settings → Source → ghcr.io/nearbuilders/everything-dev:v<release>.
bos info # Show configuration
bos status # Check remote health
bos clean # Clean build artifacts- UI Changes: Edit
ui/src/→ hot reload automatically → ship withbos deploy - API Changes: Edit
api/src/→ hot reload automatically → ship withbos deploy - Runtime Config: Edit
bos.app.ts→ deploy withbos deploy(the host is remote — see Architecture)
Always run these commands before committing:
pnpm test # Run all tests
pnpm typecheck # Type check all packages
pnpm 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.app.ts's extends); this repo owns ui/ and api/ only.
┌─────────────────────────────────────────────────────────┐
│ Host (Remote — not in this repo) │
│ Hono.js + oRPC + bos.app.ts 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 the published config (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 bundles served from the everything.dev CDN
All runtime configuration lives in bos.app.ts. 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 deploy is the release path: it uploads the bundles, publishes the config to FastKV and redeploys the runtime image.
This project uses Biome for linting and formatting:
# Check linting
pnpm lint
# Fix auto-fixable issues
pnpm lint:fix
# Format code
pnpm 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