← Back to blog
·8 min readtutorialquickstart

From Markdown to Paywalled Course in Minutes

A complete walkthrough: starting from a folder of .md files, ending with a live, Stripe-powered course site — in under 10 minutes.

Prerequisites

You'll need:

Step 1: Structure Your Lesson Files

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

Step 2: Write Your course.yml

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: paid

Step 3: Import to TeachRepo

Two ways to import:

Option A: GitHub Import (recommended)

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" }

Option B: Direct YAML Import

You can paste the full course.yml directly into the TeachRepo dashboard. Lesson content is fetched from the linked GitHub repo.

Step 4: Connect Stripe

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:

  • Creates a Stripe Checkout Session on "Buy" click
  • Listens for the checkout.session.completed webhook
  • Grants course_entitlement in the database
  • Unlocks all paid lessons immediately
# 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.

Step 5: Deploy to Vercel

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.

What Students See

Once deployed, students get:

  • A course landing page with description, price, and lesson list
  • Free lessons accessible immediately (no signup required)
  • Signup prompt on gated lesson access attempt
  • Stripe Checkout for purchase (card, Apple Pay, Google Pay)
  • Instant access to all paid content post-purchase

Total Time: ~8 Minutes

  • Structure your Markdown files: 2 min
  • Write course.yml: 3 min
  • Import + connect Stripe: 2 min
  • Deploy: 1 min

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.