Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A multi-tenant parking management system built with Next.js 14, Supabase, and TypeScript.
src/
├── app/ # Next.js App Router pages
│ ├── (marketing)/ # Landing pages (optional)
│ ├── login/ # Authentication
│ ├── signup/
│ ├── onboarding/ # Tenant setup flow
│ ├── admin/ # Admin dashboard
│ │ ├── today/ # Today's operations
│ │ ├── bookings/ # Booking management
│ │ ├── uploads/ # Bulk upload wizard
│ │ ├── integrations/ # Third-party integrations
│ │ ├── devices/ # Gate device management
│ │ └── settings/ # Tenant settings
│ └── api/ # API routes
│ ├── tenant/ # Tenant resolution
│ ├── bookings/ # Booking CRUD
│ ├── anpr/ # ANPR hardware endpoint
│ ├── qr/ # QR code hardware endpoint
│ ├── webhooks/ # Third-party webhooks
│ └── cron/ # Scheduled jobs
├── lib/ # Core utilities
│ ├── supabase/ # Supabase clients
│ ├── auth/ # Authentication helpers
│ ├── tenant/ # Tenant resolution
│ ├── rls/ # Row Level Security
│ └── validation/ # Zod schemas
└── components/ # React components
├── ui/ # Base UI components
└── admin/ # Admin-specific components
Create a .env.local file:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# App Configuration
APP_BASE_DOMAIN=yourdomain.com
ENCRYPTION_KEY=your_32_character_encryption_key
# Stripe Connect (Required for payments)
# For development (test mode)
STRIPE_SECRET_KEY_TEST=sk_test_***
STRIPE_PUBLISHABLE_KEY_TEST=pk_test_***
# For production (live mode)
STRIPE_SECRET_KEY_LIVE=sk_live_***
STRIPE_PUBLISHABLE_KEY_LIVE=pk_live_***
# App configuration
NEXT_PUBLIC_ROOT_URL=https://yourdomain.com
STRIPE_API_VERSION=2025-09-30.clover
# Optional: For development
NEXT_PUBLIC_APP_BASE_DOMAIN=localhost:3000
# Copy the contents of supabase-schema.sql and run in Supabase
npm install
npm run dev
Visit http://localhost:3000 to start the application.
{slug}.localhost:3000For payment processing, set up Stripe Connect:
/admin/payments to connect Stripe accountsThe system integrates with your existing pricing engine - no product duplication required.
See STRIPE_INTEGRATED_SETUP.md for detailed instructions.
GET /api/tenant/resolve - Resolve tenant from domain or query parameterPOST /api/bookings/list - List bookings with filtersPOST /api/bookings/create - Create new bookingPOST /api/bookings/update - Update existing bookingPOST /api/bookings/delete - Cancel bookingPOST /api/bookings/upload - Bulk upload bookingsPOST /api/anpr - ANPR gate system endpointPOST /api/qr - QR code gate system endpointPOST /api/webhooks/parkvia - ParkVia webhook handlerPOST /api/webhooks/holidayextras - Holiday Extras webhook handlerPOST /api/stripe/webhook - Stripe webhook handlerPOST /api/payments/connect/onboard - Create/onboard connected accountGET /api/payments/connect/status - Get connection statusPOST /api/payments/checkout - Create checkout for bookingPOST /api/payments/booking-extension - Pay for booking extensionGET /api/cron/pull-parkvia - Sync ParkVia dataGET /api/cron/pull-holidayextras - Sync Holiday Extras dataPOST /api/internal/cron/ingest-canary - Ingest canary (Cloudflare Email Routing + Worker + /api/ingest/email). See INGEST_CANARY_README.md.NEXT_PUBLIC_SUPABASE_URL=your_production_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_production_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_production_service_role_key
APP_BASE_DOMAIN=yourdomain.com
ENCRYPTION_KEY=your_production_encryption_key
Set up Vercel Cron functions for data synchronization:
{
"crons": [
{
"path": "/api/cron/pull-parkvia",
"schedule": "0 */6 * * *"
},
{
"path": "/api/cron/pull-holidayextras",
"schedule": "0 */6 * * *"
}
]
}
The system resolves tenants through:
tenant_domains table?tenant=slug query parameterAll data access is protected by RLS policies that:
user_tenants tabletenant_id automaticallyThird-party API credentials are encrypted using the ENCRYPTION_KEY environment variable.
This project is licensed under the MIT License.