Lecturemint: online watercolor courses for a painting instructor

Lecturemint: online watercolor courses for a painting instructor

00 Markdown

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

Run it yourself

Get the finished app on your own machine, ready to change however you like.

VS Code Command Palette⇧⌘P
lecturemint -scaffold=elementscode/demo-lecturemint

Press 'Enter' to confirm your input or 'Escape' to cancel

Press ⇧⌘P in VS Code and choose Elements: New App. Then paste this line and press Enter.

New to Elements? Install Elements first.

The code

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.

What Elements gave the app

  • 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.

What the project server gave the agent

The project server runs alongside the agent and answers as soon as a file is saved: it type-checks the templates, TypeScript and SQL, applies migrations and reruns the tests, so every question came back right away and the agent kept building.

What shipped

The app type-checks with zero errors and all 26 tests pass. Every page works on desktop and phone. A real sandbox payment went through Stripe end to end.

Comments· 0

Join the community

Get a weekly digest of new posts.

Sign up