Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Kannali Garage's admin panel for the SpareX platform: the vehicle master and fitment, catalogue, stock, B2B pricing, orders, returns, payments, B2B businesses and credit, garages and service, content, support and reports.
Next.js (App Router), TypeScript, Tailwind CSS v4 and shadcn/ui. The full brief is in CLAUDE.md; open business
questions, each with the default that is built, are in OPEN-QUESTIONS.md.
nvm use # Node 24
npm install
npm run dev # http://localhost:3000
Sign in with a demo account (listed on the sign-in screen, password Demo@1234). Super Admins use 2-step
verification; the demo code is 123456. Admins see everything except admin users, roles, settings and integrations.
| Script | What it does |
|---|---|
npm run dev | Development server |
npm run check | Typecheck, lint and Prettier check |
npm run build | Production build |
npm run start | Serve the production build |
npm run format | Format every file |
src/
app/
(auth)/ sign-in, forgot and reset password
(panel)/ every screen behind login: one folder per menu item
components/
ui/ shadcn components and shared blocks: DataTable, FilterBar, StatusBadge, FormDialog,
ConfirmDialog, ReasonDialog, Upload, StatCard, ChartCard, TaxDocument…
layout/ app shell, PageHeader, DetailLayout, FormLayout, FormSection, TabNav
features/<area>/ one business area: types.ts (the API contract), api.ts, schemas.ts, actions.ts,
columns.tsx, utils.ts and components/
lib/ config, feature switches, permissions-aware navigation, formatting, dates, CSV, GST,
status colours, server-action helpers
mocks/ in-memory demo data and mock handlers (deleted when the backend is live)
lib/csv-export.ts, which checks the
data.export permission and records the export in the audit log.features/<area>/actions.ts) using runMutation or runValidatedMutation
from lib/server-action.ts. They check the permission on the server, re-validate with the same zod schema as the
form, and return ActionResult. Every change writes an audit entry.can(session, permission) (features/auth/permissions.ts); roles are only a
list of permissions, so a new role is data, not code.lib/features.ts and are shown in Settings → Feature switches.
A switch only hides or shows; the screens behind it are built.lib/constants.ts.src/features/<area>/ with types.ts, api.ts (and src/mocks/<area>-api.ts until the backend exists).src/app/(panel)/<area>/ with a loading.tsx for each route that loads data.features/auth/permissions.ts and a menu entry in lib/navigation.ts.Screens only call src/features/<area>/api.ts. Each one checks its data source in src/lib/config.ts:
"mock" uses src/mocks/. Demo changes live in memory and reset when the server restarts."api" calls the backend through src/lib/api-client.ts, using NEXT_PUBLIC_API_BASE_URL (see .env.example)
and the signed-in admin's token.To move one area to the real backend:
api.ts calls (paths and payloads are in each function), returning the shapes in
types.ts: string ids, ISO dates, money in integer paise, lists as { items, page, pageSize, total }."api" in src/lib/config.ts."api", delete src/mocks/; nothing else imports it.