AdsPilot AI — สร้าง AI ที่จัดการโฆษณาแทนคุณ ตั้งแต่สร้างจนถึง Optimize
Blueprint สำหรับทีม Viber — AI สร้าง ทดสอบ และ Optimize โฆษณาอัตโนมัติ 6 Platforms ด้วย 9 AI Agents + Thompson Sampling เริ่มต้น ฿990/เดือน

AI จัดการโฆษณาแทนคุณ ตั้งแต่สร้างจนถึง Optimize
Blueprint สำหรับทีม Viber ที่จะมาร่วมสร้าง — อ่านจบแล้วเข้าใจ vision ทั้งหมด พร้อมพัฒนาต่อได้เลย
ปัญหาที่ SME ไทยเจอทุกวัน
ธุรกิจไทยจ่ายค่า Agency เดือนละ ฿20,000-100,000+ แต่ยังต้องนั่งดู report เอง ไม่รู้ว่า Ads ตัวไหนดี ตัวไหนควรปิด — AdsPilot AI แก้ปัญหานี้ทั้งหมด
คุณเจ — เจ้าของ SME
ไม่มีเวลาดู Ads, Agency แพง, ไม่รู้ว่าเงินหายไปไหน
คุณแนน — Marketing Manager
ดูหลาย Platform ไม่ทัน, Optimize มือ เสียเวลา ผิดพลาดบ่อย
คุณต้น — E-commerce Owner
ROAS ขึ้นๆ ลงๆ, ไม่รู้จะปรับ Ads ยังไง, report ไม่เข้าใจ
เงิน Ads ที่รั่วไหลทุกเดือน รวมกันเป็นล้าน — AI แก้ได้ด้วยราคาเริ่มต้นแค่ ฿990/เดือน
AdsPilot AI คืออะไร
AI สร้าง ทดสอบ และ Optimize โฆษณาอัตโนมัติ สำหรับธุรกิจไทย ครบจบในที่เดียว — ไม่ต้องจ้าง Agency ไม่ต้อง Optimize มือ AI ทำให้ทั้งหมดตั้งแต่สร้าง Ads จนถึงจัดสรร Budget
AI Ads Analyst
วิเคราะห์ประสิทธิภาพ Ads ทุก Platform แบบ Real-time พร้อมแจ้งเตือนเมื่อมีปัญหา
AI Creative Generator
สร้าง Ads Copy/Creative อัตโนมัติ ภาษาไทย สลับ 6 สไตล์ headline
AUTOPILOT
สร้าง + ทดสอบ 100+ Variations ด้วย Thompson Sampling — หัวใจของระบบ
Multi-Platform
Google, Meta, TikTok, LINE, Shopee, Lazada — ดูทุก Platform ในที่เดียว
Multi-AI
Claude, GPT-4o, Gemini ผ่าน OpenRouter + Direct API — เลือก Model ที่ดีที่สุดต่องาน
Thai-First
ภาษาไทย + วัฒนธรรมไทย ตั้งแต่ AI ถึง UI — ไม่ใช่แปลจาก EN
จุดเด่นที่ต่างจากคู่แข่ง
THAI-FIRST
TRUE AI (MAB)
END-TO-END
6 PLATFORMS
฿990 เริ่มต้น
ภาพรวมสถาปัตยกรรม — 6 ชั้นของระบบ
ระบบแบ่งเป็น 6 ชั้น แต่ละชั้นทำหน้าที่ชัดเจน — เข้าใจตรงนี้แล้วจะเห็นภาพทั้งระบบ
🌐 Presentation Layer
Next.js 15 (App Router) + PWA + Slack Bot + LINE Bot | TailwindCSS + Shadcn/UI + Recharts + Zustand
🚪 API Gateway Layer
Go + Fiber v3 | JWT Auth | Rate Limiting | CORS | RESTful API v1 | Unified Response
📦 Application Layer
Campaign | Analytics | User | Billing | Notification | Report | CQRS-Lite + Repository Pattern + SQLC
🤖 AI Orchestration Layer
Temporal Workflows | 9 AI Agents | AUTOPILOT Engine (Picasso + Darwin + Sherlock) | LLM Router
🔌 Connector Layer
Google Ads | Meta | TikTok | LINE | Shopee | Lazada | GA4 | Circuit Breaker + OAuth2 Token Management
🗄️ Data Layer
PostgreSQL 16 (Core) | TimescaleDB (Metrics) | Redis Stack 7 (Cache) | Qdrant (Vector) | NATS JetStream (Events)
6 ชั้น แยกหน้าที่ชัดเจน — ทีมแต่ละคนรับผิดชอบ layer ที่ถนัดได้เลย ไม่ต้องรู้ทั้งหมด
ดู Tech Stack ทั้งหมด (ตารางเต็ม)
| Layer | เทคโนโลยี | ทำไมเลือก |
|---|---|---|
| Monorepo | Turborepo + pnpm | Fast builds, shared packages |
| Frontend | Next.js 15 (App Router) | SSR, RSC, TypedRoutes |
| Styling | TailwindCSS + Shadcn/UI | Utility-first, accessible |
| State | Zustand + TanStack Query | Lightweight + server cache |
| Backend | Go 1.22 + Fiber v3 | High performance, type safety |
| DB Access | SQLC | Type-safe SQL → Go code gen |
| Auth | JWT (HS256) + bcrypt(12) | Stateless, secure |
| Core DB | PostgreSQL 16 | ACID, JSONB, extensions |
| Metrics DB | TimescaleDB | Time-series optimization |
| Cache | Redis Stack 7 | Session, rate limit, pub/sub |
| Vector DB | Qdrant | Semantic search for creatives |
| Queue | NATS JetStream | Lightweight, at-least-once |
| Workflow | Temporal | Durable async workflows |
| AI Router | OpenRouter + Anthropic | Multi-model, cost optimization |
| Container | Docker + k3s | Lightweight Kubernetes |
| CDN/WAF | Cloudflare (Free) | DDoS, SSL, caching |
| CI/CD | GitHub Actions | Automated pipeline |
ระบบ AI Agents — สมองของ AdsPilot
9 AI Agents ทำงานร่วมกัน แต่ละตัวใช้ AI Model ที่เหมาะที่สุดกับงาน — Commander เป็นหัวหน้าทีม รับคำสั่งจาก user แล้วแจกงานให้ agent อื่นๆ ทำพร้อมกัน
Commander
Analyst
Creative
Audience
Budget
Forecast
Competitor
Reporter
Scout
AUTOPILOT — หัวใจของระบบ
ฟีเจอร์ที่ทำให้ AdsPilot ต่างจากทุกเครื่องมือ — สร้าง Ads 100 ตัว ทดสอบ แล้ว Optimize อัตโนมัติ ด้วย Thompson Sampling (ไม่ใช่ Rule-Based)
🎨 GENERATE
🚀 DEPLOY
📚 LEARN
⚡ OPTIMIZE
📊 REPORT
Thompson Sampling — ง่ายกว่าที่คิด
จินตนาการว่ามีตู้ Slot Machine 100 ตู้ (= Ads 100 ตัว) ต้องหาว่าตู้ไหนจ่ายเงินดีที่สุด — Thompson Sampling ทำให้:
ตัวที่ดี → ได้ budget เพิ่ม | ตัวที่ไม่ดี → ถูกลด/หยุด | ทำอัตโนมัติ ไม่ต้อง Optimize มือ
Safety Constraints — ป้องกัน AI ทำพลาด
AI ตัดสินใจเอง แต่มี safety rules ป้องกัน — budget เปลี่ยนมากต้องขออนุมัติ ห้ามปิด Ads ทั้งหมด
ดู Score Calculation + Decision Tiers
Score = (ROAS/10 × 0.4) + (CVR/0.2 × 0.3) + (CTR/0.1 × 0.2) + (Confidence × 0.1)
🟢 SCALE UP ≥80th percentile → เพิ่ม budget +20-50%
🔵 MAINTAIN 40-80th percentile → ทดสอบต่อ
🟡 SCALE DOWN 20-40th percentile → ลด budget -20-30%
🔴 PAUSE <20th percentile → หยุด ad ตัวนี้
ดู Data Flow — ข้อมูลไหลอย่างไร (4 flows หลัก)
Flow 1: Ad Data Sync (ทุก 1-6 ชม.)
⏰ Scheduler
📨 NATS
⚙️ Worker
🌐 APIs
🗄️ DB
Flow 2: User ขอวิเคราะห์
👤 User
🚪 API
🎖️ Commander
📊+✍️+💰 Parallel
📋 Result
Flow 3: Authentication
📝 Register
🔒 bcrypt 12
🎫 JWT 15m
🔄 Refresh 7d
Flow 4: AUTOPILOT End-to-End
🎨 Generate
🚀 Deploy
📚 Learn
⚡ Optimize
📊 Report
ดู Security & Compliance (5 layers)
Layer 1 Edge: Cloudflare DDoS + WAF + Bot Filter + Geo Block
Layer 2 Transport: TLS 1.2+ Full Strict + HSTS + Let's Encrypt
Layer 3 Application: JWT HS256 (15min) + bcrypt 12 + Rate Limiting + RBAC (Owner/Admin/Member/Viewer)
Layer 4 Data: AES-256-GCM (OAuth tokens) + Input Sanitization + PDPA Compliance
Layer 5 AI Safety: Confidence thresholds (≥90% OK, 70-90% Warn, <70% Block) + Budget limits + Human-in-the-Loop
แผนพัฒนา 6 Phases — 30 วัน
ทั้ง project แบ่งเป็น 6 phases — Phase 1 เสร็จ 95% แล้ว ที่เหลือรอทีมมาช่วยกัน
✅ Phase 1: Foundation
Monorepo + Docker + Next.js + Go API + DB Schema + SQLC + Auth (JWT + bcrypt)
Phase 2: Core Backend
Platform Connectors (Google, Meta, TikTok) + Data Ingestion + Campaign Service + Analytics
Phase 3: AI Agents
LLM Router + Agent Framework + 9 Core Agents — AI วิเคราะห์ + สร้าง content ได้
Phase 4: Autopilot
Creative Generator (Picasso) + Thompson Sampling (Darwin) + Autopilot Workflow
Phase 5: Frontend
Design System + Dashboard + Campaign UI + Autopilot UI + Settings
Phase 6: Polish
Testing (Unit + E2E) + Security Audit + Monitoring (Prometheus + Grafana) + Deploy
งานที่ต้องการความช่วยเหลือ
ถ้าสนใจ เลือกงานที่ถนัด แล้วบอกพี่แนมได้เลย — งานมี 3 ระดับ priority
| Priority | งาน | ทักษะ | Phase |
|---|---|---|---|
| 🔴 สูง | Platform Connectors (Google, Meta, TikTok) | Go + OAuth2 + REST APIs | 2 |
| 🔴 สูง | Data Ingestion Pipeline | Go + NATS + TimescaleDB | 2 |
| 🔴 สูง | LLM Router + Agent Framework | Go + AI APIs + Temporal | 3 |
| 🟡 กลาง | Dashboard UI | Next.js + Recharts + TanStack Query | 5 |
| 🟡 กลาง | Campaign Management UI | Next.js + Shadcn/UI | 5 |
| 🟡 กลาง | AUTOPILOT UI + Wizard | Next.js + Complex Forms | 5 |
| 🟢 ปกติ | Thompson Sampling Engine | Go + Statistics + MAB | 4 |
| 🟢 ปกติ | Testing (Unit + E2E) | Go Test + Playwright + k6 | 6 |
| 🟢 ปกติ | Monitoring Setup | Prometheus + Grafana + Loki | 6 |
วิธีเริ่มต้นพัฒนา
พิมพ์ใน Cursor AI — AI จะ setup ทุกอย่างให้
Clone repo + Install
Start Infrastructure (Docker)
Setup Environment + Run Migrations
Start API + Frontend
API: http://localhost:8080/health | Frontend: http://localhost:3000
ดู commands จริง (สำหรับคนที่อยากพิมพ์เอง)
git clone <repo-url> && cd adspilot && pnpm install
docker-compose -f infra/docker/docker-compose.yaml up -d
cp .env.example .env
docker exec -i adspilot-postgres psql -U adspilot -d adspilot < packages/db/migrations/001_init.up.sql
cd apps/api && go run ./cmd/server/
cd apps/web && pnpm dev
ดู Project Structure ทั้งหมด
adspilot/
├── apps/
│ ├── web/ # Next.js 15 Frontend
│ └── api/ # Go Backend API
├── services/
│ ├── agents/ # AI Agent Service (9 agents + LLM Router)
│ ├── autopilot/ # AUTOPILOT Engine (Picasso + Darwin + Sherlock)
│ ├── connectors/ # Platform Connectors (Google, Meta, TikTok...)
│ └── worker/ # Background Workers (Sync, Scheduler)
├── packages/
│ ├── db/ # Migrations + SQLC queries + Schema
│ └── shared/ # Shared utilities
└── infra/ # Docker + Kubernetes
ดู Database Schema ทั้งหมด (11 tables)
PostgreSQL 16 (Core): organizations, users, ad_accounts, campaigns, ad_sets, ads, autopilot_sessions, autopilot_variations, autopilot_decisions, agent_tasks, reports
TimescaleDB (Metrics): ad_metrics (hypertable, 1-day chunks, compress after 7 days, retain 2 years) + continuous aggregates: hourly + daily
Key Fields: ทุก table มี UUID PK + org_id FK + created_at/updated_at | autopilot_variations มี alpha/beta สำหรับ Thompson Sampling + ctr/cvr/roas/score
ดู API Endpoints ทั้งหมด
Auth: POST /auth/register, /auth/login, /auth/refresh, /auth/logout
Campaigns: GET /campaigns, GET /campaigns/:id, PATCH /campaigns/:id/status, POST /campaigns/bulk-status, GET /campaigns/:id/ads
Analytics: GET /analytics/dashboard, /analytics/timeseries, /analytics/top-campaigns, /analytics/platforms
AUTOPILOT: GET+POST /autopilot/sessions, GET /sessions/:id, POST /sessions/:id/launch, GET /sessions/:id/variations, GET /sessions/:id/decisions
AI Agents: POST /agents/chat, GET /agents/tasks, GET /agents/tasks/:id
Settings: GET+PATCH /settings/profile, GET /settings/connections, POST /settings/connections/:platform/oauth, GET /settings/organization
สุดท้ายแล้ว — Pricing
เริ่มต้น ฿990/เดือน vs Agency ฿20,000+ — ธุรกิจไทยเข้าถึงได้
Pricing Plans
Starter
1 Ad Account
Analyst only
AUTOPILOT ❌
Growth
3 Ad Accounts
3 Agents
AUTOPILOT Manual
Pro ⭐
10 Ad Accounts
All 9 Agents
AUTOPILOT Full Auto
Enterprise
Unlimited
All Agents
Custom AUTOPILOT
สนใจเข้ามาร่วมพัฒนา?
ดู Issues บน GitHub — มี label good-first-issue สำหรับผู้เริ่มต้น
อ่าน Docs ใน Docs/ — มี specification ละเอียดทุก Phase
ส่ง PR — ทุก contribution ยินดีต้อนรับ ถามพี่แนมได้เลย
AI จะเปลี่ยนวิธีที่ธุรกิจไทยทำโฆษณา — และต้องการทีม Viber มาช่วยสร้างมัน
Related Articles

I Built idea2logic.com with AI — Inside the Architecture of 30+ Pages & 40+ APIs
I built idea2logic.com entirely with AI — 30+ pages, 40+ APIs, 14 database tables. This article opens up the full architecture with Interactive Diagrams.

Using AI to QC-QA a Real Web App — 8 Categories, 163 Items — Score Jumped from 49% to 89%
An experiment using AI deep research to find QC-QA checklists for web projects yielded 236 prompts, 32 tools, and 195 checklist items across 8 categories. Then those were used to audit a real web app — covering Functional Testing, Security, Performance, Accessibility, SEO, and 3 more categories — with every actual prompt included.
SYNERRY Enterprise Platform Engine — The Full Story Behind Building a New System from Scratch
When SYNERRY's legacy system hit its breaking point, a survey went out to 7 devs. The result: 40 issues across 14 categories. This is the behind-the-scenes story of every decision — from the problems discovered to the Tech Stack chosen.