Skip to content

Existing App

Use this path when you already have a Hono or Nitro app and want Junior to own the Slack runtime routes inside it.

The safest integration is still the scaffolded shape: a dedicated server entrypoint that exports the Hono app returned by createApp(), plus juniorNitro() in Nitro config.

Create a Junior server module:

server.ts
import { initSentry } from "@sentry/junior/instrumentation";
initSentry();
import { createApp } from "@sentry/junior";
import { plugins } from "./plugins.ts";
const app = await createApp({
plugins,
});
export default app;

createApp() mounts the supported Junior routes listed in Route & Handler Surface.

Create a runtime-safe plugin set and point juniorNitro() at it so app files and declared plugin packages are copied into the deployment bundle:

plugins.ts
import { defineJuniorPlugins } from "@sentry/junior";
export const plugins = defineJuniorPlugins(["@sentry/junior-sentry"]);
nitro.config.ts
import { defineConfig } from "nitro";
import { juniorNitro } from "@sentry/junior/nitro";
export default defineConfig({
modules: [
juniorNitro({
plugins: "./plugins",
}),
],
routes: {
"/**": { handler: "./server.ts" },
},
});

If your existing app already owns routes, make sure the Junior Hono app still receives the paths under /api/webhooks, /api/oauth/callback, /api/internal/agent-dispatch, /api/internal/agent/continue, /api/internal/plugin/tasks, /api/internal/heartbeat, and /health. Do not split those routes across independent runtime instances. When mounted, @sentry/junior-dashboard owns /, /conversations, /plugins, /_junior/dashboard/client.js, /auth/login, /api/auth/*, and the authenticated product API routes /api/health, /api/runtime, /api/plugins, /api/plugins/*, /api/plugin-reports, /api/skills, /api/conversations, /api/conversations/*, /api/config, and /api/me.

Some packages export runtime hooks instead of plugin.yaml. Add those plugin factories to the same plugins.ts set. For example, see Scheduler Plugin for scheduled tasks and GitHub Plugin for the githubPlugin() setup.

Junior expects app context and local extension files under app/:

app/
├── SOUL.md
├── WORLD.md
├── DESCRIPTION.md
├── skills/
└── plugins/

Keep provider setup in plugin manifests and env vars, not in skill prose.

Run the same checks as a scaffolded app:

Terminal window
pnpm exec junior check
pnpm dev
curl http://localhost:3000/health

Then complete Slack App Setup and verify one real Slack mention.

Review Config & Environment before deploying, then follow Deploy to Vercel.