Tracking file-by-file migration of dashboard code from app/ to dashboard/ service. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
Dashboard Separation Plan
Separating the dashboard from the monolithic app/ into standalone dashboard/ service.
Overview
The dashboard is currently tightly coupled to the Crawler struct in app/. All handlers are methods on *Crawler. We need to:
- Create a
Dashboardstruct indashboard/with*shared.DB - Move each file, converting methods from
(c *Crawler)to(d *Dashboard) - Commit after each file move
- Update imports and dependencies as needed
File Migration Checklist
Phase 1: Core Dashboard
dashboard.go(266 lines) - Stats types and calculationtemplates.go(553 lines) - HTML templates and handlersstatic/dashboard.css- Stylesheetstatic/dashboard.js- JavaScript
Phase 2: OAuth
oauth.go(287 lines) - OAuth config and manageroauth_session.go(352 lines) - Session managementoauth_middleware.go(126 lines) - Auth middlewareoauth_handlers.go(521 lines) - OAuth HTTP handlers
Phase 3: API Handlers
api_search.go(311 lines) - Search APIapi_feeds.go(481 lines) - Feed API handlersapi_publish.go(1031 lines) - Publish API handlersapi_domains.go(2068 lines) - Domain API handlers
Phase 4: Routes & Main
routes.go(216 lines) - Route registration- Create
main.go- Entry point for dashboard service
Phase 5: Cleanup
- Remove migrated code from
app/ - Update
app/main.goto remove dashboard startup - Test both services independently
Progress Log
Last updated: 2026-02-02