Online courses with card checkout, built by Claude Code on Elements

Online courses with card checkout, built by Claude Code on Elements

Courses sold by card, lesson videos with notes and progress, live lesson questions, and revenue and completion stats.

How it's built

Lecturemint needed course sales by card, video lessons with progress, a question thread under each lesson that the instructor answers live, and a studio for uploading lessons and reading the numbers. Each of those is a part of Elements, so the agent spent its 29 minutes on the course platform itself.

  • Live questions and replies. Lesson questions are a LiveTable, so a question appears on the lesson page and in the instructor's inbox the moment it is posted, and the reply shows up under it just as fast. Only students who bought the course can ask, and only the instructor replies.
  • Card payments. Buying a course is one @rpc call that reads the price on the server and sends the student to Stripe. The course is granted once whether the return page or Stripe's webhook arrives first. Until a Stripe key is set, a test checkout inside the app takes the payment, and in production the app registers its own webhook.
  • Video uploads. The instructor uploads lesson videos straight through a server call, and the app streams them so the player can jump to any point.
  • Progress as a function call. Marking a lesson complete is one server call that checks the student owns the course and returns the updated progress.
  • Data from SQL files. Migrations define the platform and seed the instructor, three courses with covers and six to eight lessons each with sample videos and notes, four students with purchases and progress, and eight questions.
  • Sessions and roles. Every studio page and server call shares one guard on the instructor role.

Why Elements

Elements is an integrated full-stack app framework and a project server. The project server checks the agent's work as it builds: it type-checks the server and browser code, analyzes the program, applies migrations and runs the tests, then reports the results to the agent. A security mistake, such as calling a server-only function from the browser, is a compile error. The agent reads the report and fixes its own mistakes before it tells you a feature is done. The same checks run on every feature you ask for next.

Run it yourself

  1. 1 Sign up

    Already have an account? Sign in

  2. 2 Install and run the demo One prompt to paste into your agent.

View the code on GitHub →

The prompt

What Claude was given to build this app.

Agent Prompt
Build an online course platform named lecturemint for an instructor who teaches
watercolor painting.

STUDENT
- Browse courses with a cover, description, lesson list and price.
- Buy a course by card and get access.
- Watch lessons (video with notes below), mark them complete, and see
  progress per course.
- Leave a question under a lesson; the instructor replies.

INSTRUCTOR (admin account)
- Create courses and lessons: title, video upload, markdown notes, order.
- Students per course, revenue, and completion rates.
- Answer lesson questions.

Payments by Stripe.

Seed the instructor, three courses with covers and five to eight lessons each
(short sample videos), four students with purchases and progress, and some
questions. Show the seeded logins on the sign-in page.

New questions and replies update in real time.