Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Xentro Management repository
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Employee registration and authentication system with Supabase backend and Next.js frontend.
cd "/Users/air/Documents/Xentro Management"
npm install
cp .env.example .env.local
Edit .env.local and fill in the following values:
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
NID_ENCRYPTION_KEY=your-32-byte-hex-key
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY (keep this secret!)Run this command to generate a secure 32-byte hex key:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Copy the output to NID_ENCRYPTION_KEY in .env.local.
supabase link --project-ref your-project-id
supabase db push
supabase storage new employee-photos
supabase/migrations/001_initial_schema.sqlsupabase/migrations/002_storage_policies.sqlsupabase/migrations/003_rate_limiter.sqlemployee-photoshttp://localhost:3000 (for local)http://localhost:3000/auth/callbackhttp://localhost:3000/auth/callbackhttp://localhost:3000/reset-passwordnpm run dev
Open http://localhost:3000 in your browser.
npm run build
npm start
The built-in Supabase email sender is for testing only and has strict limits. For production:
npm i -g vercel
vercel login
vercel
In Vercel dashboard, add these environment variables for your Preview and Production environments:
NEXT_PUBLIC_APP_URL: Your Vercel domain (e.g., https://your-app.vercel.app)NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase anon keySUPABASE_SERVICE_ROLE_KEY: Your Supabase service role keyNID_ENCRYPTION_KEY: Your 32-byte hex encryption keyAfter deploying to Vercel, update your Supabase project:
https://your-app.vercel.app/auth/callbackNew employee accounts start with status = 'PENDING' and role = 'EMPLOYEE'. An administrator must manually approve them.
Run this in Supabase SQL Editor (replace with actual user UUID or email):
-- Approve a user by email
UPDATE public.profiles
SET status = 'ACTIVE'
WHERE email = '[email protected]';
-- Or approve by user UUID
UPDATE public.profiles
SET status = 'ACTIVE'
WHERE id = 'user-uuid-here';
-- Promote to super admin (use with caution)
UPDATE public.profiles
SET role = 'SUPER_ADMIN', status = 'ACTIVE'
WHERE email = '[email protected]';
SELECT id, username, email, status, role
FROM public.profiles
WHERE email = '[email protected]';
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── api/ # API routes
│ │ ├── auth/ # Auth callback routes
│ │ ├── dashboard/ # Protected dashboard
│ │ ├── sign-up/ # Registration page
│ │ ├── sign-in/ # Login page
│ │ └── ...
│ ├── components/ # Reusable components
│ ├── lib/ # Utilities and clients
│ │ ├── supabase/ # Supabase client configs
│ │ ├── encryption.ts # NID encryption
│ │ ├── validation.ts # Zod schemas
│ │ ├── rate-limit.ts # Rate limiting
│ │ └── env.ts # Environment validation
│ └── types/ # TypeScript types
├── supabase/
│ └── migrations/ # Database migrations
├── public/ # Static assets (poster, logo)
└── .env.example # Environment template
@tailwindcss/postcss installednpm run typecheck to see specific issuesnpm install to ensure dependencies are installedNEXT_PUBLIC_APP_URLprofiles table and username_normalized index existsemployee-photos bucket exists in Supabase Storagesrc/lib/rate-limit.ts and migration 003_rate_limiter.sqlSUPABASE_SERVICE_ROLE_KEY to Git. It should only be used server-side.This implementation includes:
Out of scope for Phase 1:
ISC
For issues or questions, please contact the project administrator.