A comprehensive educational platform that teaches AI-assisted programming through hands-on tutorials, practical projects, and best practices.
Features interactive learning modules, modern development workflows, and real-world project implementations.
Fork it and host your own learning environment FREE on Cloudflare.
Live Demo · Documentation · Blog · Issues
Share This Project
🌟 Pioneering the future of AI-assisted programming education. Built for the next generation of developers.
[!NOTE] The screenshots in this section pre-date the 2026-07 "MindMarket" redesign (cream-paper editorial theme, oversized Inter type, paper-cut illustrations, light-only). They are kept as a record of the platform's visual evolution; for the current look, visit the live site.
[!TIP] See the evolution of the platform's UI/UX over time, from the original design through the "Version 2" refresh below.
📱 Previous Version (Version 1) & Version Comparison
- ✨ Enhanced Visual Design: Modern color scheme and typography
- 🎨 Improved UI Components: Better buttons, cards, and interactive elements
- 📱 Mobile Optimization: Superior responsive design across all devices
- 🚀 Performance Improvements: Faster loading and smoother interactions
[!NOTE] Watch our platform in action with this comprehensive demo.
2024-12-14.14-59-17.mp4
Complete platform walkthrough showing all major features
Tech Stack Badges:
Important
This platform demonstrates modern educational technology with interactive learning modules. It combines comprehensive documentation with hands-on tutorials to provide a complete AI programming education experience. Features include step-by-step tutorials, practical projects, and modern development tool integration.
📑 Table of Contents
- 🚀 AI Programming Education Platform - TOC
We are passionate educators and developers creating the next generation of AI programming education. By adopting modern educational technologies and comprehensive learning methodologies, we aim to provide learners with powerful, accessible, and engaging AI programming education.
Whether you're a beginner looking to enter the world of AI programming or an experienced developer seeking to enhance your skills with AI tools, this platform will be your comprehensive learning companion. The platform is actively maintained and we welcome feedback for any issues encountered.
Note
- Node.js >= 18.0 required for development
- Modern web browser for optimal experience
- GitHub account recommended for accessing additional resources
- No prior AI experience required - we start from the basics!
| No installation required! Visit our live demo to start learning immediately. | |
|---|---|
| Get intelligent answers about the project using AI |
Tip
⭐ Star us to receive all updates and new learning content from GitHub!
Experience next-generation educational content through our comprehensive module system. Our innovative approach provides structured learning paths through carefully designed tutorials covering everything from AI communication basics to advanced development workflows.
Key capabilities include:
- 🎯 Progressive Learning: Structured curriculum from basics to advanced
- 🛠️ Hands-on Practice: Real-world projects and exercises
- 📱 Responsive Design: Learn on any device, anywhere
- 🌐 Bilingual Support: Content available in multiple languages
Revolutionary tutorial system that transforms how learners interact with AI programming concepts. With our structured approach and practical examples, students can master AI-assisted development while building real projects.
Available Learning Tracks:
- Environment Setup: Development environment configuration
- Basic Concepts: AI communication and prompt engineering
- Tool Mastery: Cursor, v0, and modern development tools
- Project Implementation: Complete project walkthroughs
- Advanced Topics: AI drawing, chat systems, and Coze integration
An intelligent AI chat assistant powered by Cloudflare Workers AI, providing real-time Q&A support based on the course content. The assistant uses Retrieval-Augmented Generation (RAG) to provide accurate, context-aware answers.
sequenceDiagram
participant User
participant ChatWidget
participant Worker as Cloudflare Worker
participant Vectorize
participant AI as Workers AI
User->>ChatWidget: Ask question
ChatWidget->>Worker: POST /api/chat
Worker->>Vectorize: Search relevant docs
Vectorize-->>Worker: Return matching chunks
Worker->>AI: Generate response with context
AI-->>Worker: Stream response
Worker-->>ChatWidget: SSE stream
ChatWidget-->>User: Display answer
Key Capabilities:
- 🤖 Intelligent Q&A: Answers questions based on course documentation
- 📚 RAG-Powered: Uses vector search to find relevant content
- 🌊 Streaming Responses: Real-time typing effect for better UX
- 🌐 Bilingual Support: Supports both Chinese and English
- 🎨 On-Brand UI: Paper-styled chat widget that matches the MindMarket design system
Beyond the core learning modules, this platform includes:
- 🤖 AI Chat Assistant: Intelligent Q&A powered by Cloudflare Workers AI
- 📚 Rich Documentation: Comprehensive guides and references
- 🎨 MindMarket Design System: Cream-paper editorial look, oversized Inter type, and paper-cut illustrations (light theme only — dark mode is intentionally not offered)
- 📝 Blog System: Regular updates and insights
- 🔍 Search Functionality: Find content quickly and easily (Algolia)
- 📊 Progress Tracking: Monitor your learning journey
- 💻 Code Examples: Interactive code snippets and demos
- 🚀 Push-to-Deploy: Cloudflare Pages builds and publishes every push to
main - 📱 Mobile Optimized: Perfect experience on all devices
- 🌐 i18n Support: Full internationalization (Chinese & English)
✨ New content and features are continuously added as the field evolves.
Frontend Stack:
- Framework: Docusaurus 3.8.1 with React 18
- Design System: "MindMarket" — a cream-paper editorial theme (oversized Inter type, paper-cut illustrations, no shadows or gradients, light theme only — dark mode is intentionally disabled)
- Styling: Hand-authored CSS under
src/css/—custom.cssis an@importmanifest over 8 files (tokens.css,base.css,animations.css,navbar.css,footer.css,docs.css,blog.css,pages.css). No CSS-in-JS, styled-components, or Tailwind - Illustrations: Flat paper-cut PNG/webp assets in
static/img/illustrations/, generated viascripts/generate-illustrations.mjs(OpenAIgpt-image-1+sharppost-processing) - Brand assets: Logo, favicons, and social card under
static/img/brand/ - Content: MDX for rich interactive documentation
- Search: Algolia DocSearch integration
- i18n: Chinese (zh-Hans) and English support
- Components: Custom React components (ChatWidget, MusicPlayer, TechNest, homepage sections, etc.)
Backend Stack (AI Chat):
- Runtime: Cloudflare Workers (Edge Computing)
- Public URL:
https://programming-api.chanmeng.org - AI Model:
@cf/meta/llama-3.1-8b-instruct-fp8via Workers AI - Embeddings:
@cf/baai/bge-base-en-v1.5(768 dimensions) - Vector Database: Cloudflare Vectorize (~4,800 document chunks)
- Storage: Cloudflare KV (sessions, message board cache, capstone votes)
- Content DB: Notion (message board & capstone showcase)
- API: RESTful with SSE streaming
Development Tools:
- Build System: Rspack-based Docusaurus build (@docusaurus/faster)
- Development Server: Hot reload development environment
- Content Management: File-based content system with versioning
- Deployment: Cloudflare Pages (Frontend) + Cloudflare Workers (Backend)
- Version Control: Git-based workflow
Tip
Each technology was selected for educational effectiveness, ease of maintenance, and optimal learning experience.
Tip
This architecture supports easy content management and scalable educational delivery, making it perfect for educational institutions and self-learners.
graph TB
subgraph "Frontend - Docusaurus"
A[MDX Documentation] --> B[React Components]
B --> C[ChatWidget]
B --> D[Theme Components]
C --> E[i18n Support]
end
subgraph "Backend - Cloudflare Workers"
F[Worker Entry] --> G[Chat Handler]
G --> H[RAG Module]
H --> I[Vectorize Search]
H --> J[Workers AI]
G --> K[KV Sessions]
end
subgraph "Deployment"
L[Cloudflare Pages CDN]
M[Cloudflare Edge]
end
C -->|API Request| F
J -->|Llama 3.1 8B| G
I -->|BGE Embeddings| H
A --> L
F --> M
The AI Chat system uses a RAG (Retrieval-Augmented Generation) architecture to provide accurate, context-aware responses:
flowchart LR
subgraph "Document Processing"
A[MDX Files] -->|Parse| B[Text Chunks]
B -->|Embed| C[Vector Store]
end
subgraph "Query Processing"
D[User Query] -->|Embed| E[Query Vector]
E -->|Search| C
C -->|Top 3 Matches| F[Context]
end
subgraph "Response Generation"
F --> G[System Prompt]
D --> G
G -->|Llama 3.1| H[AI Response]
H -->|SSE Stream| I[Chat UI]
end
| Component | Technology | Purpose |
|---|---|---|
| Vector DB | Cloudflare Vectorize (docs-index) |
Store 4,800+ document embeddings |
| Embeddings | @cf/baai/bge-base-en-v1.5 |
Convert text to 768-dim vectors |
| LLM | @cf/meta/llama-3.1-8b-instruct-fp8 |
Generate conversational responses |
| Sessions | Cloudflare KV | Maintain conversation history |
| Streaming | Server-Sent Events | Real-time response delivery |
ai-programming-teaching-project/
├── docs/ # Current version documentation
│ ├── basics/ # Fundamental concepts
│ ├── practice/ # Project implementations
│ └── website/ # Website development tutorials
├── versioned_docs/ # Versioned documentation
│ ├── version-2024-winter/ # Winter 2024 curriculum
│ └── version-2025-summer/ # Summer 2025 curriculum
├── blog/ # Blog posts
├── i18n/ # Internationalization
│ ├── en/ # English translations
│ └── zh-Hans/ # Chinese translations
├── src/
│ ├── components/ # React components
│ │ ├── ChatWidget/ # AI Chat assistant
│ │ ├── MusicPlayer/ # Navbar music player
│ │ ├── Home/ # Homepage sections (Hero, Programs, HowItWorks, Community)
│ │ ├── TechNest/ # Curriculum step/badge components
│ │ ├── MintlifyShim/ # Docs UI primitives (Steps, Card, Accordion)
│ │ ├── AITracker/ # AI-referrer analytics
│ │ └── GEOHead/ # Per-page AI/SEO instructions
│ ├── pages/ # Custom pages (index, message-board, capstone-showcase, feeds)
│ ├── theme/ # Theme customizations & swizzles
│ └── css/ # MindMarket design system (8-file @import manifest via custom.css)
├── worker/ # Cloudflare Worker backend
│ ├── src/
│ │ ├── index.ts # Worker entry point & routing
│ │ ├── chat.ts # Chat logic & streaming
│ │ ├── rag.ts # RAG & vector search
│ │ ├── messages.ts # Message board (Notion-backed)
│ │ ├── capstones.ts # Capstone showcase & voting
│ │ └── types.ts # TypeScript types
│ ├── scripts/
│ │ ├── seed-vectors.ts # Document vectorization
│ │ ├── smoke-test.mjs # End-to-end RAG check
│ │ └── namespace-test.mjs # Namespace-scoped retrieval check
│ ├── wrangler.toml # Cloudflare configuration
│ └── package.json # Worker dependencies
├── static/ # Static assets
├── docusaurus.config.js # Docusaurus configuration
├── sidebars.js # Sidebar configuration
└── package.json # Project dependencies
Important
Ensure you have the following installed:
1. Clone Repository
git clone https://github.com/ChanMeng666/ai-programming-teaching-project.git
cd ai-programming-teaching-project2. Install Dependencies
# Using npm
npm install
# Using yarn
yarn install
# Using pnpm (recommended)
pnpm install3. Start Development Server
npm start🎉 Success! Open http://localhost:3000 to access the learning platform.
# Start with hot reload
npm start
# Build for production
npm run build
# Serve production build
npm run serve
# Clear cache
npm run clearImportant
The frontend and the backend ship independently. The site auto-deploys from main; the Worker only deploys when you run wrangler deploy by hand. Pushing a change to worker/ ships nothing on its own.
The site is a Cloudflare Pages project connected to the GitHub repository. Pushing to main is the deploy.
git push origin main # Cloudflare Pages builds and publishes automaticallyPages project settings:
| Setting | Value |
|---|---|
| Production branch | main |
| Build command | npm run build |
| Build output directory | build |
| Domains | programming.chanmeng.org, ai-programming-teaching-project.pages.dev |
To host your own copy, fork the repo, create a Pages project in the Cloudflare dashboard, connect it to your fork, and enter the settings above.
Warning
Ignore the deploy script in the root package.json — it is Docusaurus' built-in gh-pages command and is not how this site ships.
Prerequisites:
- Cloudflare account with Workers AI, KV and Vectorize enabled
- Wrangler CLI (
npx wrangler— no global install needed)
Step 1: Configure Cloudflare Resources
cd worker
# Login to Cloudflare
npx wrangler login
# Create the KV namespaces
npx wrangler kv namespace create CHAT_SESSIONS
npx wrangler kv namespace create MESSAGE_BOARD
npx wrangler kv namespace create CAPSTONE_VOTES
# Create Vectorize index for RAG
npx wrangler vectorize create docs-index --dimensions=768 --metric=cosineStep 2: Update wrangler.toml
Paste the namespace IDs printed by the commands above, and point the route at your own domain.
name = "ai-chat-worker"
main = "src/index.ts"
compatibility_date = "2024-12-01"
compatibility_flags = ["nodejs_compat"]
# WAF rate limiting rules only apply to custom domains, never to *.workers.dev,
# so the workers.dev entrypoint stays off: leaving it on would let any client
# reach /api/chat while bypassing every rate limiting rule on the zone.
workers_dev = false
[[routes]]
pattern = "programming-api.chanmeng.org"
custom_domain = true
[ai]
binding = "AI"
[[kv_namespaces]]
binding = "CHAT_SESSIONS"
id = "<YOUR_CHAT_SESSIONS_KV_ID>"
[[vectorize]]
binding = "VECTORIZE"
index_name = "docs-index"
[[kv_namespaces]]
binding = "MESSAGE_BOARD"
id = "<YOUR_MESSAGE_BOARD_KV_ID>"
[[kv_namespaces]]
binding = "CAPSTONE_VOTES"
id = "<YOUR_CAPSTONE_VOTES_KV_ID>"
[vars]
# Comma-separated allow-list. Any https://<hash>.ai-programming-teaching-project.pages.dev
# preview origin is additionally matched by suffix in src/index.ts.
CORS_ORIGIN = "https://programming.chanmeng.org,https://ai-programming-teaching-project.pages.dev,http://localhost:3000"Step 3: Set Secrets
Six secrets live outside the repo. Set each one once; wrangler deploy does not clobber them.
npx wrangler secret put NOTION_TOKEN # Message board + capstone Notion integration
npx wrangler secret put NOTION_DATABASE_ID # Message board database
npx wrangler secret put NOTION_CAPSTONE_DATABASE_ID # Capstone showcase database
npx wrangler secret put CAPSTONE_ADMIN_TOKEN # Guards POST /api/capstones/admin
npx wrangler secret put SEED_TOKEN # Guards POST /api/seed
npx wrangler secret put SETUP_SECRET # Guards the one-time /setup routesStep 4: Deploy Worker
Important
Always cd worker first. Running wrangler deploy from the repository root makes wrangler infer the Worker name from the directory and publish an empty stub called ai-programming-teaching-project.
cd worker
# Install dependencies
npm install
# Deploy to Cloudflare — this is a manual step, not part of git push
npx wrangler deployStep 5: Seed Vector Database
# Index the docs into Vectorize
npm run seedStep 6: Verify
# Sends 6 real RAG questions to /api/chat and prints latency + citations
node scripts/smoke-test.mjs
# Namespace-scoped retrieval check
node scripts/namespace-test.mjsPoint the frontend at your Worker. The API base URL is hardcoded — there is no environment variable. Update all three:
src/components/ChatWidget/index.js(API_URL)src/pages/message-board.js(API_BASE)src/pages/capstone-showcase.js(API_BASE)
graph LR
subgraph "User"
A[Browser]
end
subgraph "Cloudflare Pages"
B[Static Site CDN]
end
subgraph "Cloudflare Workers"
C[Workers Edge]
D[KV Storage]
E[Vectorize]
F[Workers AI]
end
A -->|HTTPS| B
A -->|API Calls| C
C --> D
C --> E
C --> F
The backend is served from a single origin: https://programming-api.chanmeng.org
| Method | Path | Auth | Description |
|---|---|---|---|
POST |
/api/chat |
— | Streaming SSE chat with RAG over the course docs |
GET |
/api/messages |
— | List message board entries (Notion-backed, 300s KV cache) |
POST |
/api/messages |
— | Post a message to the board |
GET |
/api/capstones |
— | List published capstone projects |
POST |
/api/capstones/vote |
— | Vote for a capstone project |
POST |
/api/capstones/admin |
CAPSTONE_ADMIN_TOKEN |
Publish a capstone project |
POST |
/api/seed |
SEED_TOKEN |
Index documents into Vectorize |
POST |
/api/seed/delete |
SEED_TOKEN |
Remove documents from Vectorize |
POST |
/api/messages/setup |
SETUP_SECRET |
One-time Notion database setup |
POST |
/api/capstones/setup |
SETUP_SECRET |
One-time Notion database setup |
GET |
/api/health, / |
— | Health check |
Example — chat:
curl -N https://programming-api.chanmeng.org/api/chat \
-H 'Content-Type: application/json' \
-d '{"message": "What is prompt engineering?"}'message is required. Optional sessionId continues a conversation, and optional contextNamespace scopes retrieval to one course version. The response is a text/event-stream; the session id comes back in the X-Session-Id header.
Two independent layers guard the API. Both are per-IP.
| Layer | Scope | Limit | Response when exceeded |
|---|---|---|---|
| Cloudflare WAF (edge) | POST /api/chat |
20 requests / 10 seconds | error code: 1015, plain text, no CORS headers |
| Worker | POST /api/chat |
30 requests / hour | 429 + JSON {"error": "..."} |
| Worker | POST /api/messages |
5 requests / hour | 429 + JSON {"error": "..."} |
| Worker | POST /api/capstones/vote |
30 requests / hour | 429 + JSON {"error": "..."} |
The WAF layer blocks at the edge, so the request never reaches the Worker and the browser sees an opaque failure rather than a JSON error. /api/chat charges its hourly quota before invoking the model — a request that times out has still consumed Workers AI, so it still counts.
Note
The Worker's workers.dev subdomain is disabled (workers_dev = false) and returns 404 / error code 1042. WAF rules are never evaluated on *.workers.dev, so leaving it enabled would let anyone bypass the edge rate limit.
CORS_ORIGIN is a comma-separated allow-list of exact origins. In addition, any https://<hash>.ai-programming-teaching-project.pages.dev preview origin is matched by suffix, because Pages mints a new immutable origin on every production build. Responses carry Vary: Origin; a disallowed origin simply gets no Access-Control-Allow-Origin header.
Warning
CORS is a browser control. It stops other websites from reading the API from a page, but it does nothing against curl or scripts — that is what the rate limits are for.
Getting Started (Week 1-2):
- Environment Setup - Configure your development environment
- AI Communication - Learn effective AI interaction
- Markdown Basics - Master documentation formatting
Tool Mastery (Week 3-5):
- Cursor Editor - Advanced code editing with AI
- v0 Platform - Rapid prototyping and development
- Workflow Integration - Streamlined development processes
Project Implementation (Week 6-8):
- Complete Projects - Build real-world applications
- AI Drawing - Creative AI applications
- Chat Systems - Conversational AI development
Note
Each module includes hands-on exercises, practical examples, and assessment opportunities.
We support integration with leading development and AI platforms:
| Category | Platform | Status | Description |
|---|---|---|---|
| AI Chat | Cloudflare Workers AI | ✅ Active | Llama 3.1 8B for intelligent Q&A |
| Vector Search | Cloudflare Vectorize | ✅ Active | RAG-powered document retrieval |
| Session Storage | Cloudflare KV | ✅ Active | Conversation history management |
| Code Editors | Cursor | ✅ Active | AI-assisted code editing tutorials |
| Development | v0 Platform | ✅ Active | Rapid prototyping guides |
| Deployment | Cloudflare Pages | ✅ Active | Frontend hosting & CDN |
| Content DB | Notion | ✅ Active | Message board & capstone showcase |
| Search | Algolia DocSearch | ✅ Active | Full-text documentation search |
| AI Tools | Coze | ✅ Active | Chatbot development tutorials |
| Service | Free Tier | Paid Pricing |
|---|---|---|
| Workers AI | 10,000 Neurons/day | $0.011/1,000 Neurons |
| KV Storage | 100K reads/day, 1GB | $0.50/million reads |
| Vectorize | 30M queried dims/month | $0.01/million dims |
Note
For typical educational usage (~50 daily conversations), the platform operates within free tier limits.
Setup Development Environment:
# Clone repository
git clone https://github.com/ChanMeng666/ai-programming-teaching-project.git
cd ai-programming-teaching-project
# Install dependencies
npm install
# Start development server
npm startCreating New Documentation:
# Create new doc file
touch docs/new-topic/index.mdxAdding Blog Posts:
# Create new blog post
touch blog/YYYY-MM-DD-post-title.mdxContent Structure:
---
title: Your Title
sidebar_position: 1
---
# Your Content
Your educational content here...We welcome contributions! Here's how you can help improve this educational platform:
Content Contributions:
- 📚 Add new tutorials and learning modules
- 🐛 Fix typos and improve existing content
- 💡 Suggest new topics and learning paths
- 🌐 Help with translations and localization
Technical Contributions:
- 🔧 Improve platform functionality
- 🎨 Enhance UI/UX design
- 📱 Optimize mobile experience
- ⚡ Performance improvements
Pull Request Process:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Open Source Benefits:
- ✅ Free for educational use
- ✅ Modification allowed
- ✅ Distribution permitted
- ✅ Commercial use allowed
Chan Meng Creator & Lead Developer UI/UX Designer & Full Stack Developer |
Chan Meng
LinkedIn: chanmeng666
GitHub: ChanMeng666
Email: chanmeng.dev@gmail.com
Website: chanmeng.org
Empowering developers and learners worldwide
⭐ Star us on GitHub • 📖 Read the Documentation • 🐛 Report Issues • 💡 Request Features • 🤝 Contribute
Made with ❤️ by the AI Programming Education team











