Summary
app.py currently owns all ~50 routes across auth, billing, API, website hub, and webhooks in a single ~1,000-line file. This makes it difficult to navigate, test, and onboard contributors.
Proposed Structure
blueprints/
auth.py # login, register, logout, OAuth flows (FB, Google, TikTok)
billing.py # Stripe checkout, portal, plan upgrade routes
api.py # /api/* endpoints (push_all, publish, history, etc.)
website.py # website hub editor + public site renderer
webhooks.py # stripe_webhook (already CSRF-exempt)
app.py becomes a thin factory that registers blueprints and initializes extensions.
Effort: ~1 day
Part of full audit: #1
Summary
app.pycurrently owns all ~50 routes across auth, billing, API, website hub, and webhooks in a single ~1,000-line file. This makes it difficult to navigate, test, and onboard contributors.Proposed Structure
app.pybecomes a thin factory that registers blueprints and initializes extensions.Effort: ~1 day