mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 15:54:22 +01:00
Merge pull request #8 from ArthurDanjou/copilot/improve-readme-file
Refactor README to focus on portfolio API with MCP as a component
This commit is contained in:
379
README.md
379
README.md
@@ -1,66 +1,125 @@
|
|||||||
# ArtMCP - Arthur Danjou's MCP Server
|
# ArtAPI - Arthur Danjou's Portfolio API
|
||||||
|
|
||||||
A comprehensive [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server exposing professional profile information about Arthur Danjou. Built with [Nuxt](https://nuxt.com) and deployed on [NuxtHub](https://hub.nuxt.com) at the Edge.
|
[](https://nuxt.com)
|
||||||
|

|
||||||
|
[](https://www.cloudflare.com/)
|
||||||
|
[](https://modelcontextprotocol.io)
|
||||||
|
|
||||||
🔗 **Live Server**: https://api.arthurdanjou.fr/mcp
|
A comprehensive REST API exposing professional profile information about Arthur Danjou. Built with [Nuxt](https://nuxt.com) and deployed on [NuxtHub](https://hub.nuxt.com) at the Edge. The API powers Arthur's portfolio and includes a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server component for AI assistant integration.
|
||||||
|
|
||||||
## 🎯 Features
|
🔗 **Base URL**: https://api.arthurdanjou.fr
|
||||||
|
📚 **Documentation**: https://api.arthurdanjou.fr/docs
|
||||||
|
🤖 **MCP Server**: https://api.arthurdanjou.fr/mcp
|
||||||
|
|
||||||
### MCP Resources
|
---
|
||||||
|
|
||||||
The server exposes the following resources through the Model Context Protocol:
|
## 📋 Table of Contents
|
||||||
|
|
||||||
- **📊 Skills** (`resource://artmcp/skills`) - Complete list of technical skills (programming languages, frameworks, tools)
|
- [What is ArtAPI?](#-what-is-artapi)
|
||||||
- **💼 Experiences** (`resource://artmcp/experiences`) - Professional work experience and projects
|
- [API Endpoints](#-api-endpoints)
|
||||||
- **🚀 Projects** (`resource://artmcp/projects`) - Portfolio of personal and professional projects
|
- [Getting Started](#-getting-started)
|
||||||
- **🎓 Education** (`resource://artmcp/education`) - Academic background and degrees
|
- [Architecture](#-architecture)
|
||||||
- **🌐 Languages** (`resource://artmcp/languages`) - Spoken languages with proficiency levels
|
- [MCP Server Component](#-mcp-server-component)
|
||||||
- **👤 Profile** (`resource://artmcp/profile`) - Comprehensive profile with bio, location, availability, career goals, and work preferences
|
- [Development](#-development)
|
||||||
- **🎨 Hobbies** (`resource://artmcp/hobbies`) - Personal interests and activities
|
- [Content Structure](#-content-structure)
|
||||||
- **📞 Contact** (`resource://artmcp/contact`) - Professional contact information and social links
|
- [Troubleshooting & FAQ](#-troubleshooting--faq)
|
||||||
- **🛠️ Uses** (`resource://artmcp/uses`) - Tools, hardware, and software setup
|
- [Contributing](#-contributing)
|
||||||
|
- [License](#-license)
|
||||||
|
- [About](#-about)
|
||||||
|
|
||||||
### MCP Tools
|
---
|
||||||
|
|
||||||
- **`activity`** - Real-time current activity and status of Arthur Danjou
|
## 💡 What is ArtAPI?
|
||||||
- **`resume-link`** - Get download link for resume in English or French
|
|
||||||
- **`stats`** - Detailed coding statistics and analytics from WakaTime
|
|
||||||
- **`status-page`** - Real-time status and uptime monitoring for homelab infrastructure
|
|
||||||
- **`uses-by-category`** - Filter uses by category (homelab, ide, hardware, software)
|
|
||||||
- **`weather`** - Get current weather for a city
|
|
||||||
|
|
||||||
### MCP Prompts
|
ArtAPI is a **comprehensive REST API** that serves as the backend for Arthur Danjou's portfolio. It provides structured access to professional information including skills, experiences, projects, education, and real-time activity data. The API is designed to power portfolio websites, applications, and integrations.
|
||||||
|
|
||||||
Pre-configured prompts for common queries about:
|
**Key Features:**
|
||||||
- Resume generation
|
- 📊 **Portfolio Data**: Complete professional profile, skills, experiences, and projects
|
||||||
- Skills and expertise
|
- 🎓 **Education & Background**: Academic history and achievements
|
||||||
- Projects showcase
|
- ⚡ **Real-time Data**: Current activity status and coding statistics via integrations
|
||||||
- Real-time activity
|
- 📄 **Resume Access**: Download resumes in multiple languages
|
||||||
- Contact information
|
- 🤖 **MCP Integration**: Optional Model Context Protocol server for AI assistant access
|
||||||
- And more...
|
- 🌐 **RESTful Design**: Clean, well-documented API endpoints
|
||||||
|
|
||||||
## 🏗️ Architecture
|
**Use Cases:**
|
||||||
|
- 🌐 Power portfolio websites and applications
|
||||||
|
- 📱 Build mobile apps showcasing professional information
|
||||||
|
- 🤖 Enable AI assistants to answer questions about Arthur's experience
|
||||||
|
- 📊 Display real-time coding statistics and activity dashboards
|
||||||
|
- 🔍 Query specific information programmatically for integrations
|
||||||
|
|
||||||
This project uses:
|
## 📚 API Endpoints
|
||||||
- **Nuxt 4** with Nitro for server-side rendering
|
|
||||||
- **@nuxt/content** for content management
|
All API endpoints are available at the base URL: `https://api.arthurdanjou.fr`
|
||||||
- **@nuxtjs/mcp-toolkit** for MCP server implementation
|
|
||||||
- **NuxtHub** for edge deployment on Cloudflare Workers
|
### Profile & Information
|
||||||
- **nuxt-studio** for content management studio
|
- `GET /api/profile` - Comprehensive profile with bio, location, availability, career goals
|
||||||
- **Zod** for schema validation
|
- `GET /api/contact` - Professional contact information and social links
|
||||||
|
- `GET /api/skills` - Complete list of technical skills (programming languages, frameworks, tools)
|
||||||
|
- `GET /api/languages` - Spoken languages with proficiency levels
|
||||||
|
- `GET /api/hobbies` - Personal interests and activities
|
||||||
|
|
||||||
|
### Professional Experience
|
||||||
|
- `GET /api/experiences` - Professional work experience and projects
|
||||||
|
- `GET /api/projects` - Portfolio of personal and professional projects
|
||||||
|
- `GET /api/education` - Academic background and degrees
|
||||||
|
|
||||||
|
### Real-time Data
|
||||||
|
- `GET /api/activity` - Current activity and status (Discord integration)
|
||||||
|
- `GET /api/wakatime` - Detailed coding statistics and analytics from WakaTime
|
||||||
|
- `GET /api/status-page` - Homelab infrastructure status and uptime monitoring
|
||||||
|
|
||||||
|
### Tools & Resources
|
||||||
|
- `GET /api/uses` - Tools, hardware, and software setup
|
||||||
|
- `GET /api/resumes/{en|fr}` - Download resume in English or French
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Get profile information
|
||||||
|
curl https://api.arthurdanjou.fr/api/profile
|
||||||
|
|
||||||
|
# Get technical skills
|
||||||
|
curl https://api.arthurdanjou.fr/api/skills
|
||||||
|
|
||||||
|
# Get current activity
|
||||||
|
curl https://api.arthurdanjou.fr/api/activity
|
||||||
|
|
||||||
|
# Download English resume
|
||||||
|
curl -O https://api.arthurdanjou.fr/api/resumes/en
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Arthur Danjou",
|
||||||
|
"title": "Data Science & Applied AI Student",
|
||||||
|
"location": "Paris, France",
|
||||||
|
"availability": "Available for final-year internship (April 2026)",
|
||||||
|
"bio": "Rigorous, curious, and motivated...",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 🚀 Getting Started
|
## 🚀 Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Node.js 18+ or Bun
|
- Bun 1.0+ (JavaScript runtime and package manager)
|
||||||
- pnpm 10.12.1+
|
- Alternatively: Node.js 18+ with pnpm 10.12.1+
|
||||||
|
|
||||||
|
> **Note:** This project uses Bun as the primary runtime and package manager. Node.js with pnpm can be used as an alternative.
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone https://github.com/ArthurDanjou/artapi.git
|
||||||
|
cd artapi
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
pnpm install
|
bun install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
@@ -89,15 +148,26 @@ NUXT_STATUS_PAGE=""
|
|||||||
Start the development server on `http://localhost:3000`:
|
Start the development server on `http://localhost:3000`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm dev
|
bun dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The server will be available at:
|
||||||
|
- 🌐 Web Interface: `http://localhost:3000`
|
||||||
|
- 📚 Documentation: `http://localhost:3000/docs`
|
||||||
|
- 🔌 MCP Endpoint: `http://localhost:3000/mcp`
|
||||||
|
|
||||||
### Production
|
### Production
|
||||||
|
|
||||||
Build the application for production:
|
Build the application for production:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm build
|
bun run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Preview the production build locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun preview
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
@@ -105,41 +175,146 @@ pnpm build
|
|||||||
Deploy to NuxtHub/Cloudflare:
|
Deploy to NuxtHub/Cloudflare:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm deploy
|
# First time: Login to Cloudflare
|
||||||
|
wrangler login
|
||||||
|
|
||||||
|
# Deploy the application
|
||||||
|
bun deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📚 API Endpoints
|
> **Note:** Make sure you have proper Cloudflare credentials configured. Run `wrangler login` to authenticate if this is your first deployment.
|
||||||
|
|
||||||
All resources are also available as REST API endpoints:
|
## 🏗️ Architecture
|
||||||
|
|
||||||
- `GET /api/skills`
|
ArtAPI is built with modern web technologies and follows a serverless architecture:
|
||||||
- `GET /api/experiences`
|
|
||||||
- `GET /api/projects`
|
**Core Stack:**
|
||||||
- `GET /api/education`
|
- **Nuxt 4** - Full-stack framework with Nitro for server-side rendering and API routes
|
||||||
- `GET /api/languages`
|
- **Vue 3** - Frontend framework (for documentation pages)
|
||||||
- `GET /api/profile`
|
- **Cloudflare Workers** - Edge deployment via NuxtHub for global low-latency access
|
||||||
- `GET /api/hobbies`
|
- **TypeScript** - Type-safe development
|
||||||
- `GET /api/contact`
|
|
||||||
- `GET /api/uses`
|
**Data & Content:**
|
||||||
- `GET /api/activity`
|
- **Nuxt Content** - Content management with markdown and JSON files
|
||||||
- `GET /api/wakatime`
|
- **Cloudflare D1** - SQLite-compatible database for content queries in production
|
||||||
- `GET /api/status-page`
|
- **Zod** - Schema validation for API responses
|
||||||
- `GET /api/resumes/{en|fr}` - Download resume
|
|
||||||
|
**Additional Features:**
|
||||||
|
- **@nuxtjs/mcp-toolkit** - Model Context Protocol server implementation
|
||||||
|
- **nuxt-studio** - Content management studio interface
|
||||||
|
- **Discord/WakaTime APIs** - Real-time integrations for activity and stats
|
||||||
|
|
||||||
|
**Architecture Benefits:**
|
||||||
|
- ⚡ **Fast**: Edge deployment on Cloudflare's global network
|
||||||
|
- 🔒 **Type-safe**: Full TypeScript coverage
|
||||||
|
- 📝 **Content-first**: Easy to update via markdown/JSON files
|
||||||
|
- 🌐 **Multi-protocol**: REST API + MCP server in one package
|
||||||
|
- 🚀 **Scalable**: Serverless architecture with automatic scaling
|
||||||
|
|
||||||
|
## 🤖 MCP Server Component
|
||||||
|
|
||||||
|
In addition to the REST API, ArtAPI includes a **Model Context Protocol (MCP) server** component that enables AI assistants and MCP-compatible applications to access the same data through the MCP protocol.
|
||||||
|
|
||||||
|
**MCP Endpoint**: `https://api.arthurdanjou.fr/mcp`
|
||||||
|
|
||||||
|
### Why MCP?
|
||||||
|
|
||||||
|
The MCP server allows AI assistants (like Claude Desktop, Cline, etc.) to directly query Arthur's professional information, making it easy to:
|
||||||
|
- Answer questions about experience and skills
|
||||||
|
- Generate customized resumes and cover letters
|
||||||
|
- Access real-time activity and coding statistics
|
||||||
|
- Query specific information through natural language
|
||||||
|
|
||||||
|
### MCP Resources
|
||||||
|
|
||||||
|
The MCP server exposes all API data as resources:
|
||||||
|
|
||||||
|
- **📊 Skills** (`resource://artmcp/skills`) - Technical skills and tools
|
||||||
|
- **💼 Experiences** (`resource://artmcp/experiences`) - Work experience
|
||||||
|
- **🚀 Projects** (`resource://artmcp/projects`) - Project portfolio
|
||||||
|
- **🎓 Education** (`resource://artmcp/education`) - Academic background
|
||||||
|
- **🌐 Languages** (`resource://artmcp/languages`) - Spoken languages
|
||||||
|
- **👤 Profile** (`resource://artmcp/profile`) - Complete profile
|
||||||
|
- **🎨 Hobbies** (`resource://artmcp/hobbies`) - Personal interests
|
||||||
|
- **📞 Contact** (`resource://artmcp/contact`) - Contact information
|
||||||
|
- **🛠️ Uses** (`resource://artmcp/uses`) - Tech stack and tools
|
||||||
|
|
||||||
|
### MCP Tools
|
||||||
|
|
||||||
|
Dynamic tools for AI assistants:
|
||||||
|
|
||||||
|
- **`activity`** - Get current real-time activity status
|
||||||
|
- **`resume-link`** - Get resume download link (English/French)
|
||||||
|
- **`stats`** - Retrieve WakaTime coding statistics
|
||||||
|
- **`status-page`** - Check homelab infrastructure status
|
||||||
|
- **`uses-by-category`** - Filter tools by category
|
||||||
|
- **`weather`** - Get weather for a city
|
||||||
|
|
||||||
|
### Connecting via MCP
|
||||||
|
|
||||||
|
**Option 1: Direct URL**
|
||||||
|
```
|
||||||
|
https://api.arthurdanjou.fr/mcp
|
||||||
|
```
|
||||||
|
|
||||||
|
**Option 2: Configuration File**
|
||||||
|
|
||||||
|
Add to your MCP client configuration:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"artapi": {
|
||||||
|
"url": "https://api.arthurdanjou.fr/mcp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage Examples:**
|
||||||
|
```
|
||||||
|
"Show me Arthur's technical skills"
|
||||||
|
"What is Arthur currently working on?"
|
||||||
|
"Get Arthur's resume in French"
|
||||||
|
```
|
||||||
|
|
||||||
## 🧪 Development
|
## 🧪 Development
|
||||||
|
|
||||||
### Linting
|
### Linting
|
||||||
|
|
||||||
|
Check and fix code style issues:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm lint
|
# Run ESLint
|
||||||
|
bun lint
|
||||||
|
|
||||||
|
# Auto-fix issues where possible
|
||||||
|
bun lint --fix
|
||||||
```
|
```
|
||||||
|
|
||||||
### Type Checking
|
### Type Checking
|
||||||
|
|
||||||
|
Verify TypeScript types:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Type check without emitting files
|
||||||
npx tsc --noEmit --skipLibCheck
|
npx tsc --noEmit --skipLibCheck
|
||||||
|
|
||||||
|
# Or use Vue's type checker
|
||||||
|
npx vue-tsc --noEmit
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Adding Content
|
||||||
|
|
||||||
|
Content is managed in the `content/` directory. To add new items:
|
||||||
|
|
||||||
|
1. **Add a new experience:** Create a markdown file in `content/experiences/`
|
||||||
|
2. **Add a new project:** Create a markdown file in `content/projects/`
|
||||||
|
3. **Update skills:** Edit `content/skills.json`
|
||||||
|
4. **Update profile:** Edit `content/profile.md`
|
||||||
|
|
||||||
|
Content changes are automatically picked up by Nuxt Content and reflected in the API.
|
||||||
|
|
||||||
## 📂 Content Structure
|
## 📂 Content Structure
|
||||||
|
|
||||||
Content is managed in the `content/` directory:
|
Content is managed in the `content/` directory:
|
||||||
@@ -158,36 +333,76 @@ content/
|
|||||||
└── uses/*.md # Tools and setup
|
└── uses/*.md # Tools and setup
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔧 Technologies
|
## ❓ Troubleshooting & FAQ
|
||||||
|
|
||||||
- **Frontend/Backend**: Nuxt 4, Vue 3, Nitro
|
### Common Issues
|
||||||
- **MCP**: @nuxtjs/mcp-toolkit
|
|
||||||
- **Content**: Nuxt Content with better-sqlite3
|
|
||||||
- **Content Studio**: nuxt-studio
|
|
||||||
- **Deployment**: Cloudflare Workers via NuxtHub
|
|
||||||
- **Validation**: Zod schemas
|
|
||||||
|
|
||||||
## 📖 MCP Integration
|
**Q: The development server won't start**
|
||||||
|
- Ensure you have Bun 1.0+ installed
|
||||||
|
- Try removing `node_modules` and `bun.lockb`, then run `bun install` again
|
||||||
|
- Check if port 3000 is already in use
|
||||||
|
|
||||||
To use this server with an MCP client:
|
**Q: Environment variables not working**
|
||||||
|
- Copy `.env.example` to `.env`
|
||||||
|
- Ensure all required variables are set (though most are optional)
|
||||||
|
- Restart the development server after changing `.env`
|
||||||
|
|
||||||
1. Configure your MCP client to connect to `https://api.arthurdanjou.fr/mcp`
|
**Q: Content changes not reflecting**
|
||||||
2. Or use the API directly via REST endpoints
|
- The Nuxt Content module caches content. Try restarting the dev server
|
||||||
|
- For production builds, clear the `.nuxt` and `.output` directories
|
||||||
|
|
||||||
Example MCP client configuration:
|
**Q: MCP endpoint returns 404**
|
||||||
```json
|
- Ensure the `@nuxtjs/mcp-toolkit` module is properly installed
|
||||||
{
|
- Check that `browserRedirect` is configured in `nuxt.config.ts`
|
||||||
"mcpServers": {
|
- The MCP endpoint should redirect to `/docs` when accessed via browser
|
||||||
"artmcp": {
|
|
||||||
"url": "https://api.arthurdanjou.fr/mcp"
|
**Q: Deployment to Cloudflare fails**
|
||||||
}
|
- Verify Cloudflare credentials are configured with `wrangler login`
|
||||||
}
|
- Check `wrangler.jsonc` for proper configuration
|
||||||
}
|
- Ensure you have the necessary permissions on your Cloudflare account
|
||||||
```
|
|
||||||
|
### Getting Help
|
||||||
|
|
||||||
|
- 📖 Check the [documentation page](https://api.arthurdanjou.fr/docs)
|
||||||
|
- 🐛 [Open an issue](https://github.com/ArthurDanjou/artapi/issues) on GitHub
|
||||||
|
- 💬 Review existing issues for similar problems
|
||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝 Contributing
|
||||||
|
|
||||||
This is a personal portfolio project. Feel free to use it as inspiration for your own MCP server!
|
This is a personal portfolio project. However, contributions are welcome!
|
||||||
|
|
||||||
|
### How to Contribute
|
||||||
|
|
||||||
|
1. **Fork the repository**
|
||||||
|
2. **Create a feature branch:** `git checkout -b feature/amazing-feature`
|
||||||
|
3. **Make your changes** and commit: `git commit -m 'Add amazing feature'`
|
||||||
|
4. **Push to your branch:** `git push origin feature/amazing-feature`
|
||||||
|
5. **Open a Pull Request**
|
||||||
|
|
||||||
|
### Ideas for Contributions
|
||||||
|
|
||||||
|
- 🐛 Bug fixes
|
||||||
|
- 📝 Documentation improvements
|
||||||
|
- ✨ New MCP tools or resources
|
||||||
|
- 🎨 UI/UX enhancements for the docs page
|
||||||
|
- 🔧 Performance optimizations
|
||||||
|
|
||||||
|
### Code Style
|
||||||
|
|
||||||
|
This project uses:
|
||||||
|
- **ESLint** for code linting (single quotes, no trailing commas)
|
||||||
|
- **TypeScript** for type safety
|
||||||
|
- **Vue 3** Composition API
|
||||||
|
|
||||||
|
Run `bun lint` before submitting PRs.
|
||||||
|
|
||||||
|
### Using as a Template
|
||||||
|
|
||||||
|
Feel free to fork this project and adapt it for your own professional profile! Just:
|
||||||
|
1. Update content in the `content/` directory
|
||||||
|
2. Modify `nuxt.config.ts` with your settings
|
||||||
|
3. Update environment variables for integrations (Discord, WakaTime, etc.)
|
||||||
|
4. Deploy to your own Cloudflare account
|
||||||
|
|
||||||
## 📝 License
|
## 📝 License
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user