Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证A modern, Progressive Web App (PWA) for employee leave management with a 2-level approval workflow, Task Manager, Timesheet Management
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A web app for running a café team: leave requests, medical claims, timesheets and daily tasks. One installation serves many cafés, each kept separate.
Vercel preview deployments (the temporary URLs created for each pull request) use the same database as production. Never create, edit or delete data on a preview URL while testing.
pending_manager, pending_owner, approved, rejected).
Medical certificates can be attached./super.One phone number is one account (profiles). An account can belong to several
cafés through cafe_memberships, with a separate role in each: staff,
manager, owner or part_timer. Café pages live under /c/<slug>/. A
separate is_super_admin flag on the account marks platform operators.
Managers and owners can open /c/<slug>/admin. New cafés request access at
/start and begin in the pending state; cafés can be pending, active or
suspended.
Staff sign in with a phone number and a PIN (stored as a bcrypt hash). After
five wrong attempts the account locks for 15 minutes. A successful sign-in sets
an HTTP-only cookie, cafeos_session, holding a signed JWT that lasts seven
days. src/middleware.ts checks it on every request and enforces the café and
role rules. A forgotten PIN is reset with a code sent over Telegram.
Code: src/lib/auth.ts, src/middleware.ts, src/lib/pinReset.ts.
Neon Postgres, reached through @vercel/postgres (src/lib/db.ts). There is
no row-level security; access rules are enforced in the application code, and
tenant writes go through withTenantTx, which also tags audit-log rows with
who made the change.
db/schema.sql: the full current schema, for a fresh database.db/migrations/: one plain SQL file per change, named by date.db/bootstrap-super-admin.sql: creates the first super admin (usage is in
the file header).Medical certificates and claim receipts are uploaded to Vercel Blob
(src/lib/storage.ts). Files are served only through authorised app routes,
never by raw blob link.
Telegram only (src/lib/notifications.ts, src/app/api/telegram/webhook).
Users link their account to the bot from the app. The code does not send email.
The app has a web manifest (public/manifest.json, plus a per-café manifest at
/c/<slug>/manifest.json), so a browser can offer to add it to the home screen.
There is no service worker, so it does not work offline.
From package.json:
@vercel/postgres (Neon), @vercel/blob, stripejose (JWT), bcryptjs (PIN hashing), exceljs (timesheet export)lucide-react icons; plain CSS in src/app/globals.csstsxUse Node 22 (the version CI uses; package.json sets no engines field).
npm ci
npm run dev # http://localhost:3000
There is no .env.local.example file. The app reads these environment
variables (names only; get the values from the project owner):
| Variable | Used for |
|---|---|
POSTGRES_URL | Database connection (@vercel/postgres) |
JWT_SECRET | Signing session cookies and PIN-reset codes; at least 32 characters |
APP_BASE_URL | The app's own address, used in links; required in production |
TELEGRAM_BOT_TOKEN | Sending Telegram messages |
TELEGRAM_WEBHOOK_SECRET | Checking that webhook calls come from Telegram |
STRIPE_SECRET_KEY | Stripe API |
STRIPE_PRICE_ID | The subscription price new cafés are charged |
STRIPE_WEBHOOK_SECRET | Checking that webhook calls come from Stripe |
TEST_DATABASE_URL | Optional; enables the database tests (see below) |
Vercel Blob also needs its own access token, which the @vercel/blob library
reads itself.
Pointing a local copy at the production database means local writes change real data. Use a separate throwaway database for development.
npx tsc --noEmit
npm run lint
npm test
The tests in tests/db/ need a throwaway Postgres set in TEST_DATABASE_URL
and skip themselves without it. Never point it at production.
CI (.github/workflows/ci.yml) runs npm ci, npx next typegen, typecheck,
lint and npm test on Node 22 for every pull request and every push to main.
Migrations are plain SQL files in db/migrations/. There is no migration tool:
a person applies each file to the database by hand (for example with psql),
and also keeps db/schema.sql up to date.
Order matters. Merging to main deploys to production automatically. If
the new code needs a schema change, apply the migration to the production
database first, then merge. Merging first would put code live that queries
columns or tables that do not exist yet. Make migrations additive so the old
code keeps working until the new code lands.
Hosted on Vercel. Every merge to main deploys to production automatically;
every pull request gets a preview deployment (see the warning at the top).
/api/ping is an unauthenticated health check.
src/
app/
c/[slug]/ Café pages: leave, claims, tasks, timesheet, billing,
account, admin/
super/ Platform admin: cafés and super admins
login/ Sign-in and PIN reset
start/ Request a new café
api/ Route handlers (auth, leave-requests, claims, timesheets,
tasks, uploads, billing, telegram, webhooks, super, ...)
components/ Shared React components
context/ Auth and toast React contexts
lib/ Database, auth, storage, billing, notifications, helpers
middleware.ts Session and role checks
db/ schema.sql, migrations/, bootstrap-super-admin.sql
tests/ Unit tests; tests/db/ needs TEST_DATABASE_URL
scripts/ One-off scripts (backfill-phones.ts)
public/ Icons and the web manifest
docs/ Design notes and plans
.github/workflows/ CI
CHANGELOG.md records what changed and when.
Private and proprietary. Contact the owner for licensing information.