Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A web app for a logistics company: customers place their own orders (from the catalogue, by uploading the spreadsheet they already use, or by pasting a WhatsApp message), every order is validated on the server, and the order moves through approval, bank-transfer payment, warehouse picking, dispatch and a customer-held delivery code. One app serves all seven roles.
Built from the Intelligent Order Processing System design document (RBS Albergoni Online, Group 6, v1.0). Where this build differs from that document, see Changes from the design.
| Layer | What |
|---|---|
| Front end | React 18 + Vite, react-router, plain CSS (src/index.css) |
| Database | Supabase Postgres. All business rules are SQL functions (supabase/migrations/0002_functions.sql) |
| Security | Supabase Auth, row-level security on every table, role checks in every function |
| Files | Supabase Storage, private buckets for registration documents and payment proofs |
| Jobs | pg_cron: payment-window expiry every 5 min, reminders hourly |
| Live updates | Supabase Realtime on notifications (bell + screen refresh) |
| Admin accounts | Edge function admin-users (needs the service key, so it can't run in the browser) |
npm install
npm run dev # http://localhost:5173
npm test # unit tests for the spreadsheet / message parser
npm run build
The app points at the Verity Supabase project by default. To use another project, copy .env.example to .env.local, then apply supabase/migrations/*.sql in order, then supabase/seed.sql, and deploy supabase/functions/admin-users.
All use the password VerityDemo#2026. Change or remove these accounts before real use.
| Role | |
|---|---|
| Customer | [email protected], [email protected] |
| Ops & Approval Desk | [email protected] |
| Finance | [email protected] |
| Warehouse | [email protected] |
| Dispatch Coordinator | [email protected] |
| Driver (open on a phone) | [email protected], [email protected] |
| Administrator | [email protected] |
draft → submitted → validation_failed (customer fixes) ─┐
→ pending_approval → rejected ────────┤ resubmit
→ awaiting_payment (auto-approved: clean, prepaid, under the limit)
awaiting_payment → payment_verification → paid | payment_rejected (3 tries)
paid → picking → packed | shortage_hold → (deliver available + refund | wait | cancel)
packed → assigned → out_for_delivery → delivered (correct code) | delivery_failed → reassign
The allowed moves live in one table, order_transitions; _transition() rejects anything else.
_validate)All rules run on every check and every result is stored (validation_results, newest run has current = true):
| Rule | Severity |
|---|---|
| Mandatory fields (items, address, date) | fail |
| SKU exists and is active, plus every upload line that didn't match the catalogue | fail |
| Quantity is a whole number within the product's min/max | fail |
| Stock: quantity ≤ on hand − reserved | fail |
| Customer account active | fail |
| Price equals the price list within tolerance | fail |
| Delivery date not in the past; address is the customer's own and in an allowed region | fail |
| Duplicate: same items from the same customer within the window | warn (customer must confirm) |
| Unusual quantity: more than 3× the customer's average for that product | warn (shown to Ops) |
Admins can run Reports → Run 500-order simulation. It creates orders through the real save_draft / submit_order functions with known planted errors, scores them, then rolls everything back and keeps only the summary.
On purpose, it also plants three realistic mistakes no rule checks for: the neighbouring product picked by mistake, a quantity typo that stays within limits (20→200), and the wrong saved address. Without these the score would only be the rules grading themselves.
Latest run (500 orders, seed 0.42):
| Result | |
|---|---|
| Error types the rules target (10 types, 216 orders) | 216/216 caught (100%) |
| Untargeted realistic errors (59 orders) | 10/59 flagged (17%) |
| Clean orders passed without a flag | 207/225 (92%); 18 got an unusual-quantity or duplicate warning |
| Accuracy on targeted errors + clean orders | 95.9% |
| Accuracy on all 500 | 86.6%, below the 90% target |
| Stored orders missing a mandatory field | 0 (enforced in the database) |
The 60% error reduction and 30–50% faster criteria can't be produced by a script. They need a manual baseline: time people re-keying about 30 sample orders from Excel/WhatsApp, count their errors, and compare with the stage timings on the Reports page.
These were agreed before the build:
.xlsx/.csv files and pasted WhatsApp text are mapped to catalogue products (SKU first, then a cautious name match). Lines that don't match go to the validation engine as SKU failures.driver_deliveries(), not the orders tables.send_email are queued in notifications but not sent. This needs an e-mail provider (e.g. Resend) and a small edge function on a schedule. Supabase's built-in mailer also won't deliver sign-up verification mails to arbitrary addresses without custom SMTP. Until that's configured, set Supabase Auth to not require e-mail confirmation, or confirm users from the dashboard._test_flow in the project and run_simulation).