Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Control plane for the Insurvas platform. Built against the SA-x.y tickets in the Notion
"Insurvas Sprint" database.
Next.js 16 (App Router) · Tailwind v4 · shadcn/ui · Supabase (Postgres).
Building or changing a screen? Read the design rules first:
docs/design/UI-CONSISTENCY.md (§0 is the v3 foundation), and
the README.md in the folder you are working in.
The split that shapes the whole codebase:
| Control plane | Tenant plane | |
|---|---|---|
| Route prefix | /admin | /app |
| Who | Insurvas staff | Customers |
| Identity table | admin_users | users + tenant_users |
| Session cookie | insurvas_admin_session | insurvas_tenant_session |
| Signing secret | ADMIN_SESSION_SECRET | TENANT_SESSION_SECRET |
| Gate | requireAdminRole() | requireTenant() |
Separate cookies and separate signing secrets, so one session type can never be forged into the other. Neither uses Supabase Auth.
Both gates resolve role and account state from the database on every request rather than trusting the token, so deactivating or demoting someone takes effect on their next request instead of at token expiry.
M0 (SA-0.1 – 0.3) and M1 (SA-1.1 – 1.5) are code-complete: admin auth with mandatory TOTP 2FA, the multi-tenant data model with row-level security, an append-only audit log, and the full user lifecycle (list, create-by-invite, edit, suspend, login activity).
See docs/backlog.md for everything deliberately deferred, descoped or left
unverified — including what has and hasn't been checked in a browser.
npm install
cp .env.example .env.local # then fill it in
npm run seed:super-admin # prints a QR code — 2FA is mandatory
npm run dev
/ redirects to /admin/login.
| Command | Purpose |
|---|---|
npm run dev | Dev server |
npm run seed:super-admin | Creates the first super_admin. No-op if any admin exists. |
npm run reset:totp -- <email> | New TOTP secret for an admin who lost their authenticator |
npm run verify:tenant-isolation | Provisions two tenants and proves, at the Postgres level, that neither can see the other's rows. Cleans up after itself. |
tenant_app Postgres role (TENANT_DB_URL), which does not bypass RLS. The service-role
client is used only where there is no tenant scope yet — login, and the admin panel.UPDATE, DELETE and TRUNCATE are
revoked from every role the app connects as, including service_role.lib/email/sendInvitationEmail.ts and the other
lifecycle senders record every attempt through lib/email/transport.ts. External delivery is
disabled unless EMAIL_DELIVERY_MODE=smtp is explicitly set, and reserved QA recipients such
as .test, .example, .invalid, and localhost are refused even in SMTP mode. When delivery
is disabled or unavailable, the admin UI shows a copyable link instead.