Project structure
See which FlowPanel files the CLI creates, who owns them, and when to edit them.
flowpanel init adds a small integration layer to the host application. Paths begin with src/ when the application uses src/app.
your-app/
├── flowpanel.config.ts
├── app/
│ ├── admin/
│ │ ├── layout.tsx
│ │ └── [[...slug]]/page.tsx
│ └── api/flowpanel/
│ ├── [...route]/route.ts
│ └── stream/route.ts
├── styles/admin.css
└── flowpanel/migrations/0001_init.sqlFiles you normally edit
flowpanel.config.ts is application-owned. It selects resources and defines auth, access, scope, dashboards, actions, realtime, labels, and theme options. Most FlowPanel work happens here or in modules imported by it.
styles/admin.css is application-owned. The CLI creates a thin import of FlowPanel's precompiled, isolated stylesheet, so it does not need Tailwind, PostCSS, source directives, or content globs. Change safe local overrides there. Projects that deliberately compile the legacy @flowpanel/react/styles/admin.css source export must maintain their own Tailwind configuration.
Review every SQL file before applying it. The initial migration creates FlowPanel's migration and audit tables. It does not configure an audit sink for you.
Wiring files
The catch-all admin page passes every /admin/... request to createFlowpanel(config).page. The catch-all API route exports the generated HTTP handlers. The stream route exposes the authenticated Server-Sent Events endpoint.
These files are intentionally small. Edit them only when changing mount paths or integrating custom route behavior. flowpanel doctor --fix can restore missing route templates, but does not overwrite an existing conflicting file.
The CLI imports the stylesheet from the admin segment's layout and preserves the
host root layout. When no shared root layout exists, the admin segment receives
its own root layout. Pre-hydration theme and CSP integration in an existing host
remain application-owned; ThemeScript accepts a host-supplied nonce. Routes and
config use the same mount chosen with --path or inferred from existing routes.
Files created later
flowpanel eject writes owned source under the admin route for a resource, dashboard, or layout. Ejected files are no longer generated at runtime and do not receive framework behavior changes automatically.
FlowPanel does not copy the application schema or generate one page per configured resource. Adapters introspect the original Drizzle tables or Prisma metadata, and the catch-all routes render the compiled config.
See How FlowPanel works for the runtime path and Eject to source for the ownership transfer.