For agentic workers: Use superpowers:subagent-driven-development to implement tasks in parallel where possible.
Goal: Transform the spider system from a development tool into a production-ready operations platform with dashboard, scheduled tasks, merchant editing, status workflow, and follow-up notes.
Architecture: 5 independent features, each adds a model (if needed), handler, store methods, and frontend page. All share existing auth middleware and router patterns.
Tech Stack: Go/Gin backend, React/Ant Design frontend, MySQL via GORM, Redis for scheduling.
internal/handler/dashboard.go — single endpoint GET /dashboard returning all statsinternal/handler/router.go — add dashboard routeweb/src/pages/Dashboard.tsx — stats cards, level pie chart, trend chart, recent tasksweb/src/App.tsx — add routeweb/src/components/Layout.tsx — add menu item, make it the default landing pageweb/src/api/index.ts — add getDashboardGET /api/v1/dashboardResponse:
{
"raw_total": 1035,
"clean_total": 535,
"valid_total": 423,
"by_level": {"Hot": 3, "Warm": 28, "Cold": 392},
"by_source": {"web": 1035, "tg_channel": 0, "github": 0},
"by_industry": {"机场": 12, "VPN": 3},
"today_added": 50,
"week_added": 200,
"recent_tasks": [...last 5 tasks...],
"daily_trend": [{"date": "2026-04-07", "count": 30}, ...]
}
internal/model/schedule.go — ScheduleJob modelinternal/task/scheduler.go — cron scheduler using goroutine + tickerinternal/handler/schedule.go — CRUD endpointsinternal/handler/router.go — add schedule routescmd/server/main.go — start schedulerschedule_jobstype ScheduleJob struct {
ID uint `gorm:"primaryKey"`
Name string `gorm:"size:100;not null"`
PluginName string `gorm:"size:100;not null"` // web_collector / tg_collector / github_collector / clean
CronExpr string `gorm:"size:50;not null"` // "0 2 * * *" = every day 2am
Enabled bool `gorm:"default:true"`
LastRunAt *time.Time
NextRunAt *time.Time
CreatedAt time.Time
}
web/src/pages/Schedules.tsx — list schedules, add/edit/delete/toggleweb/src/App.tsx, Layout.tsx, api/index.tsinternal/handler/merchant_edit.go — PUT /merchants/clean/:id for editinginternal/handler/router.go — add edit routeweb/src/pages/MerchantsClean.tsx — add edit button in action column, edit modal with forminternal/model/merchant_clean.go — add Remark fieldcmd/server/main.go — AutoMigrate picks it upinternal/model/merchant_clean.go — add FollowStatus fieldinternal/handler/merchant_status.go — PUT /merchants/clean/:id/statusinternal/handler/router.go — add routepending → contacted → cooperating → rejectedDisplay labels: 待跟进 → 已联系 → 已合作 → 已拒绝
web/src/pages/MerchantsClean.tsx — add follow_status column with dropdown, filter by follow_statusinternal/model/merchant_note.go — MerchantNote modelinternal/handler/merchant_note.go — GET/POST notes per merchantinternal/handler/router.go — add routescmd/server/main.go — AutoMigratemerchant_notestype MerchantNote struct {
ID uint `gorm:"primaryKey"`
MerchantID uint `gorm:"index;not null"`
TgUsername string `gorm:"size:255;index"`
Content string `gorm:"type:text;not null"`
CreatedBy string `gorm:"size:50"` // username of the author
CreatedAt time.Time
}
web/src/pages/MerchantsClean.tsx — add notes section in detail modal