diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c6218da --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,86 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Development Commands + +```bash +# Install dependencies +bun install + +# Start development server +bun run dev + +# Build for production +bun run build + +# Preview production build +bun run preview + +# Lint code +bun run lint + +# Deploy to Cloudflare +bun run deploy + +# Generate Cloudflare types +bun run cf-typegen +``` + +## Architecture Overview + +This is a **Nuxt 3 portfolio website** deployed to **Cloudflare Workers** with the following architecture: + +### Tech Stack +- **Framework**: Nuxt 3 (SSR/ISR with Cloudflare preset) +- **UI**: Nuxt UI v4 with Tailwind CSS +- **Content**: Nuxt Content with D1 database backend +- **Styling**: SASS (main.css) + Tailwind CSS +- **Database**: Cloudflare D1 (SQLite) +- **Cache**: Cloudflare KV +- **Icons**: Iconify +- **Composables**: VueUse +- **Validation**: Zod +- **Deployment**: Cloudflare Wrangler + NuxtHub + +### Key Patterns + +1. **Content Collections**: Content is organized into typed collections (projects, experiences, education, skills, contact, languages, hobbies) defined in `content.config.ts` with Zod schemas + +2. **Server API Routes**: Data-fetching endpoints in `server/api/` use `queryCollection()` to fetch from D1 and return JSON to the client + +3. **Composables**: Shared logic lives in `app/composables/`: + - `content.ts`: Fetches all main content collections + - `projects.ts`: Project status/type color mappings + +4. **Component Structure**: Components are organized by domain in `app/components/`: + - `home/`: Homepage-specific components + - `content/`: Content projection components + - Shared components at root level + +5. **Pages**: File-based routing with dynamic routes for projects (`pages/projects/[slug].vue`) + +6. **Internationalization**: English/French support with content files in appropriate locales + +7. **Server-side Resumes**: Static PDF resume endpoints in `server/routes/resumes/` (en.get.ts, fr.get.ts) + +### Cloudflare Configuration + +- **Binding**: DB (D1), CACHE (KV), ASSETS (static files) +- **Workers preset**: `cloudflare_module` +- **Exported file**: `.output/server/index.mjs` +- **Preview URLs**: Enabled for branch deployments + +### Environment Variables + +Required for full functionality (see `.env.example`): +- `STUDIO_GITHUB_CLIENT_ID` / `STUDIO_GITHUB_CLIENT_SECRET`: Nuxt Studio integration +- `NUXT_WAKATIME_*`: Coding statistics API keys +- `NUXT_DISCORD_USER_ID`: Discord activity display +- `NUXT_STATUS_PAGE`: Status page URL + +### Build Output + +- Client assets: `.output/public/` +- Server code: `.output/server/` +- Database migrations: `.output/server/db/migrations/` diff --git a/app/pages/projects/[slug].vue b/app/pages/projects/[slug].vue index 3b784b4..edb9500 100644 --- a/app/pages/projects/[slug].vue +++ b/app/pages/projects/[slug].vue @@ -38,8 +38,6 @@ defineOgImageComponent('NuxtSeo', { theme: '#F43F5E' }) -const { statusColors, typeColors } = useProjectColors() - const formattedDate = computed(() => { if (!project.value?.publishedAt) return null return new Date(project.value.publishedAt).toLocaleDateString('en-US', { @@ -82,14 +80,12 @@ const formattedDate = computed(() => {
{{ project.type }} {{ project.status }} diff --git a/app/pages/projects/index.vue b/app/pages/projects/index.vue index 5730f8b..6baf878 100644 --- a/app/pages/projects/index.vue +++ b/app/pages/projects/index.vue @@ -1,11 +1,5 @@