jeffsenso/prestashop-skills / skills/prestashop-module-development
prestashop-module-development
VerifiedComplete PrestaShop module development workflow using modern architecture and best practices. Use when: creating new PrestaShop modules, updating legacy modules to modern code, implementing hooks and actions, setting up module configuration pages, adding front office features, handling database operations, implementing security measures, managing translations, creating cart rules and vouchers, building Symfony console commands, or modernizing existing PrestaShop modules from legacy patterns to current standards.
ps9-core-ai/Domain/ApiClient/CONTEXT.md
View on GitHub# ApiClient Domain
## Purpose
Manages OAuth API clients used to authenticate against the PrestaShop Admin API. Does not handle authentication flows or token issuance — those are handled by the API Platform / League OAuth2 layer.
## Layers
| Layer | Path |
|-------|------|
| Core CQRS | `src/Core/Domain/ApiClient/` — Commands, Queries, QueryResults, ValueObjects, Exceptions, Settings |
| Adapter | `src/Adapter/ApiClient/` — handler implementations |
| Doctrine Entity | `src/PrestaShopBundle/Entity/ApiClient.php` — no legacy ObjectModel exists for this domain |
| API Platform resource | `src/PrestaShopBundle/ApiPlatform/Resources/ApiClient.php` — exposes `/api-clients/infos` via CQRS |
| Back-office UI | `src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdminAPIController.php` — accessible via Advanced Parameters > Admin API. Contains both API client CRUD pages and API configuration form (confusing naming) |
## Non-obvious patterns
- This domain has **no legacy ObjectModel** (`classes/ApiClient.php` does not exist). The persistence layer uses a Doctrine entity exclusively — this is the modern pattern to follow.
- There is a `GenerateApiClientSecretCommand` — secret regeneration is a separate command, not part of edit.
- `src/Core/Domain/ApiClient/ApiClientSettings.php` defines field length constants; reference it before adding new string fields.
- The API Platform resource uses a custom `CQRSGet` metadata attribute that maps `_context[apiClientId]` from the request context into the query — not a standard REST pattern.
## Canonical examples
- `src/Core/Domain/ApiClient/Command/AddApiClientCommand.php` + `src/Adapter/ApiClient/CommandHandler/AddApiClientCommandHandler.php`
## Related
- [CQRS Component](../../Component/CQRS/CONTEXT.md)
- [Forms Component](../../Component/Forms/CONTEXT.md)
- `tests/Integration/Behaviour/Features/Scenario/ApiClient/` — Behat behavior scenarios
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |