5 Commits

Author SHA1 Message Date
4a0b230e1f fix: Add missing Search import to dashboard page 2025-12-10 16:54:11 +01:00
c2062f6573 perf: Optimize all Command Center pages for performance
LAYOUT CONSISTENCY:
- Header and content now use same max-width (max-w-7xl)
- All pages use consistent PageContainer wrapper
- Unified spacing and padding

NEW REUSABLE COMPONENTS (PremiumTable.tsx):
- SearchInput: Consistent search box styling
- TabBar: Consistent tabs with counts and icons
- FilterBar: Flex container for filter rows
- SelectDropdown: Consistent dropdown styling
- ActionButton: Consistent button (primary/secondary/ghost)

PERFORMANCE OPTIMIZATIONS:

1. Watchlist Page:
   - useMemo for stats, filtered domains, columns
   - useCallback for all handlers
   - memo() for HealthReportModal

2. Auctions Page:
   - useMemo for tabs, sorted auctions
   - useCallback for handlers
   - Pure functions for calculations

3. TLD Pricing Page:
   - useMemo for filtered data, stats, columns
   - useCallback for data loading
   - memo() for Sparkline component

4. Portfolio Page:
   - useMemo for expiringSoonCount, subtitle
   - useCallback for all CRUD handlers
   - Uses new ActionButton

5. Alerts Page:
   - useMemo for stats
   - useCallback for all handlers
   - Uses new ActionButton

6. Marketplace/Listings Pages:
   - useMemo for filtered/sorted listings, stats
   - useCallback for data loading
   - Uses new components

7. Dashboard Page:
   - useMemo for computed values (greeting, subtitle, etc.)
   - useCallback for data loading

8. Settings Page:
   - Added TabBar import for future use
   - Added useCallback, useMemo imports

RESULT:
- Reduced unnecessary re-renders
- Memoized expensive calculations
- Consistent visual styling across all pages
- Better mobile responsiveness
2025-12-10 16:47:38 +01:00
a41e28c420 fix: Seamless user journey for register/login/Stripe
PROBLEM: Redirect parameters were getting lost during user flows

FIXES APPLIED:

1. Register Page:
   - Default redirect: /command/dashboard (was /dashboard)
   - Stores redirect in localStorage before email verification
   - Preserves redirect when linking to login page

2. Login Page:
   - Checks localStorage for stored redirect (from registration)
   - Clears stored redirect after successful login
   - Uses useState for dynamic redirect handling

3. OAuth Callback:
   - Default redirect: /command/dashboard (was /dashboard)
   - Backend OAuth endpoints also updated

4. Fixed all /dashboard → /command/dashboard links:
   - pricing/page.tsx
   - page.tsx (landing page)
   - AdminLayout.tsx
   - DomainChecker.tsx
   - command/dashboard/page.tsx
   - Header.tsx (simplified check)

5. Backend OAuth:
   - Default redirect_path: /command/dashboard

NEW USER JOURNEY:

Pricing → Register → Email Verify → Login → Pricing → Stripe
                                                    ↓
                                            Welcome Page
                                                    ↓
                                              Dashboard

The redirect is preserved throughout:
- Query param ?redirect=/pricing passed through register/login
- Stored in localStorage during email verification gap
- Cleaned up after successful login

STRIPE FLOW CLARIFICATION:
- Stripe does NOT create users
- Users must register FIRST with email/password
- Then they can upgrade via Stripe checkout
- This is by design for security and flexibility
2025-12-10 16:23:16 +01:00
3ed5a1fc6d feat: Rename 'TLD Intelligence' to 'TLD Pricing' + implement analysis_4.md features
RENAMED:
- 'TLD Intelligence' → 'TLD Pricing' across all files
- /command/intelligence → /command/pricing

NEW FEATURES (from analysis_4.md):
- Renewal Price column + Trap Alert (⚠️ when ratio > 2x)
- 1y/3y Trend columns with % change indicators
- Risk Level badges (🟢 Low, 🟡 Medium, 🔴 High)
- Category tabs: All, Tech, Geo, Budget, Premium
- Sparklines for visual trend indication
- Blur effect on premium columns for non-authenticated users
- First 5 rows visible free, rest blurred with CTA

FILES UPDATED:
- frontend/src/components/Sidebar.tsx (link + label)
- frontend/src/components/Header.tsx (label)
- frontend/src/components/Footer.tsx (label)
- frontend/src/hooks/useKeyboardShortcuts.tsx (routes)
- frontend/src/app/command/dashboard/page.tsx (links)
- frontend/src/app/command/settings/page.tsx (links)
- frontend/src/app/command/pricing/page.tsx (full rewrite)
- frontend/src/app/intelligence/page.tsx (public page, full rewrite)
- frontend/src/app/admin/page.tsx (new TLD Pricing tab)
- frontend/src/app/page.tsx (label update)
2025-12-10 13:29:47 +01:00
b3e6c9aef6 refactor: Separate public pages from authenticated Command Center
STRUCTURE:
- Public pages: /auctions, /intelligence (with Header/Footer, no login needed)
- Command Center: /command/* (with Sidebar, login required)
  - /command/dashboard
  - /command/watchlist
  - /command/portfolio
  - /command/auctions
  - /command/intelligence
  - /command/settings

CHANGES:
- Created new /command directory structure
- Public auctions page: shows all auction data, CTA for login
- Public intelligence page: shows TLD data, CTA for login
- Updated Sidebar navigation to point to /command/*
- Updated all internal links (Header, Footer, AdminLayout)
- Updated login redirect to /command/dashboard
- Updated keyboard shortcuts to use /command paths
- Added /command redirect to /command/dashboard
2025-12-10 11:02:27 +01:00