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.