# ArtAPI - Arthur Danjou's Portfolio API [![Nuxt](https://img.shields.io/badge/Nuxt-4.2.2-00DC82?logo=nuxt.js&logoColor=white)](https://nuxt.com) ![License](https://img.shields.io/badge/License-Private-red.svg) [![Deployment](https://img.shields.io/badge/Deployed%20on-Cloudflare-F38020?logo=cloudflare&logoColor=white)](https://www.cloudflare.com/) [![MCP](https://img.shields.io/badge/Protocol-MCP-blue)](https://modelcontextprotocol.io) 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. ๐Ÿ”— **Base URL**: https://api.arthurdanjou.fr ๐Ÿ“š **Documentation**: https://api.arthurdanjou.fr/docs ๐Ÿค– **MCP Server**: https://api.arthurdanjou.fr/mcp --- ## ๐Ÿ“‹ Table of Contents - [What is ArtAPI?](#-what-is-artapi) - [API Endpoints](#-api-endpoints) - [Getting Started](#-getting-started) - [Architecture](#-architecture) - [MCP Server Component](#-mcp-server-component) - [Development](#-development) - [Content Structure](#-content-structure) - [Troubleshooting & FAQ](#-troubleshooting--faq) - [Contributing](#-contributing) - [License](#-license) - [About](#-about) --- ## ๐Ÿ’ก What is ArtAPI? 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. **Key Features:** - ๐Ÿ“Š **Portfolio Data**: Complete professional profile, skills, experiences, and projects - ๐ŸŽ“ **Education & Background**: Academic history and achievements - โšก **Real-time Data**: Current activity status and coding statistics via integrations - ๐Ÿ“„ **Resume Access**: Download resumes in multiple languages - ๐Ÿค– **MCP Integration**: Optional Model Context Protocol server for AI assistant access - ๐ŸŒ **RESTful Design**: Clean, well-documented API endpoints **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 ## ๐Ÿ“š API Endpoints All API endpoints are available at the base URL: `https://api.arthurdanjou.fr` ### Profile & Information - `GET /api/profile` - Comprehensive profile with bio, location, availability, career goals - `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 ### Prerequisites - Node.js 18+ (or Bun 1.0+ as an alternative runtime) - pnpm 10.12.1+ (package manager) > **Note:** This project is primarily developed with Node.js and pnpm. Bun can be used as a drop-in replacement for Node.js runtime. ### Installation ```bash # Clone the repository git clone https://github.com/ArthurDanjou/artapi.git cd artapi # Install dependencies pnpm install ``` ### Environment Variables Create a `.env` file (optional): ```bash # Discord integration (optional) NUXT_DISCORD_USER_ID="" NUXT_DISCORD_ID="" NUXT_DISCORD_TOKEN="" # Wakatime integration (optional) NUXT_WAKATIME_USER_ID="" NUXT_WAKATIME_CODING="" NUXT_WAKATIME_EDITORS="" NUXT_WAKATIME_LANGUAGES="" NUXT_WAKATIME_OS="" # Status page (optional) NUXT_STATUS_PAGE="" ``` ### Development Start the development server on `http://localhost:3000`: ```bash pnpm dev ``` The server will be available at: - ๐ŸŒ Web Interface: `http://localhost:3000` - ๐Ÿ“š Documentation: `http://localhost:3000/docs` - ๐Ÿ”Œ MCP Endpoint: `http://localhost:3000/mcp` ### Production Build the application for production: ```bash pnpm build ``` Preview the production build locally: ```bash pnpm preview ``` ### Deployment Deploy to NuxtHub/Cloudflare: ```bash # First time: Login to Cloudflare wrangler login # Deploy the application pnpm deploy ``` > **Note:** Make sure you have proper Cloudflare credentials configured. Run `wrangler login` to authenticate if this is your first deployment. ## ๐Ÿ—๏ธ Architecture ArtAPI is built with modern web technologies and follows a serverless architecture: **Core Stack:** - **Nuxt 4** - Full-stack framework with Nitro for server-side rendering and API routes - **Vue 3** - Frontend framework (for documentation pages) - **Cloudflare Workers** - Edge deployment via NuxtHub for global low-latency access - **TypeScript** - Type-safe development **Data & Content:** - **Nuxt Content** - Content management with markdown and JSON files - **better-sqlite3** - SQLite database for content queries - **Zod** - Schema validation for API responses **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 ### Linting Check and fix code style issues: ```bash # Run ESLint pnpm lint # Auto-fix issues where possible pnpm lint --fix ``` ### Type Checking Verify TypeScript types: ```bash # Type check without emitting files 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 is managed in the `content/` directory: ``` content/ โ”œโ”€โ”€ skills.json # Technical skills โ”œโ”€โ”€ languages.json # Spoken languages โ”œโ”€โ”€ profile.md # Comprehensive profile info โ”œโ”€โ”€ contact.json # Contact information โ”œโ”€โ”€ hobbies.md # Personal interests โ”œโ”€โ”€ documentation.md # MCP documentation โ”œโ”€โ”€ experiences/*.md # Work experiences โ”œโ”€โ”€ projects/*.md # Project portfolio โ”œโ”€โ”€ education/*.md # Academic background โ””โ”€โ”€ uses/*.md # Tools and setup ``` ## โ“ Troubleshooting & FAQ ### Common Issues **Q: The development server won't start** - Ensure you have Node.js 18+ installed - Try removing `node_modules` and `pnpm-lock.yaml`, then run `pnpm install` again - Check if port 3000 is already in use **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` **Q: Content changes not reflecting** - The Nuxt Content module caches content. Try restarting the dev server - For production builds, clear the `.nuxt` and `.output` directories **Q: MCP endpoint returns 404** - Ensure the `@nuxtjs/mcp-toolkit` module is properly installed - Check that `browserRedirect` is configured in `nuxt.config.ts` - The MCP endpoint should redirect to `/docs` when accessed via browser **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 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 `pnpm 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 Private project - All rights reserved ## ๐Ÿ‘ค About **Arthur Danjou** - Data Science & Applied AI student at Paris Dauphine-PSL University, passionate about machine learning and mathematical modelling - ๐Ÿ“ Paris, France - ๐Ÿ”— [LinkedIn](https://go.arthurdanjou.fr/linkedin) - ๐Ÿ™ [GitHub](https://go.arthurdanjou.fr/github) - ๐Ÿ“ง [Email](https://go.arthurdanjou.fr/mail-pro) --- Built with โค๏ธ using Nuxt and the Model Context Protocol