Files
cultureat-bak/.claude/CLAUDE.md
Pascal Martineau 9109dc748b
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m2s
chore: Initial Claude init
2025-09-15 11:46:03 -04:00

56 lines
2.8 KiB
Markdown

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Overview
This is a WordPress site for Conseil de la culture de l'Abitibi-Témiscamingue with a hybrid architecture combining WordPress backend with a Nuxt.js frontend application. The site uses GraphQL for data communication between WordPress and Nuxt.js.
## Development Commands
### WordPress/PHP
- **Lint PHP code**: `./vendor/bin/phpcs` (uses WordPress coding standards via phpcs.xml)
- **Install PHP dependencies**: `composer install`
### Nuxt.js Frontend (in wp-content/themes/ccat/)
- **Development server**: `pnpm dev:nuxt` (runs on host with --host flag)
- **Build**: `pnpm build` (runs typecheck then nuxt build sequentially)
- **Type checking**: `pnpm build:typecheck`
- **Lint**: `pnpm lint` (ESLint with auto-fix)
- **Deploy**: `pnpm deploy` (NuxtHub deployment)
- **Preview**: `pnpm preview` (NuxtHub preview)
## Architecture
### WordPress Backend
- **Location**: Root directory contains standard WordPress installation
- **Custom Post Types**: membership, contributor, event, location, project, representation, resource, template (wp-content/themes/ccat/includes/cpt/)
- **Custom Taxonomies**: discipline, project-category, resource-category (wp-content/themes/ccat/includes/taxonomies/)
- **GraphQL**: Enabled via WP GraphQL plugin with JWT authentication
- **ACF Integration**: Advanced Custom Fields Pro with Extended Pro for custom fields
### Nuxt.js Frontend
- **Location**: wp-content/themes/ccat/ (acts as WordPress theme but contains Nuxt app)
- **Framework**: Nuxt 4.x with Vue 3, TypeScript
- **UI**: Nuxt UI 4.0 alpha with TailwindCSS
- **GraphQL**: Connects to WordPress GraphQL endpoint via nuxt-graphql-middleware
- **Deployment**: Cloudflare Workers via NuxtHub
- **Package Manager**: pnpm with specific built dependencies configuration
### Key Dependencies
- **WordPress Plugins**: WP GraphQL, ACF Pro, iThemes Security Pro, Clean Image Filenames
- **Nuxt Modules**: @nuxt/ui, @nuxthub/core, nuxt-auth-utils, nuxt-graphql-middleware, @nuxtjs/sitemap
## File Structure
- `/wp-content/themes/ccat/app/` - Nuxt application files
- `/wp-content/themes/ccat/server/` - Server-side GraphQL schema and API routes
- `/wp-content/themes/ccat/includes/` - WordPress theme functions (CPT, taxonomies, ACF)
- `/wp-content/themes/ccat/acf-json/` - ACF field group definitions
- `/wp-content/mu-plugins/` - Must-use plugins (currently only headless-home-url.php)
## Development Notes
- Site is configured as non-indexable (indexable: false in nuxt.config.ts)
- GraphQL endpoint: https://wp.cultureat.ca/graphql
- Frontend URL: https://cultureat.ca
- Uses Cloudflare Workers for hosting the Nuxt frontend
- WordPress serves as headless CMS with custom post types for cultural content management