ChatbotX
开源 ManyChat 替代品,专为 AI 构建。全渠道营销覆盖 WhatsApp、TikTok、Facebook、Instagram、Telegram、Zalo、电子邮件、API 和网页聊天 🤖
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Create once → Understand the source → Generate → Customize per platform → Review → Publish or schedule → Track results.
FLOWT is a SaaS workspace where creators, student communities, founders, freelancers, marketing teams and agencies can turn an idea or an uploaded document (certificate, internship letter, event poster, competition result, project summary…) into accurate, natural posts, then adapt, preview, publish and schedule them to 15 platforms (LinkedIn, Instagram, X, Facebook Pages, Threads, YouTube, TikTok, Pinterest, Reddit, Bluesky, Mastodon, Telegram, Discord, WordPress and any custom website) through official APIs. Every comment and mention then lands in one inbox, where you reply by hand or let Autopilot answer in your voice.
It is built as a real product, not a UI demo: PostgreSQL persistence, server-side sessions, encrypted OAuth credentials, Groq + Gemini AI adapters, document extraction with human review, a durable Redis/BullMQ publishing engine with idempotency and partial-success handling, honest analytics, quotas, audit logs and deployment docs.
Detailed docs live in docs/, including Engagement:
Stage 0 audit · Platform API notes · Architecture · Setup · Platforms · Deployment · Security · API · Release checklist
The app sidebar is organised around the work: Create (Dashboard, Create post, Apps ▾ with one page per connected app), Engage (Inbox with Comments + Autopilot), Publish (Calendar, Queue, History, Analytics) and Workspace (Accounts, Brand voice, Settings, Help).
| Module | What it does |
|---|---|
| Auth & onboarding | Email + password (with verification & reset), optional Google sign-in, DB-backed server sessions, onboarding wizard (workspace, time zone, brand voice). |
| Workspaces | Every record is workspace-scoped. Membership + role checks on every request; client-supplied IDs are never trusted. |
| Social connections | Official OAuth 2.0 for LinkedIn, Instagram (Instagram Login), X (PKCE). Single-use state, AES-256-GCM encrypted tokens, expiry & scope tracking, refresh, disconnect + revoke. |
| Create post | One place to write and publish: one post → editable per-platform variants, media, hashtags, CTA, links, publish now / schedule with time zone, live limit validation & previews. Built-in AI: generate per platform, improve, humanize, rewrite, shorten, expand, change tone, hashtags, quality check, before/after diff, brand voice. |
| Upload a file, get a post (in Create post) | Upload a photo of a certificate, poster or letter (or a PDF): it is read with Gemini, the facts appear in the main content box, and every selected platform gets its own version. One click to undo; the workspace AI setting controls it. |
| Start from a document (in Create post) | Upload PDF/image → validate (MIME + magic bytes) → text extraction / Gemini OCR → document-type-aware fact extraction with confidence & evidence → user review & correction → content directions → platform drafts. |
| AI images (in Create post) | Image prompt + alt text from the post, image generation with Gemini, attached to the post in one click. |
| Media | Validated uploads, image metadata + thumbnails, reuse, deletion, per-platform media validation, signed public URLs for platforms that fetch media (Instagram). |
| Publishing engine | One job per destination account. Durable in Postgres, executed on Vercel by a once-a-minute scheduler (/api/cron/tick) or, self-hosted, by a persistent BullMQ worker. Idempotency keys, atomic claims, bounded exponential backoff, permanent-error detection, reconnection states, partial success, cancellation. |
| Inbox → Comments | Comments, replies and mentions from every supporting platform, linked to the post they're on. Reply from the web and it posts on the platform; AI-suggested replies. |
┌──────────────────────────── Browser ────────────────────────────┐
│ Next.js App Router UI (React 19, Tailwind v4, Radix primitives) │
└───────────────┬─────────────────────────────────────────────────┘
│ HTTPS (session cookie, CSRF-safe same-origin JSON)
┌───────────────────────────▼────────────────────────────────────────────────────┐
│ Next.js server (web) │
│ /api/auth/* better-auth (sessions in Postgres) │
│ /api/v1/* versioned REST: zod-validated, workspace-authorized, rate-limited│
│ services: content · documents · media · ai · oauth · publishing · usage │
└──────┬───────────────┬───────────────────┬───────────────────┬────────────────┘
│ │ │ │
PostgreSQL Redis (BullMQ) Object storage AI providers
(source of truth) (queues, rate (local / S3 / R2) Groq · Gemini
▲ limits) ▲
│ │ │
┌──────┴───────────────▼───────────────────┴─────────────────────────────────────┐
│ Worker (persistent Node process) │
│ publish queue · document queue · analytics queue · maintenance (sweeper: │
│ recover due jobs after restarts, stuck-job detection, token refresh, │
│ expiry notifications, retention cleanup) │
└──────┬─────────────────────────────────────────────────────────────────────────┘
▼
LinkedIn Posts API · Instagram Graph API · X API v2 (official endpoints only)
Key decisions (see docs/ARCHITECTURE.md):
processing with a conditional UPDATE … WHERE status IN (…). Cancelled, rescheduled or already-published jobs cannot be executed twice.AIProvider and PlatformAdapter interfaces only; new models/platforms plug in without rewrites.tsx worker/index.ts or compiled)groq-sdk (Groq), @google/genai (Gemini) behind a provider-independent layerunpdf (PDF text), Gemini multimodal (OCR/vision), file-type (magic bytes), sharp (image metadata/thumbnails).
├── src/
│ ├── app/ # Next.js routes: marketing, auth, app pages, /api
│ ├── components/ # ui/ design system, layout/, feature components
│ ├── lib/ # client-safe helpers (formatting, platform limits, fetcher)
│ └── server/ # server-only code
│ ├── ai/ # AIProvider, GroqProvider, GeminiProvider, ModelRegistry, PromptBuilder, …
│ ├── auth/ # better-auth config + session/workspace guards
│ ├── db/ # Drizzle client + schema
│ ├── documents/ # validation, text extraction, fact extraction pipeline
│ ├── platforms/ # linkedin/, instagram/, x/ adapters + limits + error taxonomy
│ ├── publishing/ # job creation, executor, retry policy, queue
│ ├── oauth/ media/ content/ analytics/ notifications/ usage/ audit/ storage/ http/
├── worker/ # persistent background worker entrypoint
├── drizzle/ # SQL migrations
├── tests/ # unit/, integration/, e2e/
├── docs/ # architecture, setup, platforms, deployment, security, API
├── docker-compose.yml # local Postgres + Redis
└── .env.example
Prerequisites: Node.js ≥ 20, pnpm ≥ 9, and Docker (or hosted Postgres + Redis URLs).
pnpm install
cp .env.example .env.local # fill in values — see below
docker compose up -d # Postgres 17 + Redis 7 on localhost
pnpm db:migrate # apply migrations to a clean database
pnpm dev # web app on http://localhost:3000
pnpm worker # in a second terminal: background worker
Generate the two required secrets:
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))" # BETTER_AUTH_SECRET
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))" # ENCRYPTION_KEY
The app runs without social/AI credentials: features that need a missing credential are shown as "Not configured" instead of failing silently or faking results.
See .env.example for every variable with comments. Summary:
| Variable | Required | Purpose |
|---|---|---|
DATABASE_URL | ✅ | PostgreSQL connection string |
REDIS_URL | worker mode | Redis for BullMQ + shared rate limiting (optional on Vercel) |
CRON_SECRET | Vercel | Protects /api/cron/tick, the scheduler endpoint |
APP_BASE_URL | ✅ | Public base URL (used for OAuth callbacks & signed media URLs) |
BETTER_AUTH_SECRET | ✅ | Session signing secret (32+ random bytes) |
ENCRYPTION_KEY | ✅ | Base64 32-byte key for AES-256-GCM token encryption |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET | optional | Google sign-in |
RESEND_API_KEY / EMAIL_FROM | optional | Verification & reset emails (logged to console in dev when unset) |
GROQ_API_KEY | for AI | Groq text generation |
GEMINI_API_KEY | for AI/docs | Gemini generation + document understanding |
AI_MODEL_* | optional | Per-task model overrides (provider:model) |
LINKEDIN_CLIENT_ID / LINKEDIN_CLIENT_SECRET | for LinkedIn | LinkedIn app credentials |
INSTAGRAM_APP_ID / INSTAGRAM_APP_SECRET | for Instagram | Instagram Login app credentials |
X_CLIENT_ID / X_CLIENT_SECRET | for X | X OAuth 2.0 client |
STORAGE_DRIVER + S3_* | optional | empty = database on Vercel, local elsewhere; or s3 |
ADMIN_EMAILS | optional | Comma-separated emails allowed into /admin |
Never put secrets in NEXT_PUBLIC_* variables, source files or Git.
| Command | Description |
|---|---|
pnpm dev | Next.js dev server |
pnpm worker | Background worker (publishing, documents, analytics, maintenance) |
pnpm build / pnpm start | Production build / serve |
pnpm db:generate | Generate a migration from schema changes |
pnpm db:migrate | Apply migrations |
pnpm db:studio | Drizzle Studio |
pnpm typecheck | tsc --noEmit |
pnpm lint | ESLint |
pnpm test | Unit + integration tests (Vitest) |
pnpm test:e2e | Playwright end-to-end tests (needs running app + DB) |
Full walkthrough with screenshots-in-words, scopes and approval notes: docs/PLATFORMS.md.
OAuth callback URLs to register (replace the host for staging/production):
| Platform | Callback URL |
|---|---|
{APP_BASE_URL}/api/v1/social-accounts/linkedin/callback | |
{APP_BASE_URL}/api/v1/social-accounts/instagram/callback | |
| X | {APP_BASE_URL}/api/v1/social-accounts/x/callback |
| Google sign-in | {APP_BASE_URL}/api/auth/callback/google |
Important realities:
APP_BASE_URL (local storage) or your S3 bucket must be reachable from the internet.AI_MODEL_DRAFT=groq:<model> etc.). Timeouts, bounded retries with backoff, usage tracking and request IDs are built in.publishing_job per (post variant × destination account), each tracked independently.Idempotency-Key header on job creation + a partial unique index prevent double-click duplicates.needs_reconnection.AES-256-GCM encrypted tokens · server-only secrets · httpOnly secure session cookies · same-origin checks on mutations · zod validation everywhere · Drizzle parameterised queries · upload magic-byte validation · SSRF-safe outbound requests (allow-listed platform hosts) · prompt-injection fencing for document text · Redis-backed rate limits · security headers/CSP · audit logs · retention & deletion controls. Details: docs/SECURITY.md.
pnpm test # unit + integration (PGlite in-process Postgres, mocked platform/AI HTTP)
pnpm test:e2e # Playwright against a running instance
Covered: auth guards, cross-workspace isolation, upload validation, AI response validation, provider timeouts, content-length/X weighted counting, OAuth state, token expiry, time zones/DST, worker recovery, duplicate prevention, rate limits, partial publication, retry classification, cancellation, analytics calculations, retention.
Automated tests never call real platform APIs or publish to real accounts.
Vercel + Neon (recommended): no extra servers. The vercel-build script migrates the database on production deploys, "Publish now" runs right after the request, background work runs while people use the app, and a scheduler calling /api/cron/tick every minute keeps scheduled posts on time at any hour. Files are stored in the Neon database, uploaded in parts under Vercel's request limit, so Neon is the only service you need. After the first deploy, sign in and open Get started: it walks each user through connecting their apps and shows admins exactly which settings are still missing.
Self-hosted: web (pnpm start) plus a persistent worker (pnpm worker:prod) with Redis.
Step-by-step guides for both: docs/DEPLOYMENT.md.
| Stage | Scope | Status |
|---|---|---|
| 0 | Repository audit & plan | ✅ docs/STAGE-0-AUDIT.md |
| 1 | Foundation: structure, design system, DB, auth, workspaces, config, logging | ✅ code + tests |
| 2 | Dashboard, composer, drafts, library, media, brand voice | ✅ |
| 3 | AI writing studio (Groq + Gemini) | ✅ mocked-provider tests · live keys pending |
| 4 | Document intelligence | ✅ · live Gemini run pending |
| 5 | Social OAuth integrations | ✅ · developer apps pending |
| 6 | Publishing engine | ✅ |
| 7 | Calendar, queue, notifications | ✅ |
| 8 | Analytics | ✅ calculations · live collection pending |
| 9 | Production hardening | ✅ |
| 10 | Release readiness | ✅ docs · launch checklist in RELEASE-CHECKLIST |
Status in the checklist is only marked ✅ when the implementation and tests back it. Platform integrations are never called "production-ready" while credentials or platform approval are outstanding.
ffprobe and are not generated in this version.Proprietary — all rights reserved (change as appropriate).
| Inbox → Autopilot |
| Rules (all / questions / keywords / mentions) that draft or auto-post replies in your brand voice, with daily caps and safety: spam and abuse are never answered, negatives go to review. |
| Get started | Step-by-step walkthroughs for connecting each app (what you need, each step, what you allow, what to do if something goes wrong), with Connect and Skip. Customers never see server setup details; admins get a Server setup card. |
| Apps | One page per connected app (sidebar → Apps ▾): account stats, likes / views / shares / comments, a 30-day posting chart, delivery success, autopilot status, every post with its metrics, and that app's comments with replies. |
| Calendar & queue | Month / week / agenda views, filters, drag-and-drop rescheduling, edit & cancel. |
| History | Every post you've made (drafts, published, AI-generated, templates, archived; search, tags, campaigns), the publishing log with each platform's real response and retry of failed destinations, and your media. |
| Analytics | Publishing analytics from our own data + platform metrics only where the API and granted scopes allow. Missing/unsupported metrics are labelled, never invented. |
| Brand voice | Multiple profiles: tone, audience, vocabulary, words to avoid, CTA/hashtag/emoji preferences, sample posts → derived style profile. |
| Notifications | In-app notifications for published / failed / partial posts, expiring connections, AI failures. |
| Usage & plans | Configurable plan limits enforced server-side (AI requests, documents, storage, accounts, publishing jobs). Billing-ready; no fake payment flow. |
| Admin & ops | Admin page (queue depth, failures, health), structured logs with correlation IDs, audit logs, data export & deletion. |