A friendly guide to CodeHub โ what it is, how to browse it, how to use the API, and how to compare versions. This page is open. No password needed.
CodeHub is a website that stores code projects โ every version, with screenshots and notes. Think of it like a museum where every project you ever made is preserved, with a card explaining what changed between versions.
v1.0, v1.1, โฆ) with date, screenshots, code changesJust browse the site. No login, no token.
Query the public API or the MCP server at /api/mcp.
Get the secret token separately, then upload new versions.
The homepage lists every project. Click any card to dive in.
| Page | What you see |
|---|---|
/ | Homepage with hero + project grid + stats |
/project/{slug}/ | Single project โ version list, code files, screenshots, AI notes (TOC + sidebar) |
/project/{slug}/timeline/ | Visual timeline of versions (chronological, with screenshots) |
/stats | Numbers: project count, version count, file count, line count by category |
/search/?q={query} | Live full-text search across titles, code, AI responses |
/diff/?slug=...&from=v1.0&to=v1.2 | Compare any two versions side-by-side |
/roadmap | Where the platform came from (the 15 build phases) |
/ai-instructions | Aggregated AI-readable docs across all projects |
Each version has its own code/ folder. Open any file directly in browser:
https://codehub.sj88ai.com/api/project/{slug}/{version}/code/{filename}
List what files exist:
https://codehub.sj88ai.com/api/project/{slug}/{version}/code/
The search engine is real SQLite FTS5 โ looks through titles, AI commands, AI responses, change lists, and code.
curl 'https://codehub.sj88ai.com/api/search?q=heatmap' | python3 -m json.tool
?q=heatmap filter matches both terms<mark> tags?slug= and ?version= if you want to narrow downSome projects have multiple side-by-side live URLs so you can compare how a project evolved. Look at the example: AI Data Analyzer.
| URL | What it does |
|---|---|
http://178.83.121.75:50900/ | Landing โ choose a version |
http://178.83.121.75:50900/V1/ | v1.0 โ earliest / simplest |
http://178.83.121.75:50900/V2/ | v1.1 โ middle iteration |
http://178.83.121.75:50900/V3/ | v1.2 โ latest / most features |
/project/{slug}/timeline/) which shows them stacked verticallyEverything below is free to call. Use it for scripts, integrations, or to query codehub from your own tools.
| Method | Path | Returns |
|---|---|---|
| GET | /api/health | Liveness + counts |
| GET | /api/stats | Global stats (projects, versions, files, lines, categories) |
| GET | /api/projects | List projects โ optional ?category= |
| GET | /api/project/{slug} | Single project + all versions |
| GET | /api/project/{slug}/{version} | Single version metadata |
| GET | /api/project/{slug}/{version}/code/ | List code files in this version |
| GET | /api/project/{slug}/{version}/code/{path} | Raw code file (renders in browser, mime auto-detected) |
| GET | /api/project/{slug}/timeline | Chronological events + screenshots |
| GET | /api/diff/{slug}/{from}/{to} | Diff metadata + code file changes between versions |
| GET | /api/search?q=... | FTS5 search with snippets + highlights |
| GET | /api/categories | Categories with project counts |
| GET | /api/tags | All tags + usage counts |
| GET | /api/ai-instructions | Aggregated markdown across all projects |
| GET | /api/ai-instructions/{slug} | Per-project markdown |
| GET | /api/recent-activity?limit=N | Recent versions (sorted by date) |
All return JSON. All are paginated where it makes sense. /docs has interactive Swagger UI.
# 1) List projects
curl https://codehub.sj88ai.com/api/projects | python3 -m json.tool | head -30
# 2) Get a specific project (with all versions)
curl https://codehub.sj88ai.com/api/project/ai-data-analyzer | python3 -m json.tool | head -30
# 3) Read a file from a version
curl -sL https://codehub.sj88ai.com/api/project/ai-data-analyzer/v1.2/code/index.html | head -10
If you're an AI agent, the cleanest way to use CodeHub is through MCP โ a JSON-RPC 2.0 endpoint at /api/mcp.
| Tool | Purpose |
|---|---|
list_projects | List everything |
get_project | Full project + versions |
get_version | Single version meta |
list_code_files | Files in a version |
get_code_file | Raw file content |
search | FTS5 search with snippets |
get_stats / list_tags / list_categories | Aggregates |
get_ai_instructions | Aggregated markdown |
get_timeline | Version history |
sync_database ADMIN | Force SQL re-sync |
upload_version ADMIN | Upload (use POST instead) |
# 1. Initialize
curl -s -X POST https://codehub.sj88ai.com/api/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"you","version":"1.0"}}}'
# 2. List available tools
curl -s -X POST https://codehub.sj88ai.com/api/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
# 3. Call a tool
curl -s -X POST https://codehub.sj88ai.com/api/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_projects","arguments":{}}}'
For protocol details, see modelcontextprotocol.io.
Send it as a header:
X-Admin-Token: YOUR_TOKEN_HERE
Or login to get a 7-day session cookie:
# Login (saves cookie to /tmp/cookies)
curl -c /tmp/cookies -X POST "https://codehub.sj88ai.com/api/login?password=YOUR_TOKEN"
# Upload a new version (multipart form)
curl -b /tmp/cookies -X POST https://codehub.sj88ai.com/api/admin/upload \
-F "slug=my-project" \
-F "version=v1.0" \
-F "title=My Project v1.0" \
-F "user_cmd=What I asked" \
-F "ai_response=What AI did" \
-F 'what_changed=["Change 1","Change 2"]' \
-F 'code_files_json={"index.html":"<h1>Hello</h1>"}' \
-F "live_url=https://my.example.com/"
GET /api/admin/backups | List backups |
|---|---|
POST /api/admin/backups/run | Backup now |
POST /api/admin/backups/restore?name=... | Restore from backup |
POST /api/admin/rebuild | Re-run static-site generator |
POST /api/cache/refresh | Force SQL re-sync from filesystem |
POST /api/search/rebuild | Re-index FTS5 search |
/api/* endpoints โ no token needed/api/mcp โ no token neededOpen guide ยท No password ยท No tracking ยท Just code โฟ