FAQ

Last updated on 2026-09-13

General

What's the difference between the frontend-only and full-stack LMS kit?

The frontend-only kit (39 routes) uses hardcoded seed data in data/seed.ts. Nothing persists on refresh. The full-stack kit (55 routes) replaces seed data with a Supabase database: 38 tables, RLS, auth, and Server Actions. Enrollments, quiz results, discussions, and everything else persists.

Can I use this with a different database?

The kit is designed for Supabase (PostgreSQL). You could replace the Supabase client with another PostgreSQL client, but you'd need to rewrite the auth system, RLS policies, and storage configuration.

Is this a complete LMS I can sell to customers?

It's a production-ready starting point, not a finished SaaS product. You'll want to add video hosting, payment processing (Stripe), email notifications, and custom branding before charging customers.

Technical

Why does the kit use the admin client for all mutations?

The default user role is student, and RLS policies for instructor and admin tables would block mutations from student-role users. Using the admin client (service role key) for mutations ensures all operations work regardless of the user's current role. Auth checks are still performed via supabase.auth.getUser() before any mutation.

How do I change a user's role?

Go to the Supabase dashboard, open the profiles table, find the user, and change their role column to instructor or admin. The admin portal at /admin/users also supports role changes.

How do quizzes store questions?

Quiz questions are stored as JSONB in the quizzes.questions column. Each question object contains the question text, answer options, correct answer index, and point value. This allows flexible question types without additional tables.

Can I add video hosting?

The kit includes a lesson player UI with a video_url field. You can integrate with any video hosting service (Mux, Cloudflare Stream, YouTube, Vimeo) by setting the video_url to the embed URL.

How does the gamification system work?

  • XP is stored on the profiles table and awarded via awardXp()
  • Badges are defined in the badges table with rarity tiers; earned badges stored in user_badges
  • Certificates are generated in the certificates table with unique credential IDs
  • Streak is tracked on the profile and incremented on daily activity
  • Leaderboard ranks users by XP from the profiles table

Deployment

What hosting do I need?

Any Node.js host that supports Next.js: Vercel, AWS Amplify, Railway, Render, or self-hosted. Plus a Supabase project (free tier works for development).

How much does Supabase cost?

Supabase has a generous free tier: 500MB database, 50,000 monthly active users, 1GB storage. That's enough for development and small deployments. Production pricing starts at $25/month.

Can I use this in a monorepo?

Yes. The kit is a standard Next.js project that can be placed in a monorepo workspace alongside other projects.