SurfSense/surfsense_web/app
Vonic 4eb6ed18d6 Epic 5 Complete: Billing, Subscriptions, and Admin Features
Resolve all 5 deferred items from Epic 5 adversarial code review:
- Migration 124: Add CASCADE to subscriptionstatus enum drop (prevent orphaned references)
- Stripe rate limiting: In-memory per-user limiter (20 calls/60s) on verify-checkout-session
- Subscription request cooldown: 24h cooldown before resubmitting rejected requests
- Token reset date: Initialize on first subscription activation
- Checkout URL validation: Confirmed HTTPS-only (Stripe always returns HTTPS)

Implement Story 5.4 (Usage Tracking & Rate Limit Enforcement):
- Page quota pre-check at HTTP upload layer
- Extend UserRead schema with token quota fields
- Frontend 402 error handling in document upload
- Quota indicator in dashboard sidebar

Story 5.5 (Admin Seed & Approval Flow):
- Seed admin user migration with default credentials warning
- Subscription approval/rejection routes with admin guard
- 24h rejection cooldown enforcement

Story 5.6 (Admin-Only Model Config):
- Global model config visible across all search spaces
- Per-search-space model configs with user access control
- Superuser CRUD for global configs

Additional fixes from code review:
- PageLimitService: PAST_DUE subscriptions enforce free-tier limits
- TokenQuotaService: PAST_DUE subscriptions enforce free-tier limits
- Config routes: Fixed user_id.is_(None) filter on mutation endpoints
- Stripe webhook: Added guard against silent plan downgrade on unrecognized price_id

All changes formatted with Ruff (Python) and Biome (TypeScript).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 03:54:45 +07:00
..
(home) feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
admin/subscription-requests Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
api fix: always render ZeroProvider, allow anon queries without 401 2026-03-24 16:59:42 +02:00
auth/callback fix: remove message from loading UI 2026-01-27 15:28:30 +05:30
dashboard feat(story-3.5): add cloud-mode LLM model selection with token quota enforcement 2026-04-14 17:01:21 +07:00
db try vercel fix 2025-09-30 22:45:04 -07:00
desktop chore: linting 2026-04-08 16:14:26 -07:00
docs feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
invite/[invite_code] feat: replace Loader2 with Spinner component for consistent loading indicators 2026-01-25 15:23:45 +05:30
public/[token] chore: linting 2026-03-27 03:17:05 -07:00
subscription-success feat(story-5.2): add Stripe subscription checkout with session verification 2026-04-14 23:58:57 +07:00
verify-token chore: ran biome checks 2026-03-07 12:57:27 +05:30
apple-icon.png feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
error.tsx chore: linting 2026-04-02 19:45:28 -07:00
favicon.ico feat: updated logo 2026-01-08 23:03:43 -08:00
global-error.tsx chore: linting 2026-03-27 03:17:05 -07:00
globals.css perf: add content-visibility: auto to long list items 2026-04-02 02:26:55 +05:30
icon.png feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
layout.config.tsx chore: ran linting 2026-03-10 16:17:12 +05:30
layout.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
not-found.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
robots.ts feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
sitemap.ts feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00