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.