Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
Missed call text-back MVP for local businesses
翻译准备中
正在加载完整 README。 以下为已保存的摘录。
A production-minded MVP for a missed-call text-back SaaS for local businesses.
• Accept Twilio voice status webhook for missed calls
• Automatically send SMS to callers after missed calls
• Accept Twilio incoming SMS webhook
• Store businesses, leads, messages, and call events in Supabase
• Simple dashboard showing leads and latest messages
• Clean, minimal, mobile-friendly UI
• Next.js 14 with TypeScript and Tailwind CSS
• App Router
• Supabase for database
• Twilio for SMS and call webhooks
• Environment variables for secrets
1. Clone the repository
2. Install dependencies:查看完整 README ↗A production-minded MVP for a missed-call text-back SaaS for local businesses.
Clone the repository
Install dependencies:
npm install
Set up environment variables:
cp .env.example .env.local
Configure Supabase:
docs/supabase-setup.sql.env.localConfigure Twilio:
https://your-domain.com/api/twilio/voice-statushttps://your-domain.com/api/twilio/incoming-sms.env.localRun the development server:
npm run dev
Create .env.local with these variables:
# 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
# Twilio
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1your_twilio_phone_number
# App Configuration
APP_BASE_URL=http://localhost:3005
AUTO_REPLY_COOLDOWN_MINUTES=15
# Stripe Billing
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PRICE_ID=price_1...
STRIPE_WEBHOOK_SECRET=whsec_...
For Vercel deployment, you'll need these exact variables:
# Supabase (Required)
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Twilio (Required)
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+15551234567
# App Configuration (Required)
APP_BASE_URL=https://your-app-name.vercel.app
AUTO_REPLY_COOLDOWN_MINUTES=15
# Stripe Billing (Required)
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PRICE_ID=price_1...
STRIPE_WEBHOOK_SECRET=whsec_...
Important Notes:
NEXT_PUBLIC_* variables are exposed to the browserSUPABASE_SERVICE_ROLE_KEY, TWILIO_AUTH_TOKEN, and STRIPE_SECRET_KEY are server-side onlyAPP_BASE_URL must match your deployed URL for webhooks to workNEXT_PUBLIC_STRIPE_PRICE_ID should be set to your $49/month subscription price ID with 14-day trialFor local testing with Twilio webhooks:
Install ngrok:
npm install -g ngrok
Start your development server:
npm run dev
In another terminal, expose your local server:
ngrok http 3000
Use the ngrok URL to configure your Twilio webhooks
The app uses four main tables:
businesses: Business information and Twilio configurationleads: Customer leads generated from missed callsmessages: SMS conversation historycall_events: Call event logs from TwilioSee docs/supabase-setup.sql for the complete schema.
.env.local is in .gitignore (it should be by default)Vercel will auto-detect these settings:
npm run build.nextnpm installIn Vercel dashboard, add these environment variables:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Twilio
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1your_twilio_phone_number
# App Configuration
APP_BASE_URL=https://your-app-name.vercel.app
AUTO_REPLY_COOLDOWN_MINUTES=15
Update your Twilio phone number webhooks to point to your Vercel URL:
https://your-app-name.vercel.app/api/twilio/voice-statushttps://your-app-name.vercel.app/api/twilio/incoming-smsEnsure your platform supports:
src/
app/ # Next.js app router pages
api/ # API routes
twilio/ # Twilio webhook endpoints
dashboard/ # Dashboard pages
globals.css # Global styles
layout.tsx # Root layout
page.tsx # Home page
lib/ # Utility functions
supabase.ts # Supabase client
twilio.ts # Twilio client
types.ts # TypeScript types
utils.ts # Helper functions
scripts/ # Database scripts
seed-data.ts # Demo data script
Run the seed script to add a demo business:
npm run seed
This is an MVP designed for solo founders. The code is kept simple and readable for easy modification and scaling.
// trigger deploy