OAuth for 28 ad platforms, plus cross-platform campaign and ad group management; creative list and detail.
Ads PlatformMulti-Platform Ad Management
Eight arms, one console for 28 ad platforms
A management system for multi-platform advertising that connects 15 domestic and 13…
AboutAds Platform
WHO IT'S FOR
A management system for multi-platform advertising that connects 15 domestic and 13 international ad platforms, covering account authorization, campaign and ad group management, plus creative list and detail, cross-platform reporting, automated bidding, budget alerts and notifications, so media teams can run every channel from one console.
The backend runs on webman 2 and PHP 8.4, split into 8 business plugins with 91 API routes and 33 tables for cross-platform metrics. A Vue 3 admin console, Flutter app and HarmonyOS app share the same API, backed by three-tier caching, platform circuit breakers and 22 security controls.
A typical day starts with platform account authorization, then campaigns, creatives and budgets are set up. The system dispatches an asynchronous sync queue every 10 minutes and rolls data into reports, warns before budgets hit thresholds, and pushes exceptions to chat channels, leaving operators to handle only what needs human judgment.
The engineering choice is a plugin-based monolith rather than microservices: 8 plugins share one webman process and data layer, keeping deployment cheap and transaction boundaries clear. A single adapter contract means new channels touch one place, while three-tier caching and circuit breakers keep external platform instability out of the business layer.
Open Source vs Full, feature by feature
Open Source v4.1.0 and Full v3.8.0 share the 28 platform adapters and the core security baseline. Counts come from the current code, routes and install script.
Left: Open Source / Right: Full
Engineering scale
Accounts and delivery
Reporting and attribution
Automation and operations
Clients and security
License and version
Routes include installer and health checks; tables include the webman-admin framework tables; tests are PHPUnit test methods (Full: 733 — 575 Unit + 158 Integration); the two version lines are independent.
Report adapter support: 22 of 28 adapters use documented report endpoints with per-row dates; 6 have no public or verifiable report API and are explicitly unsupported.
Open Source is public for personal study and research; commercial use needs written permission. Full ships under Standard or Full commercial licenses. Contact erik@erik.xyz.
Features built for real scenarios
Core capabilities of the current release; see the changelog for the full history.
Metric rollups, CSV import/CSV/Excel/PDF export and 5-model cross-platform attribution.
Rules adjust budgets and pause/enable ads; three-stage alerts at 50/80/100% of daily budget.
Custom threshold rules, multi-channel delivery and a 5-minute inspection cycle.
Cross-platform Gantt view of monthly and weekly schedules, colored by platform.
Image and video library with local/OSS/COS/S3 drivers and CDN acceleration.
Per-platform circuit breakers, fast-fail fallback and timeout checks keep sync stable.
Vue 3 admin, Flutter and HarmonyOS clients share one API.
Per-account Redis queue jobs with four consumers and an account lock; manual sync returns 202 with a run record.
Generate CSV on a schedule and deliver by email or webhook; old metrics roll up under a configurable retention policy.
Tenant CRUD, status enforcement and per-minute rate limits; TOTP two-factor auth with one-time recovery codes.
Prometheus /metrics, global SQL search, database backup/restore scripts and export file cleanup.
← Swipe to explore →
One system, two perspectives
The admin console runs operations and governance; the client delivers the user experience. Both share the same business and permission boundaries.
Admin Console
- Dashboard
Cross-platform KPI overview, trend charts, global search and data export.
- Account Management
Platform account binding, OAuth authorization, async sync status and run history.
- Campaign Management
Create, pause/enable and bulk-edit campaigns and ad groups; creative list and detail.
- Report Center
Custom and scheduled reports, CSV import, attribution analysis and streaming export.
- Alert Center
Rule configuration, alert records, acknowledgement and notification center.
- Assets & CDN
Creative uploads, gallery previews and object-storage provider settings.
- System Settings
Users, roles, audit logs, tenants, 2FA and system configuration.
- Tenants & Security
Tenant CRUD/status/rate limits, TOTP 2FA and recovery codes.
Mobile Client
- Login & Auth
Account login, token refresh and multi-device session management.
- Data Overview
View core metrics and platform delivery summaries on mobile.
- Campaign Viewer
Browse campaign, ad group and creative lists with details.
- Report Browser
Review reports and trend charts by platform and date.
- Alert Notifications
Receive alert pushes and view notification details.
- Account Sync
Check platform authorization status and sync results.
From the current release to the next
Delivered, in-progress and planned milestones, based on the real development stages.
Foundation
webman service, admin console and the 33-table data model delivered.
DonePlatform Integration
28 ad platform adapters and OAuth account authorization completed.
DoneCampaigns & Reports
Campaign and ad group management, creative list/detail, plus cross-platform reports and export.
DoneMonitoring & Alerts
Alert rules, budget warnings and 12 scheduled jobs in production.
DoneMulti-Client & Security
Vue 3 admin, Flutter client and 22 security controls delivered.
DoneHarmonyOS Polish
6 HarmonyOS pages and the HTTP client are ready; remaining work continues.
In progressStructure determines how far it can go
Three-tier architecture: the service exposes 91 /api/v1 routes, admin runs as a separate console, and Vue 3, Flutter and HarmonyOS clients share one API. Business logic is split across 8 webman plugins, connecting external platforms through 28 adapters, a report engine and Redis queues.
Admin console, desktop/mobile apps and HarmonyOS share the business API.
Path routing, authentication, rate limiting and security headers.
Account, campaign, report, alert and job plugins work in parallel.
Unified access to domestic and global ad platforms with timeout and retry handling.
33 tables hold business data; three-tier cache, Redis queues and FULLTEXT ngram search (LIKE fallback) serve queries.
Security is not an afterthought
From boundaries and identity to data and failure, every layer is designed around zero trust.
24-hour JWT with refresh rotation; tokens bound to IP and user agent; TOTP two-factor auth and recovery codes for admins.
14 global middleware layers in service and 10 in admin validate every request; tenant rate limits return 429.
Pattern detection for XSS, path traversal, header injection and SQL injection.
5 failed attempts lock for 15 minutes; at most 3 concurrent session tokens.
Transport encryption plus field-level database encryption; logs are redacted.
Records IP, user agent, client platform and operation details for auditing.
Zero trust · Least privilege · Auditable end to end
Trade-offs before code
From business boundaries to code boundaries, these are the principles this project keeps returning to.
Plugin Monolith
Business logic split into 8 webman plugins sharing one process and data layer, avoiding premature microservices.
Unified Adapters
28 platforms implement one adapter contract; a new channel only needs an adapter and configuration.
Tiered Caching
L1 memory, L2 APCu and L3 Redis are layered by hit cost, keeping hot data out of the database.
Async Peak Shaving
webman/redis-queue dispatches per-account sync jobs, with exports and notifications handled asynchronously.
Azhang
A blue octopus whose eight arms each run a domain, mirroring 8 plugins and 28 platforms collecting in parallel.
Get it running
A condensed path from the README to a minimal working environment.
Install Composer dependencies for the service and admin apps.
cd service && composer install && cd ../admin && composer install && cd ..Start the admin instance; it listens on port 8789 by default.
cd admin && php start.php startVisit /install in a browser and enter the database connection details.
http://localhost:8789/installThe wizard creates the database, imports install.sql and seeds data.
Use the administrator account set during installation to open the console.
MySQL, Redis, service, admin and nginx run in separate containers; only nginx exposes 80/443, and the database/cache publish no host ports. Redis is also a required dependency for the async sync queue.
./scripts/docker-up.sh
The script generates database/Redis/admin passwords, JWT/encryption keys and a self-signed certificate into the local .secrets/ and .env. Existing values are reused; --regenerate archives them before rotating. Open https://localhost; the admin credentials are printed or available in .env. In production set METRICS_TOKEN to expose /metrics, and use ./scripts/backup.sh / ./scripts/restore.sh --yes for database backup and restore.
Full guide: docs/docker.en.md (secrets, certificates, profile-based deployment, logs/cache, upgrades and troubleshooting).
CI runs manually in GitHub Actions via workflow_dispatch; pushing a v*.*.* tag triggers the release workflow.
- v3.6.0 migrations: in a maintenance window run, in README order,
ads-account/add_last_structure_sync_at.sql,ads-platform/add_search_indexes.sql,ads-report/add_report_indexes.sql,ads-report/create_report_schedules.sql,ads-report/create_report_rollups.sql,ads-task/add_sync_runs.sql,ads-tenant/add_admin_totp.sqlandads-tenant/add_tenant_rate_limit.sql, thenads-account/disable_sogou_accounts.sql. - Redis queue: Redis now also backs the async sync queue; make sure
SyncQueueProcessstarts with the service. Manual sync returns 202; an unavailable queue returns 503. - Sogou removed: the Sogou adapter is gone; the upgrade migration disables Sogou accounts and keeps historical reports.
- v3.5.1 Docker: no new breaking changes; run
./scripts/docker-secrets.shbefore upgrading. Existing values are preserved and only missing secrets, certificates and the admin seed SQL are added. - Sign in again: JWT audiences are split and a shared cross-plane blacklist is enabled, so all existing tokens are invalid.
- OAuth redirects:
OAUTH_ALLOWED_REDIRECTSis default-deny; configure the allow-list inservice/.env. - Multi-container: set a unique
SNOWFLAKE_WORKER_ID(0–1023) per instance to avoid primary-key collisions. - Run migrations first: in a maintenance window, run
service/plugin/ads-task/migration/fix_report_metrics_natural_key.sqlandservice/plugin/ads-report/migration/fix_attribution_results_unique_key.sqlbefore deploying; they deduplicate and rebuild natural/unique keys.
From first login to a full run
A minimal operating path covering admin setup, client usage and key APIs.
Open the admin URL and sign in with the account created during installation.
Add an ad platform in Account Management and complete OAuth.
Pick a platform and account, then create a campaign, ad group and attach creatives.
Filter metrics by date and platform, create scheduled reports, then export CSV/Excel/PDF.
Set metric thresholds and delivery channels; the system checks every 5 minutes.
Start the service and open hg/apidoc to explore the API.
http://127.0.0.1:8788/apidocSet frequency, timezone and recipients; CSV is delivered by email or webhook.
Enable TOTP 2FA in security settings; use /metrics and backup scripts for operations.
If this project helped you
Scan WeChat or Alipay to support the project. Click a QR code to enlarge.


Thank you for your support. The project will keep being maintained and improved.
Every iteration leaves a trace
Latest v3.8.0; releases keep coming.
Merged all dependabot branches and deleted historical branches; refreshed ECharts 6.1, vue-echarts 8.3, Element Plus 2.14.7, Pinia 4.1, /node 26.6; docs now Chinese/English only (Portuguese tooling removed); 733 tests.
Runtime patch: delivery replay lease/exhausted handling, 10s WebSocket auth deadline, full failed-queue scan, rollup CLI packaged in the image; 575 Unit + 158 Integration.
Durable scheduled report delivery (ads_report_deliveries, ReportDeliveryReaperTask, per-channel idempotency and replay); WebSocket JWT revalidation and auth deadline (revocation takes effect immediately); failed-queue admin fixes (scan past unknown records, scoped clear); FULLTEXT ngram global search (retained); 28 adapters (15 domestic + 13 international, 22 report-capable) and 733 tests (575 Unit + 158 Integration).
Async sync queue (webman/redis-queue, per-account lock, 202 acceptance); global SQL search, scheduled reports and CSV directory scan; report rollups/retention; tenant CRUD/status/rate limits and admin TOTP 2FA; Prometheus /metrics and backup/restore scripts; 28 adapters (15 domestic + 13 international, Sogou removed, Spotify report-capable) and 659 tests (508 Unit + 151 Integration).
Docker Compose deployment: generated/rotated secrets, accounts and certificates; Redis auth, HTTPS, log rotation, read-only roots and multi-stage images (service 216 MB / admin 156 MB); new docs/docker.en.md.
Security hardening: split JWT audiences with a shared cross-plane blacklist and default-deny OAuth redirects; report date contract and pagination fixes; Flutter/admin client fixes; Docker and installer fixes; 531 tests.
Docs trimmed to Chinese and English; site copy, SEO and 404 polish.
Added AGENTS.md.
API documentation refresh: refresh tokens and HTML dashboard export.
Security audit fixes, tenant isolation, release pipeline and dependency refresh.
CI fully green, minimum PHP raised to 8.4 and install.sql columns added.
Project mascot changed to the octopus Azhang.
Project mascot owl added, 13-language docs synced and project tree corrected.
API version moved into the /api/v1 route path instead of a header.
All money math migrated to bcmath; report ratios computed in PHP.