Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Sales, projects, documents, employees, vehicles, assets, cheques and automatic renewal reminders (WhatsApp / email / in-app) for UAE businesses.
Averiqo is the software; the company using it (e.g. AL SAQR AL AHMAR WELDING AND BLACKSMITH) keeps its own legal identity on quotations, invoices and letterheads.
First deployed for Al Saqr; architected multi-tenant (every row carries company_id, enforced by Postgres RLS).
Stack: Next.js 15 (App Router, TS) · Tailwind · Supabase (Postgres, Auth, private Storage, RLS) · Meta WhatsApp Cloud API · Resend (email) · Vercel Cron.
Architecture and decisions: docs/ARCHITECTURE.md. Operations: docs/OPERATIONS.md.
| Area | Status |
|---|---|
| Auth (email+password), onboarding wizard, optional TOTP MFA, session cookies | ✅ implemented |
| Roles & 14 permissions, enforced in RLS (+ UI/server pre-checks), audit log, user invite/roles | ✅ |
| Dashboard (stats, charts, clickable priority alerts, recent activity) | ✅ incl. receivables and active-projects cards |
| Company documents: categories (custom), upload, preview, signed download, versions, renewals, soft delete/restore, access log | ✅ |
| Employees: profile, documents + compliance checklist, salary (separate RLS), advances, leave, photo | ✅ (attendance, onboarding checklists, accommodation records, WPS export: schema only / planned) |
| Document Vault: drag-and-drop bulk upload, filters, duplicate (SHA-256) detection, recycle bin | ✅ (folder tree UI, bulk export zip: planned) |
| Cheques: all types/statuses, validated state machine, manual clearing confirmation, summaries, monthly calendar, CSV | ✅ |
| Reminders: scheduler endpoint, idempotent fan-out, retries w/ backoff, email fallback, quiet hours, opt-in/out, webhook receipts, logs, test sends, daily digest, custom + recurring reminders | ✅ — WhatsApp runs in SANDBOX until you add Meta credentials |
| Calendar, global search, CSV exports | ✅ |
| Clients & Suppliers directory | ✅ |
| Arabic (RTL) / Bengali | 🟡 navigation & chrome only |
Sales & invoices: quotations, tax invoices (VAT per line), delivery notes in your own letterhead/stamp/signature, live A4 builder, auto-numbering, convert QTN → INV → DN, PDF download + print, save PDF to the Vault, partial payments (DB-enforced, no overpayment), automatic paid/overdue status, receivables ageing, invoice reminders — see docs/SALES_PROJECTS.md | ✅ (not certified e-invoicing software) |
| Projects: contract value, client, fabrication & site progress, milestones (with reminders), costs by category, profit & margin, project files, linked quotations/invoices | ✅ |
| Customer profile (documents, invoices, payments, cheques, projects) | ✅ |
| Vehicles & Assets: vehicles (plate, VIN, mileage, Mulkiya, insurance, inspection, km-based service) and equipment (code, serial, brand, condition, warranty, location), profile with documents, maintenance, expenses, assignment history, reminders and timeline; statuses Active / Assigned / Available / Maintenance / Repair / Out of service / Retired; archive/restore; CSV + Excel export | ✅ |
Reports & Analytics: period filters (today, week, month, quarter, year, custom), sales, quotations & conversion, receivables ageing, projects (profit only where costs are recorded), document & employee compliance, vehicles & assets, cheques. One server-side aggregation (report_summary, RLS-scoped); every KPI drills down to the matching list; CSV / Excel / PDF / print exports, audit-logged | ✅ |
Document numbering: quotations as AS0025180/2026 (prefix, start number and other document types configurable in Settings → Document numbering; never duplicates) | ✅ |
| Connected sales workflow: customer → quotation (statuses, revisions, follow-ups, optional manager approval) → partial delivery notes → invoice → payments / cleared cheques / credit notes → customer ledger & statement (print + PDF). Autosave, unsaved-changes guard, double-submit protection, edit-conflict detection, integer-fils money maths, VAT categories and discounts | ✅ |
| Expenses (with receipt OCR suggestions), project profitability, team, photos (thumbnails), Products & Services catalog, terms templates | ✅ |
Trash & restore, audit log, global search, notification centre, Excel/CSV import & export — see docs/BACKUP.md for backups | ✅ |
| Weekly report e-mail, public customer quotation link | ⏳ planned |
Smart Document Inbox: upload anything → classified (22 UAE doc types), matched to company/employee/customer/vehicle, duplicate & renewal detection, confirm-to-file, versions, auto reminders, timelines — see docs/SMART_INBOX.md | ✅ OCR provider chain (Google Cloud Vision → OCR.Space → local Tesseract) + Gemini classification with strict JSON and server-side validation — see docs/AI_DOCUMENT_READER.md (needs your OCR / Gemini keys) |
| AI Search (natural-language questions, permission-aware) | ✅ (rules without a key; Gemini understands free-form questions) |
| Accounting-software sync | ⏳ planned |
| Multi-company onboarding UI, billing, super-admin console | ⏳ planned (tenancy itself is already enforced) |
| Malware scanning | ⏳ hook point only (lib/doc-upload.ts); type/size/magic-byte checks are active |
cp .env.example .env.local # fill in values (see below)
npm install
# 1. Create a Supabase project → SQL editor → run supabase/migrations/0001…0013 in order
# (or: supabase db push). 0004 creates the private "vault" bucket.
npm run dev # http://localhost:3000 → Sign up → create company
Supabase settings: Auth → disable "public sign-ups" after you create your own account if you want invite-only; set Site URL to NEXT_PUBLIC_APP_URL.
npm test # 130 unit tests: sales maths & PDF, OCR + validators, reminder dates, timezone, dedupe, retry/backoff, quiet hours, cheques, files, crypto, webhook signatures
npm run test:db # 48 tests on a real Postgres: migrations, RLS, tenant isolation, salary secrecy, immutable versions, cheque machine, queue, storage policy, TS↔SQL parity
npm run test:e2e # 150+ browser checks: real Next server + real PostgREST + Postgres RLS (auth/storage faked), see scripts/e2e.sh
The e2e harness replaces only Supabase Auth and Storage with a small local stand-in (tests/e2e/fake-supabase.mjs); everything else (SQL, RLS, PostgREST queries, Next.js, server actions, UI) is real. It does not exercise real Supabase Auth/Storage, real WhatsApp or real email — those need your credentials (below).
whatsapp_business_messaging + whatsapp_business_management, generate a permanent token.SETTINGS_ENCRYPTION_KEY) — or set WHATSAPP_PHONE_NUMBER_ID / WHATSAPP_ACCESS_TOKEN env vars.saqrflow_document_reminder, saqrflow_payment_alert, saqrflow_daily_summary, saqrflow_test_message; category Utility, language en, body text exactly as shown). Business-initiated messages require approved templates.https://<app>/api/webhooks/whatsapp, verify token = WHATSAPP_VERIFY_TOKEN, subscribe to messages; set WHATSAPP_APP_SECRET (App → Settings → Basic) so signatures can be verified.WhatsApp: SANDBOX and logs sandbox / not sent.averiqo_* templates from Settings → WhatsApp message templates, and see docs/WHATSAPP.md.Costs: Meta bills per conversation/message by category and country; enter your price in Settings to see an estimate in the delivery log. Verify current pricing with Meta.
GET|POST /api/cron/reminders with Authorization: Bearer $CRON_SECRET. It is idempotent (unique dedupe_key), so run it often (it also drives retries and quiet-hour releases).
vercel.json runs it once a day at 04:00 UTC (08:00 Dubai) — the most a Hobby plan allows. For timely retries and quiet-hour releases, add an external cron every 15 min (below), or on Vercel Pro change the schedule to */15 * * * *. Vercel sends CRON_SECRET automatically.pg_cron + pg_net calling the URL, GitHub Actions schedule, or any external cron (cron-job.org) with the bearer header..env.example. SUPABASE_SERVICE_ROLE_KEY must be server-only./api/health.storage.objects is verified on stock Postgres with a stub, not on a live Supabase project.