This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Proclaim (CWM Proclaim) is a Joomla 4+ component for managing and displaying Bible studies/sermons. It supports teachers, series, topics, locations, media files, podcasting, and social sharing with customizable templates.
PHP Requirement: 8.3.0+
Namespace: CWM\Component\Proclaim
# Install PHP dependencies (vendor dir is libraries/vendor)
composer install --dev
# Install JS dependencies
npm install
# Run all PHP tests (unit + integration)
composer test
# Run only unit tests
composer test:unit
# Run only integration tests
composer test:integration
# Run JS tests
npm test
# Run a single PHP test file
./libraries/vendor/bin/phpunit tests/unit/Admin/Helper/CwmparamsTest.php
# Run a specific test suite
./libraries/vendor/bin/phpunit --testsuite "Admin Helper Tests"
# Check PHP syntax errors
composer lint:syntax
# Check code style via php-cs-fixer (dry-run)
composer lint
# Fix code style via php-cs-fixer
composer lint:fix
# Run lint + PHP tests
composer check
# Run all checks + all tests (PHP + JS)
composer check:all
# Full build with all checks
composer build:full
# Build frontend assets (JS/CSS)
composer build:assets
# Build component package (zip)
composer build
# Setup development environment
composer setup
# Create symlinks to Joomla installation
composer symlink
# Install Joomla (interactive)
composer joomla-install
# Show latest available Joomla version
composer joomla-latest
# Clean dev state (remove symlinks)
composer clean
# Sync and translate language files
composer sync-languages
# Force re-translate ALL language keys (use after major English changes)
composer sync-languages-force
# Bump version (for releases)
composer version -- -v 10.2.0
composer version -- -v 10.2.0-beta1
composer version -- -v 10.2.0-dev -c "New Codename"admin/src/- Administrator component code (namespace:CWM\Component\Proclaim\Administrator)site/src/- Frontend component code (namespace:CWM\Component\Proclaim\Site)libraries/vendor/- Composer dependencies (non-standard location)modules/- Joomla modules (site and admin)plugins/- Joomla plugins (finder, task)build/media_source/- Source JS, CSS, images, and vendor libraries (committed to git)media/- Generated JS/CSS/assets (gitignored; produced bynpm run build)
Each section (admin/site) follows Joomla 4's MVC structure:
Controller/- Request handlersModel/- Business logic and data accessView/- View classes (HtmlView.php)Helper/- Utility classesTable/- Database table classes (admin only)Field/- Custom form fields (admin only)tmpl/- PHP template files
- Extension/ProclaimComponent.php - Main component class
- Lib/ - Core utilities (backup, restore, assets, stats, conversion)
- Helper/ - Shared utilities (params, thumbnails, images, database, tags)
Messages (sermons), Teachers, Series, Topics, Locations, MediaFiles, Servers, Podcasts, Templates, TemplateCodes, Comments
admin/services/provider.php - Registers component with Joomla's DI container using MVCFactory, CategoryFactory, ComponentDispatcherFactory, and RouterFactory.
Tests are in tests/unit/ with structure mirroring the source:
tests/unit/Admin/Helper/- Admin helper teststests/unit/Site/Helper/- Site helper teststests/unit/Admin/Table/- Table teststests/unit/Site/Model/- Site model tests
Base test class: CWM\Component\Proclaim\Tests\ProclaimTestCase
JS tests are in tests/js/ and use Jest with jsdom for DOM testing.
# Run JS tests
npm test
# Run JS tests in watch mode (for development)
npm run test:watch
# Run JS tests with coverage
npm run test:coverageTest files should be named *.test.js or *.spec.js. Coverage reports are generated in build/reports/coverage-js/.
PhpStorm Integration: Jest is auto-detected. Use gutter icons next to tests, or right-click test files to run.
This project follows PSR-12 coding standards. All code must pass PHP CS Fixer before committing.
- Type casts: Always include a space after the cast operator:
(int) $var,(string) $value - Indentation: 4 spaces, no tabs
- Line length: Should not exceed 120 characters
- Braces: Opening brace on same line for control structures, new line for classes/methods
- Namespaces: One blank line after namespace declaration
- Use statements: Grouped by type, one blank line after use block
- PHP CS Fixer config:
.php-cs-fixer.dist.php - Run
composer lint:fixbefore committing
- Class naming:
Cwmprefix (e.g.,CwmparamsModel,CwmteacherTable) - Template files in
tmpl/andlayouts/are excluded from linting
- Run
composer install --devto install dependencies (auto-clones joomla-cms for testing) - Run
npm install && npm run buildto generatemedia/assets (JS, CSS, images, vendor libs) - Run
composer setupfor interactive configuration (or manually editbuild.properties) - Run
composer symlinkto link component to your Joomla installation
Note:
media/js/,media/css/,media/images/,media/vendor/, andmedia/fancybox/are generated — they are gitignored and must be built locally. Source files live inbuild/media_source/. Runnpm run buildafter any changes to source JS/CSS.
All project documentation is maintained in the Proclaim.wiki repository, not in this main repository.
- Wiki location:
../Proclaim.wiki/(sibling directory) - GitHub: https://github.com/Joomla-Bible-Study/Proclaim/wiki
When updating documentation:
- Release notes go in wiki as
Whats-New-X.X.md - Update
Tasks.mdwhen features are completed - Keep this repo's
README.mdminimal - link to wiki for details