๐Ÿ“– CODEHANDBOOK ยท v1.0 ยท public access

The CodeHub Handbook

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.

๐Ÿ“‹ Contents

  1. What is CodeHub?
  2. Browsing projects
  3. Searching across everything
  4. Comparing versions (V1 / V2 / V3)
  5. Read-only API
  6. Talking via MCP
  7. Useful pages
  8. For admins (uploads)

1. What is CodeHub?

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.

What's in each project?

Two ways to use it

๐Ÿ‘ค As a visitor

Just browse the site. No login, no token.

๐Ÿค– As an AI agent

Query the public API or the MCP server at /api/mcp.

๐Ÿ”ง As an admin

Get the secret token separately, then upload new versions.

2. Browsing projects

The homepage lists every project. Click any card to dive in.

PageWhat 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)
/statsNumbers: 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.2Compare any two versions side-by-side
/roadmapWhere the platform came from (the 15 build phases)
/ai-instructionsAggregated AI-readable docs across all projects

Opening a project's code

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.

Try it from your terminal

curl 'https://codehub.sj88ai.com/api/search?q=heatmap' | python3 -m json.tool

Tips

4. Comparing versions (V1 / V2 / V3)

Some projects have multiple side-by-side live URLs so you can compare how a project evolved. Look at the example: AI Data Analyzer.

URLWhat 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

How to compare 3 versions

  1. Open all three URLs in three browser tabs
  2. Alt-Tab between them to see the evolution
  3. Or โ€” use the in-page Timeline view (/project/{slug}/timeline/) which shows them stacked vertically
๐Ÿ’ก Not every project has multi-version URLs. Those are usually apps that were deployed to a live VPS at each version. Code-only libraries don't.

5. Read-only API (no token needed)

Everything below is free to call. Use it for scripts, integrations, or to query codehub from your own tools.

Project endpoints

MethodPathReturns
GET/api/healthLiveness + counts
GET/api/statsGlobal stats (projects, versions, files, lines, categories)
GET/api/projectsList 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}/timelineChronological 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/categoriesCategories with project counts
GET/api/tagsAll tags + usage counts
GET/api/ai-instructionsAggregated markdown across all projects
GET/api/ai-instructions/{slug}Per-project markdown
GET/api/recent-activity?limit=NRecent versions (sorted by date)

All return JSON. All are paginated where it makes sense. /docs has interactive Swagger UI.

Quick copy โ€” list + read

# 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

6. Talking via MCP (Model Context Protocol)

If you're an AI agent, the cleanest way to use CodeHub is through MCP โ€” a JSON-RPC 2.0 endpoint at /api/mcp.

13 tools available

ToolPurpose
list_projectsList everything
get_projectFull project + versions
get_versionSingle version meta
list_code_filesFiles in a version
get_code_fileRaw file content
searchFTS5 search with snippets
get_stats / list_tags / list_categoriesAggregates
get_ai_instructionsAggregated markdown
get_timelineVersion history
sync_database ADMINForce SQL re-sync
upload_version ADMINUpload (use POST instead)

Example conversation with any MCP-aware AI

Initialize + tools/list + tool call (copyable)

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

7. Useful pages

๐Ÿ  Homepage
/
Project grid + stats + filter by category
๐Ÿ“– AI-readable docs
/ai-instructions
Aggregated user_cmd + ai_response for all projects
๐Ÿ“Š Stats
/stats
Dashboard with project/line/file counts by category
๐Ÿ” Search
/search/?q=...
Live full-text with highlights
๐Ÿ”€ Diff viewer
/diff/?slug=...&from=...&to=...
Side-by-side version comparison
๐Ÿ—บ Roadmap
/roadmap
15 build phases this platform went through
โš™๏ธ Install
/install/
Self-host CodeHub on your VPS
๐Ÿ“ค Admin form
/admin
Upload new versions (admin only)
๐Ÿ“‹ Swagger UI
/docs
Interactive API reference

8. For admins (uploads)

๐Ÿ” Admin token is shared separately. It is not in this handbook (by design โ€” this handbook is public). If you need to upload / edit / delete versions, ask the platform owner for the secret.

If you already have the admin token

Send it as a header:

X-Admin-Token: YOUR_TOKEN_HERE

Or login to get a 7-day session cookie:

Login + upload (multipart)

# 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/"

Other admin endpoints

GET /api/admin/backupsList backups
POST /api/admin/backups/runBackup now
POST /api/admin/backups/restore?name=...Restore from backup
POST /api/admin/rebuildRe-run static-site generator
POST /api/cache/refreshForce SQL re-sync from filesystem
POST /api/search/rebuildRe-index FTS5 search

๐ŸŽฏ TL;DR

Open guide ยท No password ยท No tracking ยท Just code โœฟ