Folionaut
AI & MCP enhanced portfolio content management system
Documentation • API Reference • Quick Start
______________________________________________________________________
概述
用于投资组合网站的TypeScript/Express后端,具有灵活的CMS、人工智能聊天工具和模型上下文协议(MCP)服务器集成。
主要特点
- 灵活的CMS -具有版本控制、软删除和完整审计跟踪的自由格式JSON内容
- AI聊天 -使用PII混淆和工具进行内容查询的限时聊天
- MCP服务器 -通过模型上下文协议将内容工具暴露给AI助手
- 坚韧的 -LLM断路器,令牌桶速率限制,优雅降级
- 可观察对象 -OpenTetry跟踪、Prometheus指标、结构化日志记录
技术栈
Bun
Express
TypeScript
Turso
Drizzle
Redis
Zod
OTel
Prometheus
快速开始
# Install
bun install
# Configure
cp .env.example .env
# Edit .env with your Turso and API keys
# Database
bun run db:migrate
# Run
bun run dev看 配置指南 对于环境变量。
API
公共
| 端点 | 描述 |
|---|---|
GET /api/v1/content | 列出已发布内容 |
GET /api/v1/content/:type/:slug | 获取内容项 |
GET /api/v1/content/bundle | 获取所有内容 |
POST /api/v1/chat | 与AI聊天 |
GET /api/health | 健康检查 |
GET /api/metrics | 普罗米修斯指标 |
管理员
需要 X-Admin-Key 头球
| 端点 | 描述 |
|---|---|
POST /api/v1/admin/content | 创建内容 |
PUT /api/v1/admin/content/:id | 更新内容 |
DELETE /api/v1/admin/content/:id | 软删除 |
GET /api/v1/admin/content/:id/history | 版本历史 |
POST /api/v1/admin/content/:id/restore | 还原版本 |
完整规格: API 参考
建筑
src/
├── routes/ # HTTP handlers
├── services/ # Business logic
├── repositories/ # Data access
├── middleware/ # Express middleware
├── cache/ # Redis with memory fallback
├── resilience/ # Rate limiter, circuit breaker
├── events/ # Typed event emitter
├── llm/ # LLM provider abstraction
├── tools/ # Shared tools (chat & MCP)
├── mcp/ # MCP server (stdio transport)
└── observability/ # Metrics, tracing看 架构概述 了解详情。
文档
脚本
bun run dev # Development server
bun run build # Production build
bun run test # Run tests
bun run lint # Lint code
bun run db:studio # Drizzle Studio GUI
bun run mcp # Start MCP server许可证
该项目根据 MIT许可证.
