🛤️ Learning Paths
"ฉันอยากสร้าง X ต้องอ่านอะไรบ้าง" — 12 ready-to-follow paths that map real-world goals to specific sub-phases in execution order. Click path to expand.
Babylon.js grid + cell placement + level-up visuals + NPC villagers. Pattern used in stronghold-3d.
📋 Show full path detail (8 steps with WHY for each) ▼
Phaser 3 sprites + physics + gravity + coyote time + variable jump. Pattern used in street-fighter-thai, sky-ace.
📋 Show full path detail (5 steps with WHY for each) ▼
Customer queue + patience bar + tips + reputation + upgrade + balance. Pattern used in noodle-shop v1.1.
📋 Show full path detail (7 steps with WHY for each) ▼
NPC behavior trees + dialogue tree + quest progress + inventory. Pattern in sims-lite, realm-of-heroes.
📋 Show full path detail (7 steps with WHY for each) ▼
Form-builder + FastAPI + SQLite/Postgres + REST API + auth. Pattern in medbook, dinebook, pos-grocery.
📋 Show full path detail (13 steps with WHY for each) ▼
OpenAI streaming + RAG + memory + function calling. Pattern in memo-ai, mavis-assistant.
📋 Show full path detail (9 steps with WHY for each) ▼
Web Audio + FFT beat detection + canvas animation + MP4 export. Pattern in karaoke-studio v1.1.
📋 Show full path detail (5 steps with WHY for each) ▼
Canvas-based crop + filter + sticker overlay. Pattern in fitcheck, palette, cutout-studio.
📋 Show full path detail (5 steps with WHY for each) ▼
ship.py + nginx + Let's Encrypt + paramiko. The complete CI/CD pipeline.
📋 Show full path detail (7 steps with WHY for each) ▼
Production-grade REST API with JWT auth + rate limiting + Alembic migrations. Used by codehub-api.
📋 Show full path detail (7 steps with WHY for each) ▼
Minimal viable product using only HTML5 + localStorage + Fetch — no build, no npm, ship today.
📋 Show full path detail (7 steps with WHY for each) ▼
Grid + A* pathfinding + tower targeting + waves. Standard TD loop.
📖 Glossary (37 cross-cutting terms)
Terms that appear across multiple sub-phases. Click to expand definition.
Babylon.js
Phaser 3
WebSocket
Server-Sent Events (SSE)
Promise.race / AbortController
WASM
FFmpeg.wasm
ThinInstance (Babylon)
ArcRotateCamera (Babylon)
Behavior Tree
FSM (Finite State Machine)
ECS (Entity-Component-System)
A* (A-star)
JPS (Jump Point Search)
PWA (Progressive Web App)
CORS preflight
STUN/TURN
JWT (JSON Web Token)
PKCE
ID token vs Access token
HSL (Hue Saturation Lightness)
WCAG contrast ratio
Touch target 44px
prefers-reduced-motion
subtle-crypto
IndexedDB
Stripe webhooks
BabylonGUI vs dat.gui
K6 / Artillery
FTS5 (Full-Text Search)
Ship.py pipeline
Multivariate Gaussian (vision)
FFT beat detection
HSL → hex conversion
OpenAI moderation free < 1M tokens/month
RequestAnimationFrame (rAF)
Promise.all vs Promise.allSettled
🤖 AI Onboarding Kit v3.3
ทำให้ AI agent อื่นใช้ playbook นี้ได้ทันที — copy-paste ready, zero-shot context.
📦 One-Command Bootstrap
Copy any of these into your AI agent to give it full CodeHub knowledge.
🐚 Bash one-liner
🐍 Python loader
🔌 MCP Server (Claude/Cursor/Continue)
🧠 System Prompt Templates
Drop these into your AI agent's system message. Each template includes full CodeHub context + rules.
Full context CodeHub Expert (Full Context)
Full CodeHub Skills v3.2 context. Use when AI agent is building anything on CodeHub.
Specialized CodeHub Game Dev (Babylon + Phaser focus)
Specialized for game dev. Covers engines, patterns, gameplay loops.
Specialized CodeHub Backend (FastAPI + DB)
For API/server work. FastAPI + SQLAlchemy + SQLite/Postgres + Redis.
Specialized CodeHub AI Agent (OpenAI + RAG)
For LLM-powered apps. Streaming, RAG, embeddings, function calling.
Specialized CodeHub Deploy (ship.py + nginx + SSL)
For deployment work. One-command ship.py + nginx + Let's Encrypt.
📋 Master System Message (paste into any LLM)
One canonical system message that works for any AI agent. Click Copy:
🎯 Decision Matrix — "I want to build..."
Click any goal to see recommended sub-phases, path, example app, and time estimate.
I want to build a 2D game (platformer, RPG, shooter, tower defense)
Phaser 3 has built-in Arcade + P2 + Matter physics, scene management, and is the de facto choice for 2D web games. Pattern used in street-fighter-thai, sky-ace, realm-of-heroes.
I want to build a 3D game (city builder, RPG, sim, FPS)
Babylon has PBR + Havok physics + GUI + WebXR in one bundle. thinInstance for 10000 objects. Used in stronghold-3d (city), sims-lite (life sim), fps-cops-vs-robbers (FPS), mars-colony (strategy).
I want a simple 2D game (under 200 entities, particles, animations)
For < 200 entities, vanilla Canvas 2D is faster than Phaser. Zero dependencies. Used in noodle-shop (tycoon).
I want to ship a working MVP today
No build step, no npm, no framework. Single file deploys in 1 command. Perfect for demo + internal tool + quick prototype.
I want to build a SaaS app (CRUD + auth + payments)
FastAPI gives you Pydantic validation + async + auto docs. SQLite for single-tenant / Postgres for multi-tenant. OAuth 2.0 PKCE for SPA. Pattern in medbook, dinebook, pos-grocery.
I want to build an AI chatbot or assistant
gpt-4o-mini is 15x cheaper than gpt-4o for 95% of use cases. Streaming reduces TTFB from 8s to 0.4s. RAG prevents hallucination with top-k=3-5 retrieval. Pattern in memo-ai, mavis-assistant.
I want to build a lyric video / karaoke studio
Web Audio API + FFT beat detection + Canvas 2D lyric overlay + ffmpeg.wasm for MP4 export. Pattern in karaoke-studio v1.1 (11 themes, beat detection, MP4 export).
I want to build an image editor / filter app
Canvas 2D for crop/filter + File API for upload/download + Vision API (7.3) for AI auto-tagging. Pattern in fitcheck, palette, cutout-studio.
I have a working app, need to deploy it to a custom domain
ship.py is the entire deploy pipeline used by all 73 CodeHub apps. One command: edit → curl-verify → paramiko → API upload → cache refresh. Pattern deployed 73+ apps.
📋 Copy-Paste Code Patterns
Production-ready boilerplates used in real CodeHub apps. Each pattern is < 50 lines.
Babylon.js Scene Bootstrap 3.1 35 lines
Full Babylon.js scene with camera, lighting, ground, player
FastAPI + SQLite + Auth 9.2, 9.3, 9.4, 9.9 45 lines
REST API with FastAPI, SQLAlchemy, JWT auth, CRUD
PWA Setup (manifest + service worker) 1.10 30 lines
Make any web app installable + offline-capable
OpenAI Streaming Chat 7.1, 7.6 35 lines
Streaming OpenAI chat with abort control + error handling
Versioned localStorage with Migration 1.4 35 lines
Save/load with auto-migration across versions
🔌 Connect AI Clients (Claude Desktop / Cursor / VSCode)
Add CodeHub Skills as an MCP server in your AI editor. After setup, your AI can call search_subphases(), get_learning_path(), etc. directly.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
```json
{
"mcpServers": {
"codehub": {
"command": "python3",
"args": ["-m", "codehub_mcp_server"]
}
}
}
```Cursor Settings → MCP → Add new server: - Name: codehub - Command: python3 -m codehub_mcp_server
Add to config.json:
```json
{
"mcpServers": [{
"name": "codehub",
"command": "python3",
"args": ["-m", "codehub_mcp_server"]
}]
}
```All 100 Sub-Phases
Click any sub-phase to expand its full pros/cons/gotchas analysis. Use search, tags, or matrix view to navigate.
1.1 🌐 HTML5 Boilerplate Foundations Beginner ⏱ 5 min ▾
Single-file HTML (CSS+JS inline). No build step, no npm, CDN-only deps. Fastest path to a working app.
1.2 🎨 CSS Variables & Design Tokens Foundations Beginner ⏱ 30 min ▾
:root variables (--accent, --bg, --text) for theme switching via data-theme. 1-line theme change.
1.3 🧩 Vanilla JS Module Pattern (IIFE) Foundations Intermediate ⏱ 15 min ▾
IIFE returning public API. Encapsulates private vars without bundler. ESM alternative for legacy browsers.
1.4 💾 localStorage Save/Load + Migration Foundations Intermediate ⏱ 1 hour ▾
JSON.stringify + version field. Fallback chain: v3 → v2 → v1. Foundation for offline-first apps.
1.5 🔊 Web Audio API (Synthesized SFX) Foundations Intermediate ⏱ 2 hours ▾
OscillatorNode + GainNode for procedural SFX without audio files. Tiny code, no CDN, real-time pitch.
1.6 🧵 Canvas 2D Rendering Foundations Intermediate ⏱ 3 hours ▾
Draw primitives + read pixels. ~60fps for ~10000 entities. Foundation for games, charts, image editors.
1.7 📡 Fetch API + JSON + Error Handling Foundations Beginner ⏱ 30 min ▾
Promise-based HTTP. Headers, body, params, 4xx/5xx, CORS, retry. Foundation for all REST APIs.
1.8 📁 File API (Upload/Download/Drag) Foundations Beginner ⏱ 30 min ▾
Read file from input/drop, create Blob, download via invisible <a>. Foundation for editors, importers.
1.9 ⏺ MediaRecorder API Foundations Advanced ⏱ 3 hours ▾
Record MediaStream to webm blob. getUserMedia, getDisplayMedia, canvas.captureStream. Foundation for video editor + screen recorder.
1.10 📱 Service Workers (PWA) Foundations Advanced ⏱ 1 day ▾
Background script proxying network. Offline, installable, push notifications, background sync.
2.1 🎨 Color Tokens (Semantic Palette) Design System Intermediate ⏱ 1 hour ▾
Map visual colors (gray-500, blue-600) to semantic roles (text-primary, surface-raised) so theme switching and white-labeling become data-attribute changes.
2.2 🔤 Typography Scale (Modular) Design System Beginner ⏱ 30 min ▾
Pick a ratio (1.250 / 1.333 / 1.414 / 1.5) and generate a type ramp xs→5xl with consistent visual rhythm — stops decision fatigue and survives redesigns.
2.3 📏 Spacing Tokens (8pt Grid) Design System Beginner ⏱ 15 min ▾
All margin/padding/gap values from a fixed scale (4/8/12/16/24/32/48/64/96) so every gap is divisible by 4 — pixel-snaps cleanly on retina and aligns across teams.
2.4 🧱 Component Library Design System Intermediate ⏱ 4 hours ▾
Build Button, Card, Modal, Input, Toast, Chip, Tabs, Tooltip once with variants (size/state/elevation) and reuse — atoms become the team's shared vocabulary.
2.5 ✨ Animation Library (Easing + Duration Tokens) Design System Intermediate ⏱ 1 hour ▾
Tokenize easing curves (ease-out for enter, ease-in for exit) and durations (100/200/300/500ms) so every motion across the app feels consistent and respects prefers-reduced-motion.
2.6 🎯 Icon System (Emoji + SVG) Design System Beginner ⏱ 15 min ▾
Pick emoji for zero-byte speed or inline SVG for crisp controllable icons — never both in one UI; currentColor in SVG makes them themable with no extra classes.
2.7 📱 Responsive Breakpoints (Mobile-first) Design System Intermediate ⏱ 1 hour ▾
Define min-width breakpoints (640/768/1024/1280) and write styles for mobile, then layer on `min-width` overrides — desktop styles inherit unless contradicted.
2.8 🌙 Dark Mode (prefers-color-scheme + Manual Toggle) Design System Intermediate ⏱ 1 hour ▾
Read system preference via `prefers-color-scheme`, let user override via toggle, persist choice in localStorage — three sources of truth must be reconciled in order: explicit > saved > system.
2.9 💎 Glassmorphism (Frosted Glass Overlays) Design System Beginner ⏱ 20 min ▾
Use `backdrop-filter: blur()` + semi-transparent background + 1px white border for premium frosted-glass panels that hint at content behind — a Material/iOS design staple.
2.10 📐 Layout Primitives (Grid, Flex, Stack, Cluster) Design System Beginner ⏱ 1 hour ▾
Compose layouts from 4 named primitives — Grid (2D), Flex (1D), Stack (vertical w/ consistent gap), Cluster (horizontal wrap) — instead of inventing per-component magic numbers.
3.1 🧊 Babylon.js (Full-Stack 3D Engine) Game Engines Advanced ⏱ 1 week ▾
Full 3D engine — PBR + Havok physics + particles + GUI + WebXR — 1.5MB dep replaces 4 Three addons.
3.2 🥊 Phaser 3 (2D Game Engine) Game Engines Intermediate ⏱ 3 days ▾
Comprehensive 2D engine — sprites, Arcade/P2/Matter physics, scene lifecycle, animations, tilemaps, sound — 800KB.
3.3 📦 Vanilla Canvas 2D (Zero-Dep 2D) Game Engines Intermediate ⏱ 2 days ▾
Pure Canvas 2D API + manual game loop. 0KB dep. Best for <200 entities with simple physics (tycoon, particles, UI tools).
3.4 🌐 Three.js (Lightweight 3D Renderer) Game Engines Intermediate ⏱ 3 days ▾
Smallest mainstream 3D renderer (~150KB) — declarative scene graph + WebGL/WebGPU backends — focused on rendering, NOT game features.
3.5 🕹️ Kaboom.js / Kaplay (Arcade 2D) Game Engines Beginner ⏱ 4 hours ▾
~80KB component-based arcade 2D — add([rect(), pos(), body()]) chain syntax — game-jam-grade simplicity.
3.6 🖼️ PixiJS (Fastest 2D WebGL Renderer) Game Engines Intermediate ⏱ 2 days ▾
WebGL-accelerated 2D renderer — fastest sprite batcher in JS — filter library + mesh/particle — render-only (no physics).
3.7 🎆 WebGL / WebGL2 (Custom GLSL Shaders) Game Engines Advanced ⏱ 2 weeks ▾
Raw GPU API — hand-write GLSL vertex/fragment shaders — max performance for particle storms, fluid sim, post-FX — no engine.
3.8 ⚡ WebGPU (Next-Gen GPU API) Game Engines Advanced ⏱ 3 weeks ▾
WebGL successor — compute shaders on web, render pipelines, multi-thread via async — 2024 stable in Chrome/Edge, partial in Safari/Firefox.
3.9 🌐 WebSocket Multiplayer (Realtime 2-Way) Game Engines Advanced ⏱ 3 days ▾
Bidirectional TCP-over-HTTP socket — server required — low-latency realtime state sync for multiplayer games, collab editors, chat.
3.10 🔄 Game State Machine (FSM) Game Engines Intermediate ⏱ 2 hours ▾
Finite State Machine — entity has 1 state at a time (IDLE/WALK/ATTACK) — guards on transitions prevent invalid combos (e.g., JUMP→JUMP without landing).
4.1 ⏱️ Game Loop (60fps + Delta Time) Game Patterns Intermediate ⏱ 2 hours ▾
Update with dt seconds (NOT per-frame constants). Decouple sim Hz from render Hz via fixed-step accumulator.
4.2 🧩 Entity-Component System (ECS) Game Patterns Advanced ⏱ 3 days ▾
Entity (just an ID) + Component (pure data) + System (pure logic). Compose behaviors by mixing components.
4.3 🗺️ Pathfinding A* Game Patterns Intermediate ⏱ 1 day ▾
Shortest path on grid via open/closed sets + admissible heuristic. Optimal when heuristic never overestimates.
4.4 🌳 Behavior Trees (NPC AI) Game Patterns Advanced ⏱ 1 week ▾
Hierarchical nodes: Selector (OR), Sequence (AND), Decorator. Designer-editable visual tree for NPC decisions.
4.5 🎲 Procedural Generation Game Patterns Intermediate ⏱ 3 days ▾
Random content via seeded RNG. Same seed = identical output. Combine algorithms for natural-feeling variety.
4.6 🎒 Inventory System (Slot/Stack) Game Patterns Intermediate ⏱ 4 hours ▾
Slot-based array with maxStack per item, stack-first then empty-slot fill, Object.freeze templates.
4.7 💬 Dialogue System (Branching) Game Patterns Intermediate ⏱ 3 hours ▾
JSON tree of nodes, conditions = function refs evaluated lazily, side effects on choice.
4.8 📜 Quest System Game Patterns Intermediate ⏱ 2 hours ▾
Mission = objective + progress + reward. ONE central trigger function mutates all quest state.
4.9 🏆 Achievement System Game Patterns Beginner ⏱ 1 hour ▾
Discrete accomplishments with idempotent unlock check. Categories for UI grouping. Event-triggered evaluation.
4.10 🔄 Save Migration Game Patterns Intermediate ⏱ 1 hour ▾
Multi-version backward-compat with version field. Forward-only migrations. Default values for missing fields.
5.1 📋 Kanban Board Business Apps Intermediate ⏱ 4 hours ▾
Lists of cards with drag-drop, multi-board, WIP limits, filters. FlowBoard คือ reference implementation ใน CodeHub.
5.2 📅 Calendar (ICS Export) Business Apps Intermediate ⏱ 1 day ▾
Month/week view + iCal (.ics) export + RFC 5545 recurrence. Use UTC storage + local display ตามหลัก iCalendar.
5.3 🤝 CRM (Pipeline) Business Apps Intermediate ⏱ 2 days ▾
Contacts + deals + activities + stages + weighted pipeline value. People-crm บน CodeHub ใช้พื้นฐานนี้
5.4 📆 Booking System Business Apps Intermediate ⏱ 3 hours ▾
Slot picker + confirmation + 24h reminder + no-show handling. CodeHub มี medbook/dinebook/cospace/fitbook เป็น reference 4 ตัว
5.5 💳 POS (Point of Sale) Business Apps Intermediate ⏱ 6 hours ▾
Cart + barcode scan + tax/VAT per region + receipt print/PDF + cash/card prompt. Noodle-shop + pos-grocery เป็น reference บน CodeHub
5.6 📦 Inventory (SKU + Stock Alert) Business Apps Intermediate ⏱ 3 hours ▾
SKU + quantity + reorder point + low-stock alert + multi-location. Pos-grocery + noodle-shop ใช้พื้นฐานนี้ในการจัดการ stock
5.7 📝 Form Builder Business Apps Intermediate ⏱ 3 hours ▾
User-defined schema (fields array) → render form + validate + save JSON. Schema-as-data = no-code สำหรับ non-tech user
5.8 📊 Dashboard Charts (ECharts) Business Apps Beginner ⏱ 30 min ▾
ECharts interactive (line/bar/pie/scatter/heatmap) + responsive + a11y palette. Ai-data-analyzer ใช้พื้นฐานนี้
5.9 🧾 Invoice (PDF) Business Apps Intermediate ⏱ 2 hours ▾
jsPDF client-side (zero install) + Thai font embed (Sarabun) + line items + tax + auto-numbering. Pos-grocery ใช้ receipt pattern เดียวกัน
5.10 📈 Analytics Business Apps Intermediate ⏱ 2 hours ▾
Capture events + funnels + retention + cohort + anonymize IP + batched send. Ai-data-analyzer ใช้ self-hosted analytics เป็น layer หนึ่ง
6.1 🎵 Audio Editor (Waveform) Media Apps Intermediate ⏱ 4 hours ▾
Visual waveform + region trim + fade in/out. WaveSurfer.js v7 ships regions + MP3 decode + 50KB footprint.
6.2 ▶️ Custom Video Player Media Apps Intermediate ⏱ 3 hours ▾
HTML5 <video> + custom controls + playlist + speed + WebVTT subs + Picture-in-Picture. ~30KB zero-dep.
6.3 🎥 Video Editor (Timeline) Media Apps Advanced ⏱ 2 weeks ▾
Multi-track timeline + clip trim/ripple + transitions + WebCodecs decode + ffmpeg.wasm export. Reference: sj88-video-editor-pro.
6.4 🖼️ Image Editor (Crop/Filter) Media Apps Intermediate ⏱ 4 hours ▾
Canvas 2D + WebGL filters (brightness/contrast/blur) + sticker overlay + text. Reference: fitcheck, cutout-studio, palette.
6.5 📄 PDF Generation Media Apps Intermediate ⏱ 1 day ▾
jsPDF client-side (zero install) vs WeasyPrint/Puppeteer server-side (HTML-to-PDF). Reference: pos-grocery receipt, nesspaper-style.
6.6 📝 Lyric Video Maker Media Apps Intermediate ⏱ 3 hours ▾
Karaoke-style timing editor: LRC import + click-to-set timing + animated highlight + canvas overlay + WebM export. Reference: karaoke-studio (6+ theme variants).
6.7 🎤 Karaoke Studio (Full) Media Apps Advanced ⏱ 1 week ▾
End-to-end: FFT beat detection (1024-pt) + 11 visual themes + per-word timing + MP4 export via ffmpeg.wasm. Reference: karaoke-studio.
6.8 💬 Subtitle Editor (VTT/SRT) Media Apps Beginner ⏱ 2 hours ▾
VTT/SRT editor + waveform sync + auto-time-stretch + bilingual. WebVTT for web, SRT for video file. Reference: sj88-video-editor-pro caption panel.
6.9 😂 Meme Generator Media Apps Beginner ⏱ 1 hour ▾
Template picker + top/bottom Impact text + stroke + center-wrap + share. <50KB, no server. Reference: sj88cute-frame-extractor style.
6.10 🖥️ Screen Recorder Media Apps Intermediate ⏱ 2 hours ▾
getDisplayMedia + MediaRecorder (WebM VP9/Opus) + mic mixing via Web Audio. Reference: sj88-video-editor-pro recorder, sj88cute-frame-extractor capture flow.
7.1 🧠 OpenAI API (Chat/Completion/Streaming) AI Skills Intermediate ⏱ 3 hours ▾
GPT-4o / GPT-4o-mini via fetch + SSE stream. The default brain for any CodeHub AI app.
7.2 🗣️ Web Speech API (TTS/STT) AI Skills Beginner ⏱ 2 hours ▾
Browser-native TTS (`speechSynthesis`) + STT (`SpeechRecognition`). Zero API cost, gesture-required, varies by browser.
7.3 👁️ Vision API (gpt-4o Vision / Gemini) AI Skills Intermediate ⏱ 3 hours ▾
Image understanding via multimodal LLMs. gpt-4o sees 1024+ px images, returns structured descriptions, OCR, or classification.
7.4 🧮 Embeddings + Vector Search AI Skills Intermediate ⏱ 5 hours ▾
Text → 1536-dim float vectors (text-embedding-3-small). Cosine similarity finds semantically similar docs, not just keyword matches.
7.5 🔍 TF-IDF Search (Bilingual TH+EN, no API) AI Skills Intermediate ⏱ 5 hours ▾
Tokenize with regex (Latin word OR Thai unicode range), compute TF-IDF vectors, cosine-rank. Zero cost, instant, fully offline.
7.6 📡 Streaming Responses (SSE / ReadableStream) AI Skills Intermediate ⏱ 4 hours ▾
Server-Sent Events for token-by-token AI output. TTFB drops from 8s to 0.4s. Cancellable via AbortController.
7.7 🛠️ Function Calling (OpenAI / Anthropic tools API) AI Skills Advanced ⏱ 1 day ▾
AI returns a JSON tool call → your code executes → result fed back. Turns chat into action (book, query, send, delete).
7.8 📚 RAG (Retrieval Augmented Generation) AI Skills Advanced ⏱ 3 days ▾
Embed query → search top-k similar chunks → stuff in LLM prompt. Grounds AI in YOUR data, eliminates hallucination, cites sources.
7.9 📝 Prompt Engineering (System, Few-shot, CoT) AI Skills Beginner ⏱ 1 day ▾
The art of writing prompts that consistently get high-quality outputs. 30-50% quality lift on same model, free, no code.
7.10 🛡️ Safety Filters (Moderation + Jailbreak Detection) AI Skills Intermediate ⏱ 3 hours ▾
OpenAI Moderation API (free <1M tokens/mo) + pattern-based jailbreak detection. Required for any public AI app.
8.1 🚀 ship.py (1-Click Deploy Pipeline) Infrastructure Intermediate ⏱ 2 hours ▾
One-command deploy. edit → curl-verify → paramiko SFTP → API upload → cache refresh = sandbox-to-prod in 30s for any single-file app.
8.2 🌐 nginx Configuration (vhost + proxy + cache + CORS) Infrastructure Intermediate ⏱ 1 day ▾
Virtual host + reverse proxy + gzip + rate limit + try_files SPA routing. Serves every codehub.sj88ai.com app + proxies /api to FastAPI on 127.0.0.1:8765.
8.3 🔒 Let's Encrypt SSL (certbot + auto-renew) Infrastructure Beginner ⏱ 30 min ▾
Free DV certs via certbot. Auto-renew via cron. 90-day expiry. Currently secures codehub.sj88ai.com + subdomains.
8.4 🔌 Paramiko (Python SSH + SFTP) Infrastructure Intermediate ⏱ 2 hours ▾
Pure-Python SSH2 + SFTP client. Powers ship.py (8.1) deploy automation from sandbox to VPS without ssh CLI in PATH.
8.5 ⚙️ GitHub Actions (CI/CD + matrix + secrets) Infrastructure Intermediate ⏱ 1 day ▾
CI/CD — test on push + auto deploy. Free for public repos. matrix strategy, cache, secrets, reusable workflows. For OS/multi-dev CodeHub projects.
8.6 ⚙️ systemd (Service Manager + Auto-Restart) Infrastructure Intermediate ⏱ 2 hours ▾
Long-running services — uvicorn/codehub-api with Restart=always, EnvironmentFile, journalctl logging, Type=notify for readiness signal.
8.7 📊 Monitoring (Uptime + /api/health + Alerts) Infrastructure Intermediate ⏱ 4 hours ▾
Uptime monitoring via /api/health endpoint, log scraping via journald→Loki, alerts to Telegram. Catches issues before users do.
8.8 💾 Backup (3-2-1 rule, 16TB XFS, rsync) Infrastructure Beginner ⏱ 1 hour ▾
rsync + 16TB XFS at /mnt/16tb/codehub + 3-2-1 rule (3 copies, 2 media types, 1 offsite). Nightly cron, monthly restore-test.
8.9 🐳 Docker (Dockerfile + Compose + Multi-Env) Infrastructure Intermediate ⏱ 1 day ▾
Dockerfile + docker-compose for reproducible multi-service env. NOTE: NOT currently used at CodeHub — all apps are static, served directly by nginx. Listed for future use.
8.10 ☁️ CDN (jsDelivr / unpkg / Cloudflare for static assets) Infrastructure Beginner ⏱ 30 min ▾
Free CDNs for static JS libraries + GitHub assets. jsDelivr + unpkg for npm packages (karaoke-studio uses ffmpeg.wasm via unpkg). Cloudflare for full-site proxy.
9.1 🔌 REST API Design Data & APIs Beginner ⏱ 1 day ▾
Resource-oriented URLs + /api/v1/ + OpenAPI 3 + correct 4xx/5xx status codes.
9.2 ⚡ FastAPI Backend Data & APIs Intermediate ⏱ 2 days ▾
Async Python + Pydantic validation + auto /docs Swagger + Depends() DI. The batteries-included default for new Python APIs.
9.3 🗄️ SQLAlchemy ORM Data & APIs Intermediate ⏱ 2 days ▾
Python ORM with Alembic migrations, 2.0 typed Mapped[] syntax, async + sync engines.
9.4 💾 SQLite Data & APIs Beginner ⏱ 1 hour ▾
File-based SQL DB. Zero install, ACID, FTS5, WAL mode, perfect for dev/cache/edge.
9.5 🐘 PostgreSQL Data & APIs Advanced ⏱ 3 days ▾
Production-grade RDBMS: MVCC, JSONB, FTS, partitioning, replication, 30+ years of battle-testing.
9.6 ⚡ Redis Cache & Pub/Sub Data & APIs Intermediate ⏱ 4 hours ▾
In-memory data store: cache, pub/sub, rate limiting, session, queue, leaderboard, geo. Sub-ms latency.
9.7 🔄 WebSocket Data & APIs Advanced ⏱ 1 day ▾
Bidirectional persistent connection for realtime: chat, live cursor, multiplayer, push notifications.
9.8 📡 Server-Sent Events (SSE) Data & APIs Intermediate ⏱ 2 hours ▾
One-way server→client HTTP stream for live feeds, progress bars, notifications. Simpler than WebSocket.
9.9 🔑 OAuth 2.0 & Social Login Data & APIs Advanced ⏱ 3 days ▾
Delegate auth to Google/GitHub/Facebook. PKCE for SPA, Authorization Code for backend, refresh tokens for long sessions.
9.10 🚦 Rate Limiting & Abuse Prevention Data & APIs Intermediate ⏱ 1 hour ▾
Token bucket per IP/user/endpoint. Prevent abuse, brute force, scraper overload, runaway clients.
10.1 🏪 Tycoon Game Domain Recipes Intermediate ⏱ 1 week ▾
Customer state machine (arrive→queue→order→wait→eat→pay) + patience decay + tip multiplier + reputation + upgrade economy.
10.2 🏰 City Builder Domain Recipes Advanced ⏱ 2 weeks ▾
Grid 14×10 + buildings + level + visual scale 1.15× + adjacency bonus + resource chain (wood→plank→house) + zoning.
10.3 ⚔️ RPG Pattern Domain Recipes Advanced ⏱ 1 week ▾
NPC needs (hunger/energy/social/fun) + relationship 0-100 stages + dialogue tree + quest chain + idle behavior tree.
10.4 🗼 Tower Defense Domain Recipes Intermediate ⏱ 1 week ▾
Path + waves + towers + A* pathfinding + range + DPS + targeting priority (first/last/closest/strongest) + economy.
10.5 🦘 Platformer Domain Recipes Intermediate ⏱ 1 week ▾
Gravity + variable jump height + coyote time + jump buffering + tile map collision + one-way platforms + moving platforms.
10.6 🥊 Fighting Game Domain Recipes Advanced ⏱ 3 weeks ▾
State machine (idle/walk/crouch/attack/hurt/block) + hitbox + frame data + cancel windows + block advantage + throw tech.
10.7 🍜 Restaurant Sim Domain Recipes Intermediate ⏱ 1 week ▾
Queue + 7 menu items + ingredient stock + cook time + tip multiplier + reputation + daily grade S/A/B/C + chef upgrade.
10.8 🏥 Medical Booking Domain Recipes Intermediate ⏱ 3 days ▾
Doctor rotation + 12 สาขา + 10 แพทย์ + emergency slot 1669 + recurring appointment + no-show policy + queue priority.
10.9 🛒 E-Commerce Domain Recipes Intermediate ⏱ 1 week ▾
Product catalog + cart + checkout + Stripe payment + order + inventory race + shipping + 60-item POS (barcode scan) + tax/VAT.
10.10 👥 Social Network Domain Recipes Advanced ⏱ 2 weeks ▾
Feed (paginated ts desc) + likes + comments + followers graph + post visibility + mention/hashtag + chat memory + community board.
Per-area pages: /skill/foundations/, /skill/game-engines/, etc. — full code snippets + CodeHub project examples.
🤖 AI-Readable JSON
All 100 sub-phases in JSON format — fetch from /api/skill (schema v3.0).
{
"1": {
"id": 1,
"name": "Foundations",
"icon": "📦",
"slug": "foundations",
"tagline": "Stack backbone — ต้องมีก่อนเริ่่มทุกโปรเชค",
"sub_count": 10
},
"2": {
"id": 2,
"name": "Design System",
"icon": "🎨",
"slug": "design-system",
"tagline": "Visual language for consistent UI",
"sub_count": 10
},
"3": {
"id": 3,
"name": "Game Engines",
"icon": "🎮",
"slug": "game-engines",
"tagline": "Pick the right engine, save 50%+ time",
"sub_count": 10
},
"4": {
"id": 4,
"name": "Game Patterns",
"icon": "🏛️",
"slug": "game-patterns",
"tagline": "Patterns that make games addictive",
"sub_count": 10
},
"5": {
"id": 5,
"name": "Business Apps",
"icon": "💼",
"slug": "business-apps",
"tagline": "Productivity + commerce",
"sub_count": 10
},
"6": {
"id": 6,
"name": "Media Apps",
"icon": "🎬",
"slug": "media-apps",
"tagline": "Audio + video + image",
"sub_count": 10
},
"7": {
"id": 7,
"name": "AI Skills",
"icon": "🤖",
"slug": "ai-skills",
"tagline": "OpenAI + embeddings + RAG",
"sub_count": 10
},
"8": {
"id": 8,
"name": "Infrastructure",
"icon": "🏗️",
"slug": "infrastructure",
"tagline": "Deploy + ops",
"sub_count": 10
},
"9": {
"id": 9,
"name": "Data & APIs",
"icon": "📊",
"slug": "data-apis",
"tagline": "Backend patterns",
"sub_count": 10
},
"10": {
"id": 10,
"name": "Domain Recipes",
"icon": "🎯",
"slug": "domain-recipes",
"tagline": "Copy patterns — reuse immediately",
"sub_count": 10
}
}