A course site is a well-trodden build: courses and lessons, streamed video, a Stripe checkout that enrolls the buyer, magic-link logins and a progress bar. An agent gets that running in a weekend. The gaps are what Teachable takes off your hands: sales tax and VAT on every sale, video that streams well everywhere, the student phone apps, affiliates and support. For a small catalogue the build saves the monthly fee and Starter's 7.5% cut; once sales grow, price in the tax work before you leave.
Build me a self-hosted course site to replace Teachable. Requirements: - Next.js 15 (App Router) + TypeScript, Prisma with SQLite in ./data/school.db. `npm run dev` on http://localhost:3000. - Courses have sections and lessons; a lesson holds a video, Markdown text and file attachments. Drip option: unlock a section N days after enrollment. - Video: upload an MP4 in the admin; fluent-ffmpeg converts it to HLS at 360p and 720p in ./data/video/<lessonId>/; play it with hls.js. Segments are served only to enrolled students through signed URLs that expire after 6 hours. - Sales: Stripe Checkout for one-time prices and coupon codes (keys in .env). The checkout.session.completed webhook enrolls the buyer; STRIPE_TAX=true turns on automatic tax. - Students log in with a magic link sent through nodemailer and SMTP from .env. - Progress: mark complete, resume where I left off, a progress bar per course, multiple-choice quizzes, and a PDF certificate made with pdf-lib on completion. - Admin at /admin for ADMIN_EMAIL only: courses, lessons, students, sales, and a CSV import of a Teachable user export that enrolls students without charging them. - No telemetry, no third-party trackers; all data under ./data. - Out of scope: mobile apps, affiliates, community, upsells. - README: Stripe webhook testing with the Stripe CLI, installing ffmpeg, a VPS with enough disk for video, and a warning that sales tax and VAT are my job unless I use Stripe Tax or a merchant of record.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Teachable.
Add Bunny Stream as a video backend to the course site in this folder. Requirements: - When BUNNY_STREAM_KEY and BUNNY_LIBRARY_ID are set in .env, uploads go to Bunny Stream through its API instead of the local ffmpeg pipeline. - Lessons store the Bunny video id; the player uses Bunny's token-authenticated embed URLs, signed per student and valid for 6 hours. - A one-off script moves existing local HLS lessons to Bunny and keeps the local files until I delete them. - Update the README with the Bunny setup and its storage and delivery pricing.
Add student email to the course site in this folder. Requirements: - From /admin, write a Markdown email to all students of a course, or only those under a chosen progress percentage. - Send through the existing SMTP settings, at most 10 a second, with an unsubscribe link that only stops announcements, never login links. - An optional automatic email 7 days after enrollment if no lesson was completed. - Log every send and show it on the student's admin page. - Update the README.
Add payment plans to the course site in this folder. Requirements: - A course can have a payment plan: a Stripe subscription price with a fixed number of payments. - Enroll on the first payment; after the last one, cancel the subscription automatically with `cancel_at`. - If a payment fails, pause access after Stripe's final retry and restore it when the invoice is paid (invoice.paid and invoice.payment_failed webhooks). - Update the README with how to test this with Stripe test clocks.
Creators pay so they can teach instead of running servers: checkout, payouts, taxes, video and student logins all work from day one. Many also rely on the student apps and the built-in marketing tools, and there is no full course export, so moving a large school means downloading lessons one at a time.
Estimate · A VPS with room for video runs $5–20 a month and login emails fit in a free SMTP tier. Stripe takes its usual card fee (2.9% + 30¢ in the US), and Stripe Tax adds 0.5% per transaction where you turn it on. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Starter | $39 | $29 | 5 products, 1 admin, unlimited students, up to 1 TB of video, student iOS and Android apps, payments and sales tax handling. |
| Builder | $89 | $69 | 10 products, 0% transaction fee with Teachable Payments, affiliate program, real-time support. |
| Growth | $189 | $139 | 50 products, 5 admins, certificates, Teachable branding removed, imported students, custom admin permissions. |
| Custom | custom | — | Flexible products, students and admin seats, a success manager, priority support. |
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Sales tax, VAT and GST handled on every sale, The iOS and Android apps for your students.
About $39 a month on the Starter plan, $468 a year (checked 2026-10-13).
Sales tax, VAT and GST handled on every sale; The iOS and Android apps for your students; Video hosting that streams smoothly worldwide; Affiliates, upsells and abandoned-cart emails out of the box; Someone to call when a payment or login goes wrong. If any of those matter to you, keep paying.
Yes: CourseLit (open source), LearnHouse (open source), Frappe LMS (open source).