This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Use
pnpmfor package management (not npm/yarn) pnpm install --filter frontend- Install dependencies from project rootpnpm dev- Start development server on localhost:3000 (run from frontend directory)- Always run install commands from project root using workspace filter
pnpm build- Build for productionpnpm preview- Preview production build locallypnpm test- Run tests with Vitestpnpm tsc-check- Run TypeScript type checking
pnpm lint- Run ESLintpnpm lint:fix- Fix ESLint issues automaticallypnpm format- Format code with Prettierpnpm format:check- Check code formatting
pnpm storybook- Run Storybook on port 6006pnpm storybook:build- Build Storybookpnpm docs:dev- Run VitePress docs on localhost:5173pnpm blog:dev- Run VitePress blog on localhost:5174
- Nuxt 4 (Vue 3) framework with TypeScript
- Tailwind CSS for styling with PrimeVue component library
- Pinia for state management
- TanStack Vue Query for data fetching and caching
- ECharts for data visualization
- Auth0 for authentication with OIDC/OAuth2 flows
- PostgreSQL database integration
- Vitest for testing, Storybook for component development
All paths below are relative to the frontend/ directory.
frontend/
├── app/ # Main application code
│ ├── assets/ # Static assets and styles
│ ├── components/ # Vue components (UI kit and feature components)
│ ├── config/ # Configuration files
│ ├── layouts/ # Nuxt layout components
│ ├── pages/ # File-based routing pages
│ ├── middleware/ # Client-side middleware
│ └── plugins/ # Nuxt plugins
│
├── server/ # Server-side code
│ ├── api/ # API routes and endpoints
│ ├── constants/ # Server constants
│ ├── data/ # Data layer and queries
│ ├── helpers/ # Utility functions
│ ├── middleware/ # Server middleware
│ ├── mocks/ # Mock data for development
│ ├── repo/ # Repository pattern implementations
│ ├── types/ # Server-side type definitions
│ └── utils/ # Server utilities
│
├── types/ # TypeScript type definitions
├── composables/ # Vue composables
└── setup/ # Nuxt configuration modules
- Uses Auth0 with PKCE (Proof Key for Code Exchange) flow
- Server-side session management with HTTP-only cookies
- API routes handle login (
/api/auth/login), callback (/api/auth/callback), and logout useAuthcomposable manages client-side auth state- Detailed flow documented in
AUTH_CONFIGURATION.md
- Vue Query for server state management and caching
- Pinia stores for client-side application state
- API layer in
server/api/follows RESTful conventions - Repository pattern for data access in
server/repo/
- UI Kit components in
app/components/uikit/for reusable design system - Feature-specific components organized by domain
- PrimeVue components for complex UI patterns
- Storybook for component documentation and testing
- Modular Nuxt config split across
setup/directory:head.ts- Meta tags and SEOtailwind.ts- Tailwind configurationprimevue.ts- PrimeVue themingcaching.ts- Route caching rulessitemap.ts- Sitemap generationanalytics.ts- Analytics (Google Analytics, Plausible)echarts.ts- ECharts configurationhooks.ts- Nuxt lifecycle hooksimage.ts- Image optimizationmodules.ts- Nuxt modules registrationog-image.ts- Open Graph image generationrobots.ts- Robots.txt configurationruntime-config.ts- Runtime environment configsite.ts- Site metadatavite.ts- Vite bundler configvue.ts- Vue compiler optionsrate-limiter.ts- API rate limiting
- Environment-specific configuration via runtime config
- Production vs development environment detection
- Proxy configuration for docs (
/docs) and blog (/blog) routes - Analytics integration (Google Analytics, Plausible)
- PostgreSQL with separate read/write hosts
- Environment variables for database configuration:
INSIGHTS_DB_WRITE_HOST/INSIGHTS_DB_READ_HOSTINSIGHTS_DB_PORT,INSIGHTS_DB_USERNAME,INSIGHTS_DB_PASSWORDINSIGHTS_DB_DATABASE
- Tinybird API integration for analytics data
- GitHub API token for repository data
- Redis for caching (optional)
- Configurable via environment variables
- Strict TypeScript configuration enabled
- Type definitions organized in
types/directory - Use
tsc-checkcommand to verify types before committing
- Auth0 domain differs between environments (staging vs production)
- Local development uses
http://localhost:3000callbacks - Production uses
https://insights.linuxfoundation.orgcallbacks - See
AUTH_CONFIGURATION.mdfor detailed setup instructions
- Vitest for unit testing
- Happy DOM for DOM simulation
- Use
pnpm testto run tests during development
- ESLint with TypeScript and Vue-specific rules
- Prettier for code formatting
- Husky git hooks for pre-commit checks
- License headers automatically added via lint-staged
- whenever you generate html/vue code make sure to use ui components from the ui kit in the project
frontend/app/components/uikit/ - make sure to always consider tailwind config file to see correct classes names