公开 API

实时成长数据流。

GET /api/status
curl https://shawnos.ai/api/status

快速开始

cURL

bash
curl https://shawnos.ai/api/status

JavaScript (fetch)

javascript
fetch('https://shawnos.ai/api/status')
  .then(res => res.json())
  .then(data => {
    console.log(`Level ${data.level}: ${data.title}`)
    console.log(`XP: ${data.xp_total} / ${data.xp_next_level}`)
  })

Python

python
import requests

response = requests.get('https://shawnos.ai/api/status')
data = response.json()

print(f"Level {data['level']}: {data['title']}")
print(f"XP: {data['xp_total']} / {data['xp_next_level']}")

响应数据结构

json
{
  "name": "Operator",
  "title": "Prompt Apprentice",
  "level": 9,
  "xp_total": 1882,
  "xp_next_level": 2000,
  "class": "Polymath",
  "avatar_tier": 1,
  "milestones": [
    {
      "id": "first_100xp",
      "title": "Spark Plug",
      "description": "Earned 100 XP",
      "unlocked_at": "2026-02-15T05:51:44Z"
    }
  ],
  "updated_at": "2026-02-15T05:51:44Z",
  "meta": {
    "api_version": "1.0",
    "docs": "https://shawnos.ai/api"
  }
}
namestring

Character display name

titlestring

Current RPG title (e.g., 'Terminal Initiate', 'Repo Architect')

levelnumber

Current level (1-based)

xp_totalnumber

Total accumulated XP

xp_next_levelnumber

XP required to reach the next level

classstring

Primary RPG class: Builder, Scribe, Strategist, Alchemist, or Polymath

avatar_tiernumber

Avatar visual tier (1-6)

milestonesarray

List of unlocked milestone achievements

updated_atstring

ISO-8601 timestamp of last profile update

metaobject

API metadata including version and documentation URL

使用场景

📊

嵌入实时数据

在你的作品集上展示实时 XP 和等级

🤖

Discord 机器人

构建一个追踪成长进度的机器人

🐦

Twitter 自动化

达到里程碑时自动发推

🔬

研究架构

了解一个实时 RPG 系统是怎么构建的

这个系统怎么运作

The RPG system tracks daily output across multiple dimensions: commits, content, GTM deliverables, and more. Each activity type contributes to XP based on weighted scoring.

Data flows from gitignored Python scripts → public JSON → API endpoint. The progression engine scans my work, calculates XP, checks for level-ups, and unlocks milestones based on cumulative stats.

The API endpoint reads from data/progression/profile.json (a public file) and serves it with CORS headers and CDN caching.

Type definitions are available in the rpg.ts file. The core scoring algorithms remain proprietary.

自己构建

Want to build a similar system? Here's the architecture:

1. 数据管道

扫描你的工作来源并计算分数

2. 持久化层

将数据写入公开的 JSON 文件

3. API 接口

通过支持 CORS 和缓存的公开 API 暴露

4. 前端展示

构建渲染数据的 UI 组件

工具栈

  • Frontend: Next.js, React, Tailwind CSS
  • Backend: Python (progression engine), TypeScript (API routes)
  • Deployment: Vercel (auto-deploy from GitHub)
  • Development: Cursor IDE, Claude Code, MCP servers
  • Monorepo: Turborepo with shared packages

I built this using Claude Code and Cursor IDE. The full repo is on GitHub.

关于 ShawnOS

This API is part of ShawnOS — an AI-powered operating system for GTM engineering and content operations.

Built with MCP servers connecting Cursor IDE, Claude Code, and 15+ automation tools, the system gamifies vibe coding and live building in public.

Every commit, post, and deliverable feeds the progression engine. The RPG system provides real-time feedback and unlocks visual rewards as the work compounds.

ShawnOS.ai|theGTMOS.ai|theContentOS.ai
built with Next.js · Tailwind · Claude · Remotion