ChatbotX
開源的 ManyChat 替代方案,為 AI 而建。跨平台行銷,支援 WhatsApp、TikTok、Facebook、Instagram、Telegram、Zalo、Email、API 與 Webchat 🤖
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Vos clients scannent un QR code, laissent un avis Google, vous suivent sur Instagram, et jouent à la roue pour gagner un prix. En moins de 10 minutes vous récoltez des avis, des abonnés, et des visites récurrentes. Essai gratuit 14 jours.
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Turn every customer visit into an engaging game experience. Collect Google reviews, grow social media, and drive repeat visits.
Win & Win is a full-stack SaaS platform that enables physical businesses (restaurants, cafes, bars, hotels, salons, gyms) to deploy interactive QR-code games. Customers scan, play, and win prizes — while completing valuable marketing actions.
winandwin/
├── apps/
│ ├── web/ → Next.js 15 (Merchant Dashboard + Admin + Landing)
│ └── player/ → Preact + Vite (Player Game UI)
├── services/
│ └── api/ → Hono on Cloudflare Workers (REST API)
├── packages/
│ ├── shared/ → TypeScript types, Zod validators, constants
│ ├── db/ → Drizzle ORM schemas (Neon Postgres)
│ └── ui/ → Shared React components (shadcn/ui)
└── scripts/ → Deployment scripts
| Layer | Technology |
|---|---|
| Dashboard | Next.js 15 (App Router, RSC, Tailwind v4) |
| Player App | Preact + Vite (<30KB gzipped) |
| API | Hono on Cloudflare Workers |
| Database | Neon Postgres + Drizzle ORM |
| Auth | Better Auth (email/password) |
| Resend | |
| Hosting | Vercel (dashboard) + Cloudflare (API + player) |
| Monorepo | Turborepo + pnpm |
apps/web/.env.local)DATABASE_URL=postgresql://user:pass@host/db?sslmode=require
BETTER_AUTH_SECRET=<32-char-hex-secret>
BETTER_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:8787
NEXT_PUBLIC_PLAYER_URL=http://localhost:3001
ADMIN_API_KEY=<32-char-hex-secret>
services/api/.dev.vars)DATABASE_URL=postgresql://user:pass@host/db?sslmode=require
ADMIN_API_KEY=<same-as-above>
RESEND_API_KEY=re_xxxx
apps/player)VITE_API_URL=http://localhost:8787 # set at build time
pnpm install
Create a Neon Postgres project and get the connection string.
# Generate and run migrations
cd packages/db
export DATABASE_URL="your-neon-connection-string"
npx drizzle-kit push --force
cp apps/web/.env.example apps/web/.env.local
cp services/api/.dev.vars.example services/api/.dev.vars
# Edit both files with your credentials
pnpm dev
This starts all 3 services:
After signing up, set yourself as admin:
UPDATE "user" SET "isAdmin" = true WHERE email = '[email protected]';
cd services/api
npx wrangler deploy
npx wrangler secret put DATABASE_URL
npx wrangler secret put ADMIN_API_KEY
npx wrangler secret put RESEND_API_KEY
npx wrangler secret put ALLOWED_ORIGINS # comma-separated production URLs
VITE_API_URL=https://your-api.workers.dev pnpm turbo run build --filter=@winandwin/player
cd apps/player && npx wrangler pages deploy dist --project-name=winandwin-player
apps/webnext buildcd ../.. && pnpm install| File | Purpose |
|---|---|
services/api/src/routes/play.ts | Player game flow (config, spin, register) |
services/api/src/routes/admin.ts | Super admin API |
services/api/src/lib/game-engine.ts | Win/lose determination |
services/api/src/lib/email.ts | Coupon email via Resend |
apps/player/src/app.tsx | Player flow orchestration |
apps/player/src/lib/fingerprint.ts | Device fingerprinting |
apps/player/src/lib/atmospheres.ts | Visual theme presets |
apps/player/src/lib/business-themes.ts | Business-type themes |
apps/web/src/lib/auth.ts | Better Auth configuration |
apps/web/src/lib/session.ts | Session management |
packages/db/src/schema/ | All database table schemas |
| Table | Purpose |
|---|---|
user, session, account, verification | Auth (Better Auth) |
merchants | Business accounts |
games, prizes | Game configuration |
ctas | Call-to-action configuration |
players | Player fingerprints + data |
game_plays | Play history |
coupons | Generated coupons |
platform_settings | Admin-configurable settings |
contact_requests | Contact form submissions |
# Type check all packages
pnpm turbo run check --filter='*' --force
# Build all packages
pnpm turbo run build --filter='*' --force
# Test with unlimited plays (append to player URL)
?testmode=unlimited
Proprietary — All rights reserved.