From 75a136fdba91ebfa34febd34de7be6fc499f0433 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Fri, 14 Nov 2025 23:51:46 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20la=20configuration=20d?= =?UTF-8?q?u=20contenu=20et=20ajout=20de=20nouvelles=20ressources=20:=20mi?= =?UTF-8?q?se=20=C3=A0=20jour=20des=20collections=20de=20profil=20et=20de?= =?UTF-8?q?=20math=C3=A9matiques,=20correction=20des=20types=20de=20fichie?= =?UTF-8?q?rs,=20et=20ajustement=20des=20titres=20des=20ressources.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content.config.ts | 28 ++---- content/certifications.json | 2 + content/contact.json | 4 +- content/languages.json | 2 +- content/mathematics.md | 1 + content/{profile.json => profile.md} | 2 + server/api/content.config.ts | 124 +++++++++++++++++++++++++++ server/api/mathematics.get.ts | 10 +++ server/api/profile.get.ts | 2 +- server/routes/mcp.ts | 44 +++++++++- 10 files changed, 189 insertions(+), 30 deletions(-) create mode 100644 content/mathematics.md rename content/{profile.json => profile.md} (98%) create mode 100644 server/api/content.config.ts create mode 100644 server/api/mathematics.get.ts diff --git a/content.config.ts b/content.config.ts index 5212f4f..a56ea94 100644 --- a/content.config.ts +++ b/content.config.ts @@ -112,31 +112,13 @@ export default defineContentConfig({ })) }) }), + mathematics: defineCollection({ + type: 'page', + source: 'mathematics.md' + }), profile: defineCollection({ type: 'page', - source: 'profile.json', - schema: z.object({ - shortBio: z.string(), - location: z.object({ - current: z.string(), - timezone: z.string(), - remote: z.boolean() - }), - availability: z.object({ - status: z.string(), - types: z.array(z.string()), - preferences: z.array(z.string()), - startDate: z.string().optional() - }), - careerGoals: z.array(z.string()), - workPreferences: z.object({ - workStyle: z.array(z.string()), - companySize: z.array(z.string()), - industries: z.array(z.string()), - roles: z.array(z.string()) - }), - achievements: z.array(z.string()) - }) + source: 'profile.md' }) } }) diff --git a/content/certifications.json b/content/certifications.json index 39cd33f..5df598c 100644 --- a/content/certifications.json +++ b/content/certifications.json @@ -1,3 +1,5 @@ +TODO: complete + { "body": [ { diff --git a/content/contact.json b/content/contact.json index cb65243..42b9e03 100644 --- a/content/contact.json +++ b/content/contact.json @@ -42,8 +42,8 @@ "value": "https://mcp.arthurdanjou.fr" }, { - "name": "Status Page", - "icon": "i-ph:activity-duotone", + "name": "Status Page", + "icon": "i-ph:fire-duotone", "value": "https://go.arthurdanjou.fr/status" } ] diff --git a/content/languages.json b/content/languages.json index 0650548..f068fa1 100644 --- a/content/languages.json +++ b/content/languages.json @@ -13,7 +13,7 @@ { "name": "Spanish", "level": "Intermediate", - "proficiency": "B1" + "proficiency": "A2" } ] } diff --git a/content/mathematics.md b/content/mathematics.md new file mode 100644 index 0000000..a842f29 --- /dev/null +++ b/content/mathematics.md @@ -0,0 +1 @@ +TODO: complete \ No newline at end of file diff --git a/content/profile.json b/content/profile.md similarity index 98% rename from content/profile.json rename to content/profile.md index a0d4b1e..6afde07 100644 --- a/content/profile.json +++ b/content/profile.md @@ -1,3 +1,5 @@ +TODO: complete and convert + { "shortBio": "Software Engineer & Mathematics Student passionate about AI, Data Science, and Infrastructure. Building scalable solutions at the intersection of theory and practice.", "location": { diff --git a/server/api/content.config.ts b/server/api/content.config.ts new file mode 100644 index 0000000..a56ea94 --- /dev/null +++ b/server/api/content.config.ts @@ -0,0 +1,124 @@ +import { defineCollection, defineContentConfig, z } from '@nuxt/content' + +export default defineContentConfig({ + collections: { + projects: defineCollection({ + type: 'page', + source: 'projects/*.md', + schema: z.object({ + slug: z.string(), + title: z.string(), + description: z.string(), + publishedAt: z.string(), + readingTime: z.number().optional(), + tags: z.array(z.string()), + cover: z.string(), + favorite: z.boolean().optional() + }) + }), + usesCategories: defineCollection({ + type: 'data', + source: 'uses/categories/*.md', + schema: z.object({ + slug: z.string(), + name: z.string() + }) + }), + uses: defineCollection({ + type: 'data', + source: 'uses/*.md', + schema: z.object({ + name: z.string(), + description: z.string(), + category: z.string() + }) + }), + skills: defineCollection({ + type: 'page', + source: 'skills.json', + schema: z.object({ + description: z.string(), + body: z.array(z.object({ + id: z.string(), + name: z.string(), + items: z.array(z.object({ + name: z.string(), + icon: z.string() + })) + })) + }) + }), + experiences: defineCollection({ + type: 'data', + source: 'experiences/*.md', + schema: z.object({ + title: z.string(), + company: z.string(), + companyUrl: z.string().url().optional(), + startDate: z.string(), + endDate: z.string().optional(), + location: z.string(), + description: z.string(), + tags: z.array(z.string()) + }) + }), + education: defineCollection({ + type: 'data', + source: 'education/*.md', + schema: z.object({ + degree: z.string(), + institution: z.string(), + startDate: z.string(), + endDate: z.string().optional(), + location: z.string() + }) + }), + contact: defineCollection({ + type: 'page', + source: 'contact.json', + schema: z.object({ + body: z.array(z.object({ + name: z.string(), + icon: z.string().optional(), + value: z.string().url(), + username: z.string().optional() + })) + }) + }), + hobbies: defineCollection({ + type: 'page', + source: 'hobbies.md' + }), + languages: defineCollection({ + type: 'page', + source: 'languages.json', + schema: z.object({ + body: z.array(z.object({ + name: z.string(), + level: z.string(), + proficiency: z.string() + })) + }) + }), + certifications: defineCollection({ + type: 'page', + source: 'certifications.json', + schema: z.object({ + body: z.array(z.object({ + name: z.string(), + issuer: z.string(), + date: z.string(), + url: z.string().url().optional() + })) + }) + }), + mathematics: defineCollection({ + type: 'page', + source: 'mathematics.md' + }), + profile: defineCollection({ + type: 'page', + source: 'profile.md' + }) + } +}) diff --git a/server/api/mathematics.get.ts b/server/api/mathematics.get.ts new file mode 100644 index 0000000..c4cc32f --- /dev/null +++ b/server/api/mathematics.get.ts @@ -0,0 +1,10 @@ +import { queryCollection } from '@nuxt/content/server' + +export default defineCachedEventHandler(async (event) => { + return await queryCollection(event, 'mathematics') + .where('extension', '=', 'md') + .first() +}, { + name: 'mathematics-list', + maxAge: 3600 // 1 hour +}) diff --git a/server/api/profile.get.ts b/server/api/profile.get.ts index 6f08f28..8874a0b 100644 --- a/server/api/profile.get.ts +++ b/server/api/profile.get.ts @@ -2,7 +2,7 @@ import { queryCollection } from '@nuxt/content/server' export default defineCachedEventHandler(async (event) => { return await queryCollection(event, 'profile') - .where('extension', '=', 'json') + .where('extension', '=', 'md') .first() }, { name: 'profile-info', diff --git a/server/routes/mcp.ts b/server/routes/mcp.ts index f0805e7..a7be60b 100644 --- a/server/routes/mcp.ts +++ b/server/routes/mcp.ts @@ -203,7 +203,7 @@ function createServer() { 'artmcp-languages', 'resource://artmcp/languages', { - title: 'ArtMCP Languages', + title: 'Arthur Danjou - Languages', description: 'Get Languages spoken by Arthur Danjou with proficiency levels' }, async (uri) => { @@ -222,7 +222,7 @@ function createServer() { 'artmcp-certifications', 'resource://artmcp/certifications', { - title: 'ArtMCP Certifications', + title: 'Arthur Danjou - Certifications', description: 'Get Certifications and achievements of Arthur Danjou' }, async (uri) => { @@ -237,11 +237,30 @@ function createServer() { } ) + server.registerResource( + 'artmcp-mathematics', + 'resource://artmcp/mathematics', + { + title: 'Arthur Danjou - Mathematics', + description: 'Get information about Arthur Danjou\'s background and knowledge in mathematics, including areas of expertise and academic achievements' + }, + async (uri) => { + const result = await $fetch('/api/mathematics') + return { + contents: [{ + uri: uri.href, + mimeType: 'application/json', + text: JSON.stringify(result, null, 2) + }] + } + } + ) + server.registerResource( 'artmcp-profile', 'resource://artmcp/profile', { - title: 'ArtMCP Profile', + title: 'Arthur Danjou - Profile', description: 'Get comprehensive profile information of Arthur Danjou including bio, location, availability, career goals, and work preferences' }, async (uri) => { @@ -515,6 +534,25 @@ function createServer() { } ) + server.registerPrompt( + 'artmcp-mathematics', + { + title: 'Get Mathematical Background Knowledge of Arthur Danjou', + description: 'Get information about Arthur Danjou\'s background and knowledge in mathematics, including areas of expertise and academic achievements' + }, + async () => { + return { + messages: [{ + role: 'user', + content: { + type: 'text', + text: `Provide me information about Arthur Danjou's background and knowledge in mathematics, including areas of expertise and academic achievements.` + } + }] + } + } + ) + server.registerPrompt( 'artmcp-profile', {