A complete walkthrough: starting from a folder of .md files, ending with a live, Stripe-powered course site — in under 10 minutes.
You'll need:
.md files (lessons)TeachRepo expects your lessons to be Markdown files with YAML frontmatter. Here's the minimal structure:
my-course/ ├── course.yml ← course metadata + pricing ├── 01-intro.md ← free preview lesson ├── 02-core-concepts.md ← paid lesson ├── 03-advanced.md ← paid lesson └── 04-wrap-up.md ← paid lesson
Each lesson file has a small frontmatter block at the top:
---
title: "Core Concepts"
access: paid
---
# Core Concepts
Your lesson content goes here. Full Markdown is supported:
code blocks, images, tables, lists, callouts.
```python
def hello_world():
print("Hello from your lesson!")
```The only required frontmatter fields are title and access (free or paid).
The course.yml is the canonical source of truth for your course. It controls pricing, lesson order, access tiers, and metadata:
title: "Python Async for Web Developers"
slug: "python-async"
price_cents: 1900 # $19.00 USD
currency: usd
version: "1.0.0"
description: |
Master Python's asyncio, aiohttp, and async patterns
used at production scale. Practical, code-first.
repo_url: "https://github.com/yourname/python-async-course"
tags: [python, async, web, backend]
lessons:
- filename: 01-intro.md
title: "Why Async? A Mental Model"
access: free
- filename: 02-core-concepts.md
title: "Coroutines, Tasks, and the Event Loop"
access: paid
- filename: 03-advanced.md
title: "Real-World Patterns: Timeouts, Retries, Semaphores"
access: paid
- filename: 04-wrap-up.md
title: "Putting It All Together"
access: paidTwo ways to import:
Push your course folder to a GitHub repo, then import via the dashboard or API:
# Via the TeachRepo API (once you have your JWT)
curl -X POST https://teachrepo.com/api/import \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"repoUrl": "https://github.com/yourname/python-async-course",
"courseYml": "<your-course.yml-contents>"
}'
# Response:
# { "courseId": "crs_abc123", "slug": "python-async", "status": "imported" }You can paste the full course.yml directly into the TeachRepo dashboard. Lesson content is fetched from the linked GitHub repo.
TeachRepo uses Stripe Checkout under the hood. You provide your Stripe secret key once (in your account settings or as a Vercel env var), and the platform handles everything else:
checkout.session.completed webhookcourse_entitlement in the database# The checkout flow in 3 lines of code (simplified): # 1. Student clicks "Buy Course" → POST /api/checkout # 2. Stripe Checkout Session created → redirect to Stripe # 3. Stripe webhook fires → entitlement granted → lessons unlocked # No custom payment UI to build. No webhook handler to write. # TeachRepo handles all of this.
TeachRepo is a Next.js app. Deploy it to your own Vercel account in one command:
# Clone the TeachRepo template git clone https://github.com/ErlisK/teachrepo cd teachrepo # Add your environment variables cp .env.example .env.local # Edit .env.local with your Supabase + Stripe keys # Deploy vercel --prod
Or use the TeachRepo hosted tier and skip all of this. Your call.
Once deployed, students get:
That's it. Your course is live, Stripe checkout works, and students can start buying.
Ready to try it?
Two free sample courses are already live on the TeachRepo marketplace. Sign up free and import your first course — no credit card required.