iamges udpae and swagger fixes
This commit is contained in:
101
docs/30-FRONTEND/PAGE-AUDIT.md
Normal file
101
docs/30-FRONTEND/PAGE-AUDIT.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# Frontend Page Audit (In Progress)
|
||||
|
||||
**Last Updated:** January 20, 2026
|
||||
**Goal:** Verify each page’s functions, API usage, and flow consistency.
|
||||
|
||||
---
|
||||
|
||||
## Audit Scope (Current Batch)
|
||||
|
||||
- Auth pages: Sign In, Sign Up, Forgot Password, Reset Password, Verify Email, Unsubscribe
|
||||
- Payment page
|
||||
|
||||
---
|
||||
|
||||
## Auth Pages
|
||||
|
||||
### Sign In
|
||||
|
||||
- **Route:** `/signin`
|
||||
- **File:** `frontend/src/pages/AuthPages/SignIn.tsx`
|
||||
- **Components:** `PageMeta`, `AuthLayout`, `SignInForm`
|
||||
- **API usage:** none in page (handled by `SignInForm`)
|
||||
- **Notes:** Page is a wrapper; all auth logic is inside `SignInForm`.
|
||||
|
||||
### Sign Up
|
||||
|
||||
- **Route:** `/signup`
|
||||
- **File:** `frontend/src/pages/AuthPages/SignUp.tsx`
|
||||
- **Components:** `PageMeta`, `SignUpFormUnified`, `GridShape`
|
||||
- **API usage:** `GET /v1/auth/plans/` (public) for plan list
|
||||
- **Behavior:**
|
||||
- Reads `plan` query param to preselect plan
|
||||
- Defaults to first active plan if no match
|
||||
- Sorts plans by price ascending
|
||||
- **Notes:**
|
||||
- Geo detection removed; country selected in form
|
||||
- Payment selection deferred to `/account/plans`
|
||||
|
||||
### Forgot Password
|
||||
|
||||
- **Route:** `/forgot-password`
|
||||
- **File:** `frontend/src/pages/AuthPages/ForgotPassword.tsx`
|
||||
- **Components:** `PageMeta`, icons, local form
|
||||
- **API usage:** `POST /v1/auth/password-reset/` with `{ email }`
|
||||
- **Behavior:**
|
||||
- Always shows success state to prevent email enumeration
|
||||
|
||||
### Reset Password
|
||||
|
||||
- **Route:** `/reset-password?token=...`
|
||||
- **File:** `frontend/src/pages/AuthPages/ResetPassword.tsx`
|
||||
- **Components:** `PageMeta`, icons, form
|
||||
- **API usage:** `POST /v1/auth/password-reset/confirm/` with `{ token, new_password, new_password_confirm }`
|
||||
- **Behavior:**
|
||||
- If no `token`, redirects to `/forgot-password`
|
||||
- Validates password strength client-side
|
||||
- Handles expired/invalid token states
|
||||
|
||||
### Verify Email
|
||||
|
||||
- **Route:** `/verify-email?token=...`
|
||||
- **File:** `frontend/src/pages/AuthPages/VerifyEmail.tsx`
|
||||
- **Components:** `PageMeta`, icons
|
||||
- **API usage:** `POST /v1/auth/users/verify_email/` with `{ token }`
|
||||
- **Behavior:**
|
||||
- Requires query param `token`
|
||||
- Handles expired/invalid token state
|
||||
|
||||
### Unsubscribe
|
||||
|
||||
- **Route:** `/unsubscribe`
|
||||
- **File:** `frontend/src/pages/AuthPages/Unsubscribe.tsx`
|
||||
- **Components:** `PageMeta`, icons
|
||||
- **Behavior:**
|
||||
- Displays guidance and redirects to `/account/settings?tab=notifications` after 5 seconds
|
||||
- Notes that transactional emails are not unsubscribable
|
||||
- **Potential issue:** redirect requires auth; unauthenticated users will be sent to sign-in flow.
|
||||
|
||||
---
|
||||
|
||||
## Payment Page
|
||||
|
||||
### Payment
|
||||
|
||||
- **Route:** `/payment`
|
||||
- **File:** `frontend/src/pages/Payment.tsx`
|
||||
- **Components:** `InputField`, `TextArea`, `Button`
|
||||
- **Store usage:** `useAuthStore` for user/account plan
|
||||
- **Behavior:**
|
||||
- Reads `plan` from query string or current account plan
|
||||
- Generates mailto for offline payment confirmation
|
||||
- Redirects to `/pricing` if plan or user missing
|
||||
- **Potential issue:** `/pricing` is not defined in `App.tsx` routes (may exist in marketing app).
|
||||
|
||||
---
|
||||
|
||||
## Next Audit Batch
|
||||
|
||||
- Dashboard and core workflow pages
|
||||
- Sites pages (dashboard, settings, sync, deployment)
|
||||
- Planner and Writer pages
|
||||
@@ -1,5 +1,357 @@
|
||||
# Frontend Pages & Routes
|
||||
|
||||
**Last Verified:** January 20, 2026
|
||||
**Version:** 1.8.3
|
||||
**Framework:** React 19 + TypeScript + React Router 6 + Vite
|
||||
|
||||
---
|
||||
|
||||
## Route Configuration
|
||||
|
||||
Routes defined in `/frontend/src/App.tsx`:
|
||||
- `ProtectedRoute` - requires authentication
|
||||
- `AdminRoute` - requires staff/admin
|
||||
- `AppLayout` - shared layout (sidebar + header)
|
||||
|
||||
---
|
||||
|
||||
## Public Routes (No Auth Required)
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/signin` | `AuthPages/SignIn.tsx` | User login |
|
||||
| `/signup` | `AuthPages/SignUp.tsx` | Account registration |
|
||||
| `/signup/pk` | `AuthPages/SignUp.tsx` | Legacy route → main signup |
|
||||
| `/payment` | `Payment.tsx` | Payment page |
|
||||
| `/forgot-password` | `AuthPages/ForgotPassword.tsx` | Request password reset |
|
||||
| `/reset-password` | `AuthPages/ResetPassword.tsx` | Set new password |
|
||||
| `/verify-email` | `AuthPages/VerifyEmail.tsx` | Verify email |
|
||||
| `/unsubscribe` | `AuthPages/Unsubscribe.tsx` | Email unsubscribe |
|
||||
|
||||
---
|
||||
|
||||
## Legal Pages
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/privacy` | `legal/Privacy.tsx` | Privacy Policy |
|
||||
| `/terms` | `legal/Terms.tsx` | Terms of Service |
|
||||
|
||||
---
|
||||
|
||||
## Dashboard
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/` | `Dashboard/Home.tsx` | Main dashboard with workflow widgets |
|
||||
|
||||
---
|
||||
|
||||
## Setup & Keywords Library
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/setup/wizard` | `Setup/SetupWizard.tsx` | Onboarding wizard |
|
||||
| `/keywords-library` | `Setup/IndustriesSectorsKeywords.tsx` | Keywords library (primary route) |
|
||||
|
||||
**Legacy redirects:**
|
||||
- `/setup/add-keywords` → `/keywords-library`
|
||||
- `/setup/industries-sectors-keywords` → `/keywords-library`
|
||||
|
||||
---
|
||||
|
||||
## Sites Management
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/sites` | `Sites/List.tsx` | Sites list |
|
||||
| `/sites/:id` | `Sites/Dashboard.tsx` | Site dashboard |
|
||||
| `/sites/:id/pages` | `Sites/PageManager.tsx` | Page manager |
|
||||
| `/sites/:id/pages/new` | `Sites/PageManager.tsx` | New page (same manager) |
|
||||
| `/sites/:id/pages/:pageId/edit` | `Sites/PageManager.tsx` | Edit page (same manager) |
|
||||
| `/sites/:id/content` | `Sites/Content.tsx` | Site content overview |
|
||||
| `/sites/:id/content/structure` | `Sites/ContentStructure.tsx` | Content structure |
|
||||
| `/sites/:id/settings` | `Sites/Settings.tsx` | Site settings (tabs) |
|
||||
| `/sites/:id/sync` | `Sites/SyncDashboard.tsx` | Sync dashboard |
|
||||
| `/sites/:id/deploy` | `Sites/DeploymentPanel.tsx` | Deployment panel |
|
||||
| `/sites/:id/posts/:postId` | `Sites/PostEditor.tsx` | Post editor |
|
||||
| `/sites/:id/posts/:postId/edit` | `Sites/PostEditor.tsx` | Post editor (same view) |
|
||||
|
||||
**Legacy redirect:**
|
||||
- `/sites/:id/publishing-queue` → `/publisher/content-calendar`
|
||||
|
||||
---
|
||||
|
||||
## Planner
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/planner` | → `/planner/keywords` | Redirect |
|
||||
| `/planner/keywords` | `Planner/Keywords.tsx` | Keyword management |
|
||||
| `/planner/clusters` | `Planner/Clusters.tsx` | Cluster listing |
|
||||
| `/planner/clusters/:id` | `Planner/ClusterDetail.tsx` | Cluster detail |
|
||||
| `/planner/ideas` | `Planner/Ideas.tsx` | Content ideas |
|
||||
|
||||
---
|
||||
|
||||
## Writer
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/writer` | → `/writer/tasks` | Redirect |
|
||||
| `/writer/tasks` | `Writer/Tasks.tsx` | Task queue |
|
||||
| `/writer/content` | `Writer/Content.tsx` | Content list |
|
||||
| `/writer/content/:id` | `Writer/ContentView.tsx` | Content detail |
|
||||
| `/writer/drafts` | → `/writer/content` | Legacy redirect |
|
||||
| `/writer/images` | `Writer/Images.tsx` | Images by content |
|
||||
| `/writer/review` | `Writer/Review.tsx` | Review queue |
|
||||
| `/writer/approved` | `Writer/Approved.tsx` | Approved/published list |
|
||||
| `/writer/published` | → `/writer/approved` | Legacy redirect |
|
||||
|
||||
---
|
||||
|
||||
## Automation
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/automation` | → `/automation/overview` | Redirect |
|
||||
| `/automation/overview` | `Automation/AutomationOverview.tsx` | Run history |
|
||||
| `/automation/runs/:runId` | `Automation/AutomationRunDetail.tsx` | Run detail |
|
||||
| `/automation/run` | `Automation/AutomationPage.tsx` | Run execution |
|
||||
|
||||
**Legacy redirect:**
|
||||
- `/automation/settings` → `/sites/settings?tab=automation`
|
||||
|
||||
---
|
||||
|
||||
## Publisher
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/publisher` | → `/publisher/content-calendar` | Redirect |
|
||||
| `/publisher/content-calendar` | `Publisher/ContentCalendar.tsx` | Content calendar |
|
||||
|
||||
---
|
||||
|
||||
## Linker (Optional)
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/linker` | → `/linker/content` | Redirect |
|
||||
| `/linker/content` | `Linker/ContentList.tsx` | Linker content list |
|
||||
|
||||
---
|
||||
|
||||
## Optimizer (Optional)
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/optimizer` | → `/optimizer/content` | Redirect |
|
||||
| `/optimizer/content` | `Optimizer/ContentSelector.tsx` | Content selector |
|
||||
| `/optimizer/analyze/:id` | `Optimizer/AnalysisPreview.tsx` | Analysis preview |
|
||||
|
||||
---
|
||||
|
||||
## Thinker (Admin Only)
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/thinker` | → `/thinker/prompts` | Redirect |
|
||||
| `/thinker/prompts` | `Thinker/Prompts.tsx` | Prompt management |
|
||||
| `/thinker/author-profiles` | `Thinker/AuthorProfiles.tsx` | Author profiles |
|
||||
| `/thinker/profile` | `Thinker/Profile.tsx` | Profile settings |
|
||||
| `/thinker/strategies` | `Thinker/Strategies.tsx` | Strategies (placeholder) |
|
||||
| `/thinker/image-testing` | `Thinker/ImageTesting.tsx` | Image testing (placeholder) |
|
||||
|
||||
---
|
||||
|
||||
## Billing
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/billing` | → `/billing/overview` | Redirect |
|
||||
| `/billing/overview` | `Settings/CreditsAndBilling.tsx` | Billing overview |
|
||||
| `/billing/credits` | `Billing/Credits.tsx` | Credits listing |
|
||||
| `/billing/transactions` | `Billing/Transactions.tsx` | Transactions |
|
||||
| `/billing/usage` | `Billing/Usage.tsx` | Usage |
|
||||
|
||||
---
|
||||
|
||||
## Account
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/account/notifications` | `account/NotificationsPage.tsx` | Notifications |
|
||||
| `/account/settings` | `account/AccountSettingsPage.tsx` | Account settings (tabs) |
|
||||
| `/account/settings/profile` | `account/AccountSettingsPage.tsx` | Profile tab |
|
||||
| `/account/settings/team` | `account/AccountSettingsPage.tsx` | Team tab |
|
||||
| `/account/team` | → `/account/settings/team` | Legacy redirect |
|
||||
| `/account/plans` | `account/PlansAndBillingPage.tsx` | Plans & billing |
|
||||
| `/account/plans/upgrade` | `account/PlansAndBillingPage.tsx` | Upgrade tab |
|
||||
| `/account/plans/history` | `account/PlansAndBillingPage.tsx` | History tab |
|
||||
| `/account/purchase-credits` | → `/account/plans` | Legacy redirect |
|
||||
| `/account/usage` | `account/UsageDashboardPage.tsx` | Usage dashboard |
|
||||
| `/account/usage/logs` | → `/account/usage` | Legacy redirect |
|
||||
| `/account/usage/credits` | → `/account/usage` | Legacy redirect |
|
||||
| `/account/usage/insights` | → `/account/usage` | Legacy redirect |
|
||||
| `/account/usage/activity` | → `/account/usage` | Legacy redirect |
|
||||
| `/account/content-settings` | `account/ContentSettingsPage.tsx` | Content settings |
|
||||
| `/account/content-settings/publishing` | `account/ContentSettingsPage.tsx` | Publishing tab |
|
||||
| `/account/content-settings/images` | `account/ContentSettingsPage.tsx` | Images tab |
|
||||
|
||||
---
|
||||
|
||||
## Reference Data
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/reference/seed-keywords` | `Reference/SeedKeywords.tsx` | Seed keywords |
|
||||
| `/reference/industries` | `Reference/Industries.tsx` | Industries |
|
||||
|
||||
---
|
||||
|
||||
## Settings
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/settings` | `Settings/General.tsx` | General settings |
|
||||
| `/settings/users` | `Settings/Users.tsx` | Users |
|
||||
| `/settings/subscriptions` | `Settings/Subscriptions.tsx` | Subscriptions |
|
||||
| `/settings/system` | `Settings/System.tsx` | System settings |
|
||||
| `/settings/account` | `Settings/Account.tsx` | Account settings |
|
||||
| `/settings/plans` | `Settings/Plans.tsx` | Plans |
|
||||
| `/settings/industries` | `Settings/Industries.tsx` | Industries |
|
||||
| `/settings/integration` | `Settings/Integration.tsx` | Integrations (admin only) |
|
||||
| `/settings/publishing` | `Settings/Publishing.tsx` | Publishing settings |
|
||||
| `/settings/sites` | `Settings/Sites.tsx` | Sites settings |
|
||||
| `/settings/profile` | → `/account/settings` | Legacy redirect |
|
||||
| `/settings/import-export` | → `/` | Legacy redirect |
|
||||
|
||||
---
|
||||
|
||||
## Help
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/help` | `Help/Help.tsx` | Help center |
|
||||
|
||||
---
|
||||
|
||||
## Internal Pages (Non-Indexed)
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `/components` | `Components.tsx` | Component showcase |
|
||||
| `/ui-elements` | `UIElements.tsx` | Design system reference |
|
||||
|
||||
---
|
||||
|
||||
## Fallback Route
|
||||
|
||||
| Route | File | Description |
|
||||
|-------|------|-------------|
|
||||
| `*` | `OtherPage/NotFound.tsx` | 404 page |
|
||||
|
||||
---
|
||||
|
||||
## Page File Locations (Source of Truth)
|
||||
|
||||
```
|
||||
frontend/src/pages/
|
||||
├── account/
|
||||
│ ├── AccountSettingsPage.tsx
|
||||
│ ├── ContentSettingsPage.tsx
|
||||
│ ├── NotificationsPage.tsx
|
||||
│ ├── PlansAndBillingPage.tsx
|
||||
│ ├── PurchaseCreditsPage.tsx
|
||||
│ ├── UsageAnalyticsPage.tsx
|
||||
│ └── UsageDashboardPage.tsx
|
||||
├── AuthPages/
|
||||
│ ├── AuthPageLayout.tsx
|
||||
│ ├── ForgotPassword.tsx
|
||||
│ ├── ResetPassword.tsx
|
||||
│ ├── SignIn.tsx
|
||||
│ ├── SignUp.tsx
|
||||
│ ├── Unsubscribe.tsx
|
||||
│ └── VerifyEmail.tsx
|
||||
├── Automation/
|
||||
│ ├── AutomationOverview.tsx
|
||||
│ ├── AutomationPage.tsx
|
||||
│ ├── AutomationRunDetail.tsx
|
||||
│ └── PipelineSettings.tsx
|
||||
├── Billing/
|
||||
│ ├── Credits.tsx
|
||||
│ ├── Transactions.tsx
|
||||
│ └── Usage.tsx
|
||||
├── Dashboard/
|
||||
│ └── Home.tsx
|
||||
├── Help/
|
||||
│ └── Help.tsx
|
||||
├── legal/
|
||||
│ ├── Privacy.tsx
|
||||
│ └── Terms.tsx
|
||||
├── Linker/
|
||||
│ └── ContentList.tsx
|
||||
├── Optimizer/
|
||||
│ ├── AnalysisPreview.tsx
|
||||
│ └── ContentSelector.tsx
|
||||
├── OtherPage/
|
||||
│ └── NotFound.tsx
|
||||
├── Planner/
|
||||
│ ├── ClusterDetail.tsx
|
||||
│ ├── Clusters.tsx
|
||||
│ ├── Ideas.tsx
|
||||
│ └── Keywords.tsx
|
||||
├── Publisher/
|
||||
│ └── ContentCalendar.tsx
|
||||
├── Reference/
|
||||
│ ├── Industries.tsx
|
||||
│ └── SeedKeywords.tsx
|
||||
├── Settings/
|
||||
│ ├── Account.tsx
|
||||
│ ├── CreditsAndBilling.tsx
|
||||
│ ├── General.tsx
|
||||
│ ├── Industries.tsx
|
||||
│ ├── Integration.tsx
|
||||
│ ├── Plans.tsx
|
||||
│ ├── Publishing.tsx
|
||||
│ ├── Sites.tsx
|
||||
│ ├── Subscriptions.tsx
|
||||
│ ├── System.tsx
|
||||
│ └── Users.tsx
|
||||
├── Setup/
|
||||
│ ├── IndustriesSectorsKeywords.tsx
|
||||
│ └── SetupWizard.tsx
|
||||
├── Sites/
|
||||
│ ├── AIAutomationSettings.tsx
|
||||
│ ├── Content.tsx
|
||||
│ ├── ContentStructure.tsx
|
||||
│ ├── Dashboard.tsx
|
||||
│ ├── DeploymentPanel.tsx
|
||||
│ ├── List.tsx
|
||||
│ ├── PageManager.tsx
|
||||
│ ├── PostEditor.tsx
|
||||
│ ├── PublishingQueue.tsx
|
||||
│ ├── Settings.tsx
|
||||
│ └── SyncDashboard.tsx
|
||||
├── Thinker/
|
||||
│ ├── AuthorProfiles.tsx
|
||||
│ ├── ImageTesting.tsx
|
||||
│ ├── Profile.tsx
|
||||
│ ├── Prompts.tsx
|
||||
│ └── Strategies.tsx
|
||||
├── Writer/
|
||||
│ ├── Approved.tsx
|
||||
│ ├── Content.tsx
|
||||
│ ├── ContentView.tsx
|
||||
│ ├── Images.tsx
|
||||
│ ├── Review.tsx
|
||||
│ └── Tasks.tsx
|
||||
├── Components.tsx
|
||||
├── Payment.tsx
|
||||
└── UIElements.tsx
|
||||
```# Frontend Pages & Routes
|
||||
|
||||
**Last Verified:** January 17, 2026
|
||||
**Version:** 1.8.0
|
||||
**Framework:** React 19 + TypeScript + React Router 6 + Vite
|
||||
|
||||
Reference in New Issue
Block a user