Files
MokoJoomCommunity/CLAUDE.md
T
Jonathan Miller eb5e19ae4f
Generic: Repo Health / Release configuration (push) Blocked by required conditions
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: Auto Version Bump / Version Bump (push) Failing after 4s
Update Server / Update Server (push) Successful in 12s
fix: install errors — media path, MySQL strict mode, remove CB references
Bug fixes for Joomla installation:
- Fixed media folder attribute: folder="css" -> folder="." to prevent
  css/css path duplication that caused "File does not exist" error
- Fixed all TEXT NOT NULL columns to TEXT DEFAULT NULL across all SQL
  files — MySQL strict mode rejects TEXT NOT NULL without a default
  value on INSERT. Affects install.mysql.sql and all migration files.

Removed Community Builder references:
- README.md: removed "fork of Community Builder" and Joomlapolis credit
- CLAUDE.md: removed "fork of Community Builder" from description
- composer.json: cleaned description
- Language files: cleaned package description

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 09:22:49 -05:00

4.0 KiB

CLAUDE.md

This file provides guidance to Claude Code when working with this repository.

Project Overview

MokoJoomCommunity -- Community profiles, connections, and activity streams for Joomla

Field Value
Platform joomla
Language PHP
Default branch main
License GPL-3.0-or-later
Wiki MokoJoomCommunity Wiki
Standards MokoStandards

Common Commands

make build        # Build the project
make lint         # Run linters
make validate     # Validate structure
make release      # Full release pipeline
make minify       # Minify CSS/JS assets
make clean        # Clean build artifacts
composer install  # Install PHP dependencies

Architecture

This is a Joomla package extension (pkg_mokojoomcommunity) containing three sub-extensions:

com_mokojoomcommunity (Component)

  • Core community platform — profiles, custom fields, connections, activity stream, user lists
  • Admin: dashboard, user management, field management, list management, connection management
  • Site: profile view, profile editing, user directory, activity feed, connection management
  • Namespace: Joomla\Component\MokoJoomCommunity\{Administrator|Site}

plg_system_mokojoomcommunity (System Plugin)

  • SEF routing integration
  • Redirect Joomla's built-in profile to community profile (configurable)
  • Toolbar integration and notification badges (future)
  • Namespace: Joomla\Plugin\System\MokoJoomCommunity

plg_user_mokojoomcommunity (User Plugin)

  • Creates community profile on user registration
  • Cleans up all community data on user deletion (profile, fields, connections, activity)
  • Namespace: Joomla\Plugin\User\MokoJoomCommunity

Database Schema

Seven tables:

#__mokojoomcommunity_profiles:

  • id, user_id (FK to #__users), avatar, canvas (cover image)
  • bio, profile_views, last_activity, params (JSON)
  • UNIQUE on user_id

#__mokojoomcommunity_field_groups:

  • id, title, description, ordering, published
  • Groups custom fields into tabs/sections

#__mokojoomcommunity_fields:

  • id, group_id, title, name (unique slug), type (text/textarea/select/date/url/etc.)
  • visibility (public/registered/friends/private), required, registration
  • UNIQUE on name

#__mokojoomcommunity_field_values:

  • id, user_id, field_id, value
  • EAV pattern — one row per user per field
  • UNIQUE on (user_id, field_id)

#__mokojoomcommunity_connections:

  • id, requester_id, target_id, status (pending/accepted/declined/blocked)
  • UNIQUE on (requester_id, target_id)

#__mokojoomcommunity_activity:

  • id, user_id, action, context, context_id, title, params (JSON)
  • Activity stream — indexed by user+date and context

#__mokojoomcommunity_lists:

  • id, title, alias, description, params (JSON filter/sort config)
  • Saved user list/directory configurations

Rules

  • Never commit .claude/, .mcp.json, TODO.md, or *.min.css/*.min.js
  • Attribution: use Authored-by: Moko Consulting in commits
  • Branch strategy: develop on dev, merge to main for release
  • Minification: handled at build time (CI)
  • Wiki: documentation lives in the Gitea wiki, not in docs/ files
  • Standards: this repo follows MokoStandards

Coding Standards

  • PHP 8.1+ minimum
  • Joomla 5/6 DI container pattern: services/provider.php → Extension class
  • Legacy stub .php file required for plugin loader but empty
  • SubscriberInterface for event subscription (not on* method naming)
  • bind() → check() → store() for Table operations (not save())
  • Language file placement: site (no folder) vs admin (folder="administrator")
  • SPDX license headers on all PHP files
  • Visibility model: public → registered → friends → private (cumulative)