Blocks/Admin Dashboard
AdvancedCore

Admin Dashboard

User management, revenue analytics, feature flags

Full server-side admin utilities: user CRUD with role promotion, revenue-by-month SQL function, top blocks leaderboard, affiliate rankings, feature flag CRUD with percentage rollout, and daily active user queries. Use with the admin UI page included in the app skeleton.

14h
Time saved
365
Lines of code
100%
TypeScript
#admin#analytics#dashboard#feature-flags

Dependencies

@supabase/supabase-js

Code preview

blocks/admin/index.ts
1const stats = await getDashboardStats()
2var(--text-3);font-style:italic">// β†’ { totalUsers: 312, totalRevenue: 8940.50,
3var(--text-3);font-style:italic">// totalPurchases: 487, topBlock: 'auth' }
4
5const flagEnabled = await isFeatureFlagEnabled('new_blocks_page', userId)

Short excerpt. Full block includes SQL migrations, error handling, RLS policies, and complete file structure.

$39

One-time Β· Instant GitHub access

πŸ”œ Payments launching soon

We are setting up secure checkout. Email samarthofficial52@gmail.com to get early access.

You might also like