Back home

Live Demo Lab

Click through the exact AI SaaS billing loop: registration grant, successful deduction, failed-call no deduction, admin recharge, logs, and role protection.

Technical review

Credits

1,000

Successful AI calls

0

Failed AI calls

0

Admin API rule

403

Interactive Credit Loop

This page is a reviewer demo that works without private Supabase, DeepSeek, or OpenAI keys. The production code still implements the real backend routes and SQL functions described below.

Latest API result

Demo user registered with 1000 credits.

Admin Recharge

Real route: POST /api/admin/recharge. Normal users get 403. Admins call the SQL function admin_add_credits.

Usage Logs

TimeActionStatusCredits usedBalance afterTechnical note
RegistrationNew user profile createdsuccess01000Database trigger creates profile and initial_grant transaction.