V1 SaaS scaffold for overseas API sales

Launch the customer layer without touching the runtime core.

This starter keeps the existing newAPI and CLI Proxy chain intact, while moving auth, billing, admin and marketing concerns into a dedicated Next.js SaaS application.

Auth and portal

Core V1 scope aligned with the delivery memo.

  • Google login
  • Facebook login
  • Dashboard
  • Key management

Billing loop

Core V1 scope aligned with the delivery memo.

  • Orders and payments
  • Webhook validation
  • Wallet ledger
  • Quota grant orchestration

Admin operations

Core V1 scope aligned with the delivery memo.

  • User search
  • Manual quota grant
  • Order review
  • Audit trail

Milestones

The initial repo is organized so each delivery phase can land without major restructuring.

  1. Phase A: Next.js scaffold, Auth.js, PostgreSQL wiring, baseline docs.
  2. Phase B: newAPI adapter and smoke test for user, token, usage, quota.
  3. Phase C: dashboard, keys, billing pages backed by SaaS tables.
  4. Phase D: payment webhook and automatic activation workflow.
  5. Phase E: admin console for users, orders, quota and support actions.
  6. Phase F: deployment, rollback, logs, monitoring and drills.