Skip to content

Add PagePulse web analysis platform with dashboard and API#1056

Open
thomaslovaslokoy-ui wants to merge 8 commits intoanthropics:mainfrom
thomaslovaslokoy-ui:claude/pagepulse-finish-gT4Lm
Open

Add PagePulse web analysis platform with dashboard and API#1056
thomaslovaslokoy-ui wants to merge 8 commits intoanthropics:mainfrom
thomaslovaslokoy-ui:claude/pagepulse-finish-gT4Lm

Conversation

@thomaslovaslokoy-ui
Copy link

Summary

This PR introduces a complete Next.js-based web application for PagePulse, an AI-powered web analysis platform. The implementation includes a public-facing website with pricing and documentation, user authentication, account management, API endpoints, and email notification system.

Key Changes

Pages & Public Routes

  • Homepage (app/page.tsx) - Marketing landing page with feature highlights and CTA
  • Pricing (app/pricing/page.tsx) - Tiered pricing comparison (Free/Pro plans) with annual billing toggle
  • API Documentation (app/api-docs/page.tsx) - Comprehensive API reference with curl, JavaScript, and Python examples
  • Dashboard (app/dashboard/page.tsx) - User analysis interface with URL submission and results display
  • Account Settings (app/account/page.tsx) - User profile, usage tracking, API key management, and billing portal integration
  • Authentication (app/login/page.tsx, app/signup/page.tsx) - Email/password-based auth with plan selection
  • Legal Pages (app/privacy/page.tsx, app/terms/page.tsx) - Privacy policy and terms of service
  • Unsubscribe (app/unsubscribe/page.tsx) - Email preference management with token validation

API Routes

  • Authentication (app/api/auth/callback/route.ts) - Login/signup with Supabase Auth
  • Analysis (app/api/analyze/route.ts) - POST endpoint to analyze webpages with quota enforcement
  • API Keys (app/api/keys/generate/route.ts) - Generate and manage API keys with hashing
  • Billing (app/api/billing/portal/route.ts) - Stripe billing portal integration
  • Unsubscribe (app/api/unsubscribe/route.ts) - Handle email unsubscribe requests

Email Templates

  • Welcome (emails/welcome.html) - Onboarding email for new users
  • Monthly Summary (emails/monthly-summary.html) - Usage recap and insights
  • Quota Warning (emails/quota-warning.html) - Alert when approaching usage limits
  • Quota Exhausted (emails/quota-exhausted.html) - Notification when limit is reached
  • Password Reset (emails/password-reset.html) - Password recovery flow

Components

  • Header - Navigation with responsive mobile menu
  • Footer - Site footer with links and company info
  • UsageBar - Visual quota usage indicator with warning states
  • CopyButton - Reusable clipboard copy utility
  • DeleteAccountDialog - Confirmation dialog for account deletion

Infrastructure & Configuration

  • Authentication (lib/auth.ts) - User session management with Supabase
  • Supabase Clients (lib/supabase-server.ts, lib/supabase-browser.ts) - Server and client-side database access
  • Stripe Integration (lib/stripe.ts) - Payment processing with plan definitions
  • Email Service (lib/email.ts) - Template-based email sending
  • Styling (app/globals.css, tailwind.config.ts) - Tailwind CSS with custom brand colors
  • Security Headers (next.config.js) - HSTS, X-Frame-Options, CSP configuration
  • Environment Setup (.env.example) - Configuration template for Supabase, Stripe, and SendGrid

Project Configuration

  • Updated package.json with Next.js scripts and dependencies
  • Updated tsconfig.json for Next.js compatibility
  • Added postcss.config.js for Tailwind processing
  • Updated .gitignore for Next.js build artifacts

Notable Implementation Details

  • API Key Security: Keys are hashed with SHA-256 before storage; plaintext shown only once on generation
  • Quota Management: Monthly usage tracking with automatic reset and email notifications at 80% and 100% thresholds
  • Stripe Integration: Seamless billing portal access for plan upgrades and management
  • Email Templates: HTML-based templates with variable substitution for personalization
  • Authentication: Supabase Auth with email confirmation

https://claude.ai/code/session_01Pd5bD37qJmxMYJtu78Vgd4

claude and others added 8 commits March 16, 2026 13:45
Complete AI-powered web analysis platform at pagepulse.app:

Pages: landing, pricing (annual/monthly toggle, feature comparison),
API docs (endpoint reference, code examples with copy buttons),
account (usage bar, billing portal, API key management, delete account),
dashboard (URL analysis, score display, empty states),
login/signup, privacy policy, terms of service, unsubscribe (token-based)

API routes: /api/analyze, /api/billing/portal (Stripe),
/api/unsubscribe (token validation), /api/keys/generate (crypto hashed),
/api/auth/callback (Supabase auth)

Email templates: welcome, quota-warning, quota-exhausted, password-reset,
monthly-summary — all with NorwegianSpark SA footer

Infrastructure: security headers (HSTS, CSP, X-Frame-Options, nosniff),
OpenGraph metadata on all pages, Tailwind CSS, Supabase + Stripe integration

Zero TS errors, zero dead links, zero placeholders, zero console.logs.

https://claude.ai/code/session_01Pd5bD37qJmxMYJtu78Vgd4
- Add GET /api/account route (fetches plan, usage, email prefs from DB)
- Add PATCH /api/account and /api/account/preferences routes
- Account page now fetches real data on mount with loading skeleton
- Dashboard usage bar reads real scans_used/scans_limit from DB
- Increments usage count client-side after successful analysis

https://claude.ai/code/session_01Pd5bD37qJmxMYJtu78Vgd4
This workflow generates SLSA provenance files for projects, satisfying level 3 requirements. It includes steps for building artifacts and generating provenance subjects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants