πŸ“

Course Template

github.com/ErlisK/teachrepo-template

The official starting point for every TeachRepo course. Clone it, write your lessons, and ship.

Quick Start

# Clone the template
git clone https://github.com/ErlisK/teachrepo-template my-course
cd my-course

# Install the CLI
npm install -g @teachrepo/cli

# Scaffold (alternative to cloning)
teachrepo new "My Course Title"
teachrepo new "My Course Title" --template=quiz    # with quizzes
teachrepo new "My Course Title" --template=sandbox # with sandboxes

File Structure

teachrepo-template/
β”œβ”€β”€ course.yml              ← course metadata, pricing, lesson order
β”œβ”€β”€ lessons/
β”‚   β”œβ”€β”€ 01-introduction.md  ← free preview lesson
β”‚   β”œβ”€β”€ 02-core-concepts.md ← paid lesson with quiz
β”‚   β”œβ”€β”€ 03-advanced.md      ← paid lesson with sandbox
β”‚   └── 04-conclusion.md    ← paid lesson
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── deploy.yml      ← auto-import on git push
β”œβ”€β”€ .env.example            ← environment variable reference
β”œβ”€β”€ .gitignore
└── README.md

course.yml

The canonical configuration for your course. All metadata, pricing, and lesson order lives here.

title: "Your Course Title"
slug: "your-course-slug"       # URL: teachrepo.com/courses/<slug>
price_cents: 2900               # $29.00 USD  |  0 = free
currency: usd
version: "1.0.0"
description: |
  Multi-line description. Markdown supported.
repo_url: "https://github.com/you/your-course"
tags: [tag1, tag2]

lessons:
  - filename: lessons/01-introduction.md
    title: "Introduction"
    access: free             # ← free preview

  - filename: lessons/02-core-concepts.md
    title: "Core Concepts"
    access: paid             # ← unlocks on purchase

Lesson Format

Lessons are Markdown files. Add a YAML frontmatter block for metadata, quizzes, and sandboxes.

Basic lesson

---
title: "Lesson Title"
access: free | paid
---

# Lesson Title

Lesson content. Full Markdown: code blocks, images, tables.

With quiz

---
title: "Core Concepts"
access: paid
quiz:
  - q: "Which answer is correct?"
    options: ["A", "B (correct)", "C", "D"]
    answer: "B (correct)"
    explanation: "B is correct because..."
---

With sandbox

---
title: "Advanced Patterns"
access: paid
sandbox:
  provider: stackblitz     # or codesandbox
  repo: "you/your-course"
  branch: "lesson-03-starter"
  file: "src/index.ts"
  height: 550
---

GitHub Actions CI/CD

The template includes .github/workflows/deploy.yml. On every push to main, it validates your YAML and auto-imports the course to TeachRepo.

Add one GitHub Actions secret to your repo: TEACHREPO_TOKEN(get it from Dashboard β†’ Settings).