Directory Structure
portfolio/
├── src/ # Next.js application source
│ ├── app/ # App Router pages and layouts
│ │ ├── about/ # /about page
│ │ ├── articles/ # /articles blog listing and [slug]
│ │ ├── projects/ # /projects page
│ │ ├── speaking/ # /speaking page
│ │ ├── thank-you/ # /thank-you page
│ │ ├── uses/ # /uses page
│ │ ├── writing/ # /writing section
│ │ ├── feed.xml/ # RSS feed generation
│ │ ├── sitemap.xml/ # Sitemap generation
│ │ ├── layout.tsx # Root layout with providers
│ │ └── page.tsx # Home page
│ ├── components/ # React components
│ │ ├── chat/ # Chat widget components
│ │ │ ├── ChatWidget.tsx # Main chat widget (resizable panel)
│ │ │ ├── ChatPanel.tsx # Chat panel with messages
│ │ │ ├── MessageList.tsx # Message rendering
│ │ │ └── ...
│ │ ├── ui/ # Shared UI primitives
│ │ └── ... # Page-specific components
│ ├── hooks/ # Custom React hooks
│ │ ├── useChatSession.ts # Chat WebSocket + state management
│ │ ├── useTimeOnPage.ts # PostHog time-on-page tracking
│ │ └── ...
│ ├── images/ # Static images (imported in components)
│ ├── lib/ # Utilities
│ │ ├── analytics.ts # PostHog setup
│ │ ├── articles.ts # MDX article loading
│ │ └── ...
│ └── styles/ # Global CSS
├── chat-worker/ # Cloudflare Worker for chat
│ ├── src/ # Worker source code
│ │ ├── index.ts # Hono app with routes
│ │ ├── chat-session.ts # Durable Object (ChatSession)
│ │ ├── ai-engine.ts # Gemini integration
│ │ ├── ai-types.ts # AI type definitions
│ │ ├── rate-limiter.ts # IP-based rate limiting
│ │ ├── slack.ts # Slack API integration
│ │ ├── content-filter.ts # Message content filtering
│ │ ├── types.ts # Shared TypeScript types
│ │ └── knowledge-base.json # Auto-generated (gitignored)
│ ├── test/ # Vitest tests (Workers pool)
│ │ ├── routes.test.ts # HTTP route tests
│ │ ├── chat-session.test.ts # Durable Object tests
│ │ ├── ai-engine.test.ts # AI engine tests
│ │ └── slack.test.ts # Slack integration tests
│ ├── wrangler.toml # Worker configuration
│ └── package.json # Worker dependencies
├── e2e/ # Playwright E2E tests
├── scripts/ # Build and utility scripts
│ ├── generate-knowledge-base.ts # KB generator for chatbot
│ └── optimize-images.ts # Image optimization
├── docs-site/ # VitePress documentation (this site)
├── .github/workflows/ # GitHub Actions CI/CD
│ ├── ci.yml # PR checks (lint, typecheck, build)
│ ├── deploy.yml # Site deployment to Cloudflare Pages
│ ├── deploy-chat-worker.yml # Worker deployment
│ ├── notify.yml # Slack notifications
│ └── release-please.yml # Automated releases
├── package.json # Root dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── eslint.config.mjs # ESLint flat config
├── next.config.mjs # Next.js configuration
├── playwright.config.ts # Playwright configuration
└── CLAUDE.md # AI assistant instructions