heraspec 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +187 -0
- package/README.md +94 -95
- package/bin/heraspec.js +195 -80
- package/bin/heraspec.js.map +2 -2
- package/dist/core/templates/skills/README.md +41 -38
- package/dist/core/templates/skills/campaign-plan/skill.md +76 -0
- package/dist/core/templates/skills/campaign-plan/skill.vi.md +76 -0
- package/dist/core/templates/skills/campaign-plan-skill.md +76 -0
- package/dist/core/templates/skills/campaign-plan-skill.vi.md +76 -0
- package/dist/core/templates/skills/code-review/skill.md +70 -0
- package/dist/core/templates/skills/code-review/skill.vi.md +70 -0
- package/dist/core/templates/skills/code-review-skill.md +70 -0
- package/dist/core/templates/skills/code-review-skill.vi.md +70 -0
- package/dist/core/templates/skills/content-creation/skill.md +69 -0
- package/dist/core/templates/skills/content-creation/skill.vi.md +69 -0
- package/dist/core/templates/skills/content-creation-skill.md +69 -0
- package/dist/core/templates/skills/content-creation-skill.vi.md +69 -0
- package/dist/core/templates/skills/content-optimization/skill.md +104 -0
- package/dist/core/templates/skills/debug/skill.md +69 -0
- package/dist/core/templates/skills/debug/skill.vi.md +69 -0
- package/dist/core/templates/skills/debug-skill.md +69 -0
- package/dist/core/templates/skills/debug-skill.vi.md +69 -0
- package/dist/core/templates/skills/deploy-documentation/skill.md +408 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/airbnb/DESIGN.md +246 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/airtable/DESIGN.md +89 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/apple/DESIGN.md +313 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/bmw/DESIGN.md +180 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/cal/DESIGN.md +259 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/claude/DESIGN.md +312 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/clay/DESIGN.md +304 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/clickhouse/DESIGN.md +281 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/cohere/DESIGN.md +266 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/coinbase/DESIGN.md +129 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/composio/DESIGN.md +307 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/cursor/DESIGN.md +309 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/elevenlabs/DESIGN.md +265 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/expo/DESIGN.md +281 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/figma/DESIGN.md +220 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/framer/DESIGN.md +246 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/hashicorp/DESIGN.md +278 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/ibm/DESIGN.md +332 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/index.json +72 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/intercom/DESIGN.md +146 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/kraken/DESIGN.md +125 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/linear.app/DESIGN.md +367 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/lovable/DESIGN.md +298 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/minimax/DESIGN.md +257 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/mintlify/DESIGN.md +326 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/miro/DESIGN.md +108 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/mistral.ai/DESIGN.md +261 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/mongodb/DESIGN.md +266 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/notion/DESIGN.md +309 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/nvidia/DESIGN.md +293 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/ollama/DESIGN.md +267 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/opencode.ai/DESIGN.md +281 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/pinterest/DESIGN.md +230 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/posthog/DESIGN.md +256 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/raycast/DESIGN.md +268 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/replicate/DESIGN.md +261 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/resend/DESIGN.md +303 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/revolut/DESIGN.md +185 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/runwayml/DESIGN.md +244 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/sanity/DESIGN.md +357 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/sentry/DESIGN.md +262 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/spacex/DESIGN.md +194 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/spotify/DESIGN.md +246 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/stripe/DESIGN.md +322 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/supabase/DESIGN.md +255 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/superhuman/DESIGN.md +252 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/together.ai/DESIGN.md +263 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/uber/DESIGN.md +295 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/vercel/DESIGN.md +310 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/voltagent/DESIGN.md +323 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/warp/DESIGN.md +253 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/webflow/DESIGN.md +92 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/wise/DESIGN.md +173 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/x.ai/DESIGN.md +257 -0
- package/dist/core/templates/skills/design-system/knowledge/design-systems/zapier/DESIGN.md +328 -0
- package/dist/core/templates/skills/design-system/skill.md +176 -0
- package/dist/core/templates/skills/documents/skill.md +104 -0
- package/dist/core/templates/skills/e2e-test/skill.md +119 -0
- package/dist/core/templates/skills/email-sequence/skill.md +68 -0
- package/dist/core/templates/skills/email-sequence/skill.vi.md +68 -0
- package/dist/core/templates/skills/email-sequence-skill.md +68 -0
- package/dist/core/templates/skills/email-sequence-skill.vi.md +68 -0
- package/dist/core/templates/skills/git-embed/skill.md +57 -0
- package/dist/core/templates/skills/integration-test/skill.md +118 -0
- package/dist/core/templates/skills/knowledge/README.md +63 -63
- package/dist/core/templates/skills/knowledge/design-systems/index.json +72 -72
- package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/profile.json +27 -27
- package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/structure.md +137 -137
- package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/profile.json +39 -39
- package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/structure.md +207 -207
- package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/profile.json +51 -51
- package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/structure.md +369 -369
- package/dist/core/templates/skills/knowledge/index.json +65 -65
- package/dist/core/templates/skills/perfex-module/module-codebase/skill.md +110 -0
- package/dist/core/templates/skills/project-memory/skill.md +222 -0
- package/dist/core/templates/skills/project-memory/skill.vi.md +223 -0
- package/dist/core/templates/skills/seo-audit/skill.md +75 -0
- package/dist/core/templates/skills/seo-audit/skill.vi.md +75 -0
- package/dist/core/templates/skills/seo-audit-skill.md +75 -0
- package/dist/core/templates/skills/seo-audit-skill.vi.md +75 -0
- package/dist/core/templates/skills/smart-explore/skill.md +141 -0
- package/dist/core/templates/skills/sourcecode-analyzer/skill.md +210 -0
- package/dist/core/templates/skills/sourcecode-analyzer/skill.vi.md +210 -0
- package/dist/core/templates/skills/spec-writer/skill.md +61 -0
- package/dist/core/templates/skills/spec-writer/skill.vi.md +61 -0
- package/dist/core/templates/skills/spec-writer-skill.md +61 -0
- package/dist/core/templates/skills/spec-writer-skill.vi.md +61 -0
- package/dist/core/templates/skills/sql-queries/skill.md +67 -0
- package/dist/core/templates/skills/sql-queries/skill.vi.md +67 -0
- package/dist/core/templates/skills/sql-queries-skill.md +67 -0
- package/dist/core/templates/skills/sql-queries-skill.vi.md +67 -0
- package/dist/core/templates/skills/suggestion/skill.md +118 -0
- package/dist/core/templates/skills/system-design/skill.md +70 -0
- package/dist/core/templates/skills/system-design/skill.vi.md +70 -0
- package/dist/core/templates/skills/system-design-skill.md +70 -0
- package/dist/core/templates/skills/system-design-skill.vi.md +70 -0
- package/dist/core/templates/skills/tech-debt/skill.md +70 -0
- package/dist/core/templates/skills/tech-debt/skill.vi.md +70 -0
- package/dist/core/templates/skills/tech-debt-skill.md +70 -0
- package/dist/core/templates/skills/tech-debt-skill.vi.md +70 -0
- package/dist/core/templates/skills/ui-ux/data/charts.csv +26 -0
- package/dist/core/templates/skills/ui-ux/data/colors.csv +97 -0
- package/dist/core/templates/skills/ui-ux/data/design-systems.csv +54 -0
- package/dist/core/templates/skills/ui-ux/data/landing.csv +31 -0
- package/dist/core/templates/skills/ui-ux/data/pages-proposed.csv +22 -0
- package/dist/core/templates/skills/ui-ux/data/pages.csv +10 -0
- package/dist/core/templates/skills/ui-ux/data/products.csv +97 -0
- package/dist/core/templates/skills/ui-ux/data/prompts.csv +24 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/flutter.csv +53 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/html-tailwind.csv +56 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/nextjs.csv +53 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/react-native.csv +52 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/react.csv +54 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/svelte.csv +54 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/swiftui.csv +51 -0
- package/dist/core/templates/skills/ui-ux/data/stacks/vue.csv +50 -0
- package/dist/core/templates/skills/ui-ux/data/styles.csv +59 -0
- package/dist/core/templates/skills/ui-ux/data/typography.csv +58 -0
- package/dist/core/templates/skills/ui-ux/data/ux-guidelines.csv +100 -0
- package/dist/core/templates/skills/ui-ux/scripts/CODE_EXPLANATION.md +394 -0
- package/dist/core/templates/skills/ui-ux/scripts/SEARCH_ALGORITHMS_COMPARISON.md +421 -0
- package/dist/core/templates/skills/ui-ux/scripts/SEARCH_MODES_GUIDE.md +238 -0
- package/dist/core/templates/skills/ui-ux/scripts/core.py +391 -0
- package/dist/core/templates/skills/ui-ux/scripts/search.py +73 -0
- package/dist/core/templates/skills/ui-ux/skill.md +595 -0
- package/dist/core/templates/skills/ui-ux/templates/accessibility-checklist.md +40 -0
- package/dist/core/templates/skills/ui-ux/templates/example-prompt-full-theme.md +333 -0
- package/dist/core/templates/skills/ui-ux/templates/page-types-guide.md +338 -0
- package/dist/core/templates/skills/ui-ux/templates/pages-proposed-summary.md +273 -0
- package/dist/core/templates/skills/ui-ux/templates/pre-delivery-checklist.md +42 -0
- package/dist/core/templates/skills/ui-ux/templates/prompt-template-full-theme.md +313 -0
- package/dist/core/templates/skills/ui-ux/templates/responsive-design.md +40 -0
- package/dist/core/templates/skills/unit-test/skill.md +111 -0
- package/dist/core/templates/skills/wordpress/plugin-check/skill.md +151 -0
- package/dist/core/templates/skills/wordpress/plugin-directory/skill.md +396 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/skill.md +100 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/admin-dashboard.php +47 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/admin-settings.php +60 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/assets/admin-css.css +22 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/assets/admin-js.js +15 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/plugin-main.php +169 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/readme.txt +41 -0
- package/dist/core/templates/skills/wordpress/plugin-standard/templates/uninstall.php +21 -0
- package/dist/core/templates/skills/wordpress/ux-element/skill.md +83 -0
- package/dist/core/templates/skills/wordpress/ux-element/templates/Controller.php +50 -0
- package/dist/core/templates/skills/wordpress/ux-element/templates/Shortcode.php +23 -0
- package/dist/core/templates/skills/wordpress/ux-element/templates/Template.html +20 -0
- package/dist/core/templates/skills/wordpress/ux-element/templates/Thumbnail.svg +8 -0
- package/dist/core/templates/skills/wordpress/ux-element/templates/View.php +21 -0
- package/dist/index.js +195 -79
- package/package.json +1 -1
package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/structure.md
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
## 1. Executive Summary
|
|
2
|
-
|
|
3
|
-
- [Observed | High] The codebase is a CodeIgniter 4 monolith with plugin-based extensibility. Evidence: `index.php` (`$minPhpVersion = '8.1'`, `CodeIgniter\Boot::bootWeb()`), core app in `app/`, plugins in `plugins/`.
|
|
4
|
-
- [Observed | High] `data_builder` is deeply integrated as a first-class plugin providing REST, GraphQL, API token management, webhooks, and public API docs/sandbox flows. Evidence: `plugins/data_builder/index.php`, `plugins/data_builder/config/Routes.php`, controllers `Db_resources`, `Db_graphql`, `Public_api_docs`, `Webhooks`.
|
|
5
|
-
- [Observed | High] Runtime coupling is high because base controllers preload many models and settings globally. Evidence: `app/Controllers/App_Controller.php` (`get_models_array()` and eager model loading), `app/Controllers/Security_Controller.php`.
|
|
6
|
-
- [Inferred | Medium] Integration readiness is strong for API-first extensions, but operational hardening is uneven due broad CSRF exclusions and mixed legacy compatibility layers. Evidence: `app/Config/Filters.php`, `app/Config/Rise.php`, `plugins/data_builder/Helpers/*CI3*` wrappers.
|
|
7
|
-
- [Assumed | Low] This repository is the Rise CRM target for migration/integration work from another stack; direct Laravel runtime artifacts are not present. Evidence: missing `artisan`, `bootstrap/app.php`, `routes/web.php` in repo root.
|
|
8
|
-
|
|
9
|
-
## 2. Technology Profile
|
|
10
|
-
|
|
11
|
-
- [Observed | High] Language/runtime: PHP with CodeIgniter 4 bootstrap, minimum PHP 8.1. Evidence: `index.php`.
|
|
12
|
-
- [Observed | High] Application versioning is managed in Rise config (`3.9.6`). Evidence: `app/Config/Rise.php` (`app_settings_array['app_version']`).
|
|
13
|
-
- [Observed | High] Default data store is MySQL via MySQLi with DB prefix `rise_`. Evidence: `app/Config/Database.php` (`DBDriver = MySQLi`, `DBPrefix = rise_`).
|
|
14
|
-
- [Observed | High] Session persistence uses database-backed sessions (`ci_sessions`). Evidence: `app/Config/Session.php` (`DatabaseHandler`, `savePath = ci_sessions`).
|
|
15
|
-
- [Observed | High] Cache defaults to filesystem handler. Evidence: `app/Config/Cache.php` (`handler = file`).
|
|
16
|
-
- [Observed | High] Root dependency manifests are absent; dependency management is partially embedded (core `app/ThirdParty`) and partially plugin-local. Evidence: missing root `composer.json`/`package.json`; present `plugins/data_builder/composer.json`, `plugins/data_builder/package.json`, `app/ThirdParty/*`.
|
|
17
|
-
- [Observed | High] Data Builder adds GraphQL runtime dependency `webonyx/graphql-php` and frontend build toolchain (webpack/babel, Chart.js). Evidence: `plugins/data_builder/composer.json`, `plugins/data_builder/package.json`.
|
|
18
|
-
|
|
19
|
-
## 3. Repository Topology
|
|
20
|
-
|
|
21
|
-
- [Observed | High] Major root directories: `app`, `assets`, `plugins`, `system`, `writable`, `install`, `updates`, `_analytics`. Evidence: root directory listing.
|
|
22
|
-
- [Observed | High] Core MVC footprint is large (`app/Controllers`: 92 files, `app/Models`: 95 files), indicating mature monolith breadth. Evidence: file counts collected from `app/Controllers`, `app/Models`.
|
|
23
|
-
- [Observed | High] Data Builder plugin is modularized by concerns (`Controllers`, `Models`, `Libraries`, `Views`, `config`, `install`, `migrations`, `vendor`, `dist`). Evidence: `plugins/data_builder/*` structure.
|
|
24
|
-
- [Observed | High] Embedded third-party providers include Google, Stripe, Pusher, TCPDF, PhpSpreadsheet, reCAPTCHA. Evidence: `app/ThirdParty/*` directories.
|
|
25
|
-
|
|
26
|
-
## 4. Architecture and Dependency Flow
|
|
27
|
-
|
|
28
|
-
- [Observed | High] Boot flow: front controller -> CI bootstrap -> pre-system event -> plugin loading/hooks. Evidence: `index.php`; `app/Config/Events.php` (`Events::on('pre_system', ...)`, `load_plugin_indexes()`).
|
|
29
|
-
- [Observed | High] Activated plugins are auto-registered into PSR-4 namespaces at startup. Evidence: `app/Config/Autoload.php` (`load_activated_plugins()`).
|
|
30
|
-
- [Observed | High] Routing combines explicit routes and dynamic controller scanning at core level. Evidence: `app/Config/Routes.php` (directory scan of `app/Controllers`).
|
|
31
|
-
- [Observed | High] Data Builder routes are registered during plugin bootstrap and include both admin and public endpoints. Evidence: `plugins/data_builder/index.php` (`data_builder_register_routes()`), `plugins/data_builder/config/Routes.php`.
|
|
32
|
-
- [Observed | High] API controllers inherit a compatibility base that wraps CI4 services into CI3-style interfaces for legacy module code. Evidence: `plugins/data_builder/Controllers/Base_controller.php`, `plugins/data_builder/Helpers/CI3_Instance_Compat.php`.
|
|
33
|
-
- [Inferred | Medium] Dependency direction is mostly top-down (controllers -> models/libraries/helpers), but global helper and hook access patterns increase hidden coupling and side effects. Evidence: `app/Helpers/plugin_helper.php`, heavy global helper usage in controllers.
|
|
34
|
-
|
|
35
|
-
## 5. Coding Style and Conventions
|
|
36
|
-
|
|
37
|
-
- [Observed | High] Naming style is mixed legacy and modern (`snake_case` model names, CI-style controllers, namespaced classes). Evidence: `App_Controller.php`, `Permission_manager.php`, plugin `Db_*` classes.
|
|
38
|
-
- [Observed | High] Plugin code uses dense inline documentation and defensive runtime guards, especially in API middleware and webhook components. Evidence: `Db_api_base.php`, `Db_api_middleware.php`, `WebhookEventBus.php`.
|
|
39
|
-
- [Observed | Medium] Error handling strategy in Data Builder is centralized around structured API responses and an error registry. Evidence: `Db_api_response.php`, `ErrorRegistry.php`.
|
|
40
|
-
- [Observed | Medium] Core and plugin both rely on direct `echo/json_encode` and header operations in many controllers, reducing consistency with response abstractions. Evidence: multiple controller methods in `plugins/data_builder/Controllers/*` and core controllers.
|
|
41
|
-
- [Observed | High] No first-party test suite is present in repository root. Evidence: missing `tests/` directory and missing root phpunit config.
|
|
42
|
-
- [Inferred | Medium] Maintainability risk is elevated by mixed framework idioms (CI4 + CI3 compat layer) and very large base controllers.
|
|
43
|
-
|
|
44
|
-
## 6. Extension Points (Modules/Themes/Plugins/Hooks)
|
|
45
|
-
|
|
46
|
-
- [Observed | High] Plugin lifecycle hooks are available for install/activate/deactivate/uninstall/update. Evidence: `app/Helpers/plugin_helper.php` (`register_installation_hook`, `register_activation_hook`, etc.).
|
|
47
|
-
- [Observed | High] Data Builder uses lifecycle hooks to install schema and register routes. Evidence: `plugins/data_builder/index.php` hook registrations.
|
|
48
|
-
- [Observed | High] Core supports app-wide hook/filter injection via PHP-Hooks wrapper. Evidence: `app/Config/Events.php` (loads `PHP-Hooks`), `app/Helpers/plugin_helper.php` (`app_hooks()`).
|
|
49
|
-
- [Observed | High] UI extension point exists for admin sidebar composition through hook filters. Evidence: `plugins/data_builder/index.php` (`app_filter_staff_left_menu`).
|
|
50
|
-
- [Observed | Medium] CSRF exclusion patterns are extensible through filter hook and are modified by plugin at bootstrap. Evidence: `app/Config/Rise.php` constructor filter, `plugins/data_builder/index.php` add_filter for API/docs/embed URIs.
|
|
51
|
-
|
|
52
|
-
## 7. API and Interaction Surfaces
|
|
53
|
-
|
|
54
|
-
- [Observed | High] Public docs/UI surface: `/api_docs` with endpoint registry, code samples, Postman/OpenAPI export, and webhook simulator. Evidence: `plugins/data_builder/config/Routes.php`, `Public_api_docs.php`.
|
|
55
|
-
- [Observed | High] REST surface: `/api/v1/*` and alias `/data_builder/api/*` with resource, report, schema, and aggregate endpoints. Evidence: `plugins/data_builder/config/Routes.php`, `Db_resources.php`, `Db_views.php`.
|
|
56
|
-
- [Observed | High] GraphQL surface: `/api/v1/graphql` POST-only with depth/complexity controls and optional introspection restriction. Evidence: `Db_graphql.php`, `Libraries/api/Db_graphql_schema.php`.
|
|
57
|
-
- [Observed | High] Outbound webhook surface: subscription CRUD, test dispatch, live simulator, delivery logs. Evidence: `Webhooks.php`, `WebhookEventBus.php`, `HttpChannel.php`.
|
|
58
|
-
- [Observed | High] Inbound webhook surface exists in core for external systems (GitHub/Bitbucket/Stripe subscription events). Evidence: `app/Controllers/Webhooks_listener.php`.
|
|
59
|
-
- [Observed | Medium] Scheduled/background execution relies on HTTP-triggered cron controller, not a dedicated queue worker architecture. Evidence: `app/Controllers/Cron.php`.
|
|
60
|
-
|
|
61
|
-
## 8. Data Model and State Management
|
|
62
|
-
|
|
63
|
-
- [Observed | High] Core DB migrations/seeds are effectively empty placeholders (`.gitkeep`), while plugin owns explicit schema SQL and versioned migrations. Evidence: `app/Database/Migrations/.gitkeep`, `app/Database/Seeds/.gitkeep`, `plugins/data_builder/install/database.sql`, `plugins/data_builder/migrations/*`.
|
|
64
|
-
- [Observed | High] Data Builder persists API tokens, API logs, rate counters, report metadata, relations, and webhook subscriptions/logs in dedicated tables. Evidence: `plugins/data_builder/install/database.sql` (`data_builder_api_*`, `polydb_*` tables).
|
|
65
|
-
- [Observed | High] API write operations in Data Builder use transaction boundaries around mutating operations. Evidence: `Db_resources.php` (`trans_start`, `trans_complete`, rollback paths).
|
|
66
|
-
- [Observed | Medium] Table prefix abstraction is consistently applied (`db_prefix()`), aiding multi-install portability. Evidence: plugin migration/install scripts and helper wrappers.
|
|
67
|
-
- [Inferred | Medium] Data consistency is generally robust within single-request CRUD paths; cross-module consistency depends on model hooks and side effects not centrally orchestrated.
|
|
68
|
-
|
|
69
|
-
## 9. Security Posture
|
|
70
|
-
|
|
71
|
-
- [Observed | High] Core authentication/authorization is session-centric with role/permission gates in `Security_Controller` and `Permission_manager`. Evidence: `app/Controllers/Security_Controller.php`, `app/Libraries/Permission_manager.php`.
|
|
72
|
-
- [Observed | High] Data Builder API applies an explicit middleware chain: DDoS shield, CORS, admin-session bypass, auth gate, rate limiter, scope verifier, request logger. Evidence: `Db_api_base.php`, `Db_api_middleware.php`, middleware classes.
|
|
73
|
-
- [Observed | High] API token security includes scopes, table/view constraints, per-table CRUD permissions, HMAC signature validation, and anti-replay timestamp window. Evidence: `AuthGateMiddleware.php`, `ScopeVerifierMiddleware.php`, token schema in migrations.
|
|
74
|
-
- [Observed | High] API observability includes two-phase request logging and sensitive-field redaction. Evidence: `RequestLoggerMiddleware.php`, `Api_log_finalizer.php`, `Log_redactor.php`.
|
|
75
|
-
- [Observed | High] Public webhook simulator includes SSRF guard against localhost/private/reserved targets. Evidence: `Public_api_docs.php` (`_validate_webhook_simulator_target`, `_is_public_ip`).
|
|
76
|
-
- [Observed | Medium] CSRF filter is not globally enabled and relies on exclusion lists and endpoint-specific handling. Evidence: `app/Config/Filters.php` (`'csrf'` commented), `app/Config/Rise.php` exclusions, plugin-added exclusions in `plugins/data_builder/index.php`.
|
|
77
|
-
- [Observed | Medium] Core payment library code contains TLS verification disabled in some cURL paths, which is a material transport-security risk if unchanged in production. Evidence: `app/Libraries/Paypal.php` (`CURLOPT_SSL_VERIFYPEER => false`).
|
|
78
|
-
|
|
79
|
-
## 10. Integration Capability Matrix
|
|
80
|
-
|
|
81
|
-
| Domain | Entry Points | Required Adapters | Complexity | Risks | Confidence |
|
|
82
|
-
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------- | ---------------------------------------------------------------- | ---------- |
|
|
83
|
-
| External APIs | Core:`Google_api`, `Microsoft_api`, `Webhooks_listener`; Plugin: `/api/v1/*`, `/api_docs`, outbound webhooks | OAuth credential storage, API token issuance, endpoint-specific mappers | Medium | Credential sprawl, route exposure, vendor API drift | High |
|
|
84
|
-
| Authentication/SSO | Session auth in `Security_Controller`; token auth + HMAC in `AuthGateMiddleware` | Optional IdP bridge (OIDC/SAML) and token broker if enterprise SSO required | Medium-High | Mixed session/token contexts, bypass misconfiguration | Medium |
|
|
85
|
-
| Payment | `Paypal_redirect`, `Stripe_redirect`, `Paytm_redirect`, payment libraries | Payment gateway credential hardening, webhook signature verification standardization | Medium | TLS/cURL settings inconsistency, callback abuse if misconfigured | Medium |
|
|
86
|
-
| Messaging/Queue | Pusher integration (`Pusher_connect`), HTTP cron (`Cron`), webhook dispatch | Optional queue worker (Redis/RabbitMQ/SQS) for async retries/backoff | Medium | No first-class queue abstraction for heavy burst workloads | Medium |
|
|
87
|
-
| Storage/CDN | File/cache/session paths via `writable/`, `files/`, cache config | Object storage adapter (S3-compatible), CDN URL rewriting, signed URL strategy | Medium | Local disk coupling and backup/retention variability | Medium |
|
|
88
|
-
| Observability | API logs, webhook logs, activity logs, debug toolbar | Log shipping (ELK/Loki), metrics exporter, alert rules | Low-Medium | Fragmented telemetry across subsystems | High |
|
|
89
|
-
| Admin/UI customization | Hook/filter system (`app_hooks()`), plugin menu injection, plugin routes/views | Theme/view override conventions, stricter UI extension contracts | Low | Hook ordering collisions and undocumented custom hooks | High |
|
|
90
|
-
| Content/data migration | Plugin SQL installer + migrations, API docs export (Postman/OpenAPI), builder/template persistence | ETL scripts, schema-diff tooling, migration playbooks | Medium-High | Limited root migration automation and weak test safety net | Medium |
|
|
91
|
-
|
|
92
|
-
## 11. Strengths, Weaknesses, Risks
|
|
93
|
-
|
|
94
|
-
- [Observed | High] Strength: Clear plugin extensibility model with lifecycle hooks and route/menu injection points. Mitigation leverage: continue shipping new modules as plugins to reduce core edits.
|
|
95
|
-
- [Observed | High] Strength: Data Builder API stack includes practical hardening features (rate limit, HMAC, scope checks, log redaction).
|
|
96
|
-
- [Observed | Medium] Weakness: Core controller layer is monolithic and preloads many dependencies, increasing bootstrap cost and change blast radius.
|
|
97
|
-
- [Observed | Medium] Weakness: Mixed CI4 + CI3 compatibility layer increases cognitive load and future upgrade complexity.
|
|
98
|
-
- [Observed | Medium] Risk: Broad CSRF exclusions and globally disabled csrf filter can expand attack surface if endpoint assumptions drift.
|
|
99
|
-
- [Observed | Medium] Risk: Dynamic route generation from controller directory can unintentionally expose actions when naming/visibility controls are inconsistent.
|
|
100
|
-
- [Observed | Medium] Risk: No first-party automated tests detected; regression detection relies heavily on manual QA.
|
|
101
|
-
- [Observed | Medium] Risk: Payment integration TLS options in legacy library code require review before production hardening.
|
|
102
|
-
|
|
103
|
-
## 12. Top 10 Evidence Items
|
|
104
|
-
|
|
105
|
-
1. [Observed | High] CI4 runtime and minimum PHP: `index.php` (`$minPhpVersion = '8.1'`, `Boot::bootWeb`).
|
|
106
|
-
2. [Observed | High] Application version and CSRF exclusion baseline: `app/Config/Rise.php`.
|
|
107
|
-
3. [Observed | High] Dynamic core route registration: `app/Config/Routes.php` (controller directory scan).
|
|
108
|
-
4. [Observed | High] Plugin loading at bootstrap and hook init: `app/Config/Events.php` + `app/Config/Autoload.php`.
|
|
109
|
-
5. [Observed | High] Hook/lifecycle extension APIs: `app/Helpers/plugin_helper.php`.
|
|
110
|
-
6. [Observed | High] Data Builder bootstrap and menu/CSRF integration: `plugins/data_builder/index.php`.
|
|
111
|
-
7. [Observed | High] Full API route map (REST/GraphQL/docs/webhooks): `plugins/data_builder/config/Routes.php`.
|
|
112
|
-
8. [Observed | High] Middleware security pipeline wiring: `plugins/data_builder/Controllers/Db_api_base.php` + `Libraries/api/middleware/*`.
|
|
113
|
-
9. [Observed | High] Webhook dispatch architecture and delivery logging: `WebhookEventBus.php`, `channels/HttpChannel.php`, `Webhooks.php`.
|
|
114
|
-
10. [Observed | High] Persistent schema for tokens/logs/rate/webhooks: `plugins/data_builder/install/database.sql` and `migrations/200_version_200.php`.
|
|
115
|
-
|
|
116
|
-
## 13. Unknowns and Verification Plan
|
|
117
|
-
|
|
118
|
-
- [Assumed | Medium] Production deployment topology (single node vs load-balanced) is unknown. Verify by reviewing web server/proxy configs and session stickiness behavior.
|
|
119
|
-
- [Assumed | Medium] Secret management policy (env vars vs DB settings) is unclear. Verify by tracing `get_setting()` storage/encryption and backup handling.
|
|
120
|
-
- [Assumed | Medium] Real traffic/performance envelope for `/api/v1` and GraphQL is unknown. Verify with load tests and DB slow query profiling.
|
|
121
|
-
- [Assumed | Medium] Permission boundary correctness for every Data Builder admin screen is not fully proven. Verify via role-matrix test plan across non-admin staff.
|
|
122
|
-
- [Assumed | Low] Historical Laravel source parity requirements are not represented in this repo. Verify against external migration spec/change log.
|
|
123
|
-
|
|
124
|
-
## 14. Recommended Next Actions (30/60/90 day)
|
|
125
|
-
|
|
126
|
-
- [30 days]
|
|
127
|
-
- [Observed | High] Create a regression smoke suite for critical paths: login, permissions, `/api/v1` read/write, GraphQL, webhook simulate/send, payment callbacks.
|
|
128
|
-
- [Observed | High] Tighten security baseline: review and minimize CSRF excludes; enable endpoint-level CSRF strategy documentation.
|
|
129
|
-
- [Observed | Medium] Patch legacy transport settings (e.g., PayPal cURL TLS verification path) and validate gateway callbacks end-to-end.
|
|
130
|
-
- [60 days]
|
|
131
|
-
- [Inferred | Medium] Refactor high-coupling controller bootstrap patterns by introducing slimmer service boundaries for new code.
|
|
132
|
-
- [Observed | Medium] Standardize response/error handling across plugin controllers to reduce direct `echo/json_encode` drift.
|
|
133
|
-
- [Observed | Medium] Add API contract tests from exported OpenAPI/Postman fixtures.
|
|
134
|
-
- [90 days]
|
|
135
|
-
- [Inferred | Medium] Introduce optional async job layer for webhook retries and heavy API tasks.
|
|
136
|
-
- [Inferred | Medium] Establish centralized observability pipeline (structured logs + metrics + alerts).
|
|
137
|
-
- [Inferred | Medium] Define upgrade-safe extension contracts (hook catalog, route policy, compatibility guidelines) for future modules.
|
|
1
|
+
## 1. Executive Summary
|
|
2
|
+
|
|
3
|
+
- [Observed | High] The codebase is a CodeIgniter 4 monolith with plugin-based extensibility. Evidence: `index.php` (`$minPhpVersion = '8.1'`, `CodeIgniter\Boot::bootWeb()`), core app in `app/`, plugins in `plugins/`.
|
|
4
|
+
- [Observed | High] `data_builder` is deeply integrated as a first-class plugin providing REST, GraphQL, API token management, webhooks, and public API docs/sandbox flows. Evidence: `plugins/data_builder/index.php`, `plugins/data_builder/config/Routes.php`, controllers `Db_resources`, `Db_graphql`, `Public_api_docs`, `Webhooks`.
|
|
5
|
+
- [Observed | High] Runtime coupling is high because base controllers preload many models and settings globally. Evidence: `app/Controllers/App_Controller.php` (`get_models_array()` and eager model loading), `app/Controllers/Security_Controller.php`.
|
|
6
|
+
- [Inferred | Medium] Integration readiness is strong for API-first extensions, but operational hardening is uneven due broad CSRF exclusions and mixed legacy compatibility layers. Evidence: `app/Config/Filters.php`, `app/Config/Rise.php`, `plugins/data_builder/Helpers/*CI3*` wrappers.
|
|
7
|
+
- [Assumed | Low] This repository is the Rise CRM target for migration/integration work from another stack; direct Laravel runtime artifacts are not present. Evidence: missing `artisan`, `bootstrap/app.php`, `routes/web.php` in repo root.
|
|
8
|
+
|
|
9
|
+
## 2. Technology Profile
|
|
10
|
+
|
|
11
|
+
- [Observed | High] Language/runtime: PHP with CodeIgniter 4 bootstrap, minimum PHP 8.1. Evidence: `index.php`.
|
|
12
|
+
- [Observed | High] Application versioning is managed in Rise config (`3.9.6`). Evidence: `app/Config/Rise.php` (`app_settings_array['app_version']`).
|
|
13
|
+
- [Observed | High] Default data store is MySQL via MySQLi with DB prefix `rise_`. Evidence: `app/Config/Database.php` (`DBDriver = MySQLi`, `DBPrefix = rise_`).
|
|
14
|
+
- [Observed | High] Session persistence uses database-backed sessions (`ci_sessions`). Evidence: `app/Config/Session.php` (`DatabaseHandler`, `savePath = ci_sessions`).
|
|
15
|
+
- [Observed | High] Cache defaults to filesystem handler. Evidence: `app/Config/Cache.php` (`handler = file`).
|
|
16
|
+
- [Observed | High] Root dependency manifests are absent; dependency management is partially embedded (core `app/ThirdParty`) and partially plugin-local. Evidence: missing root `composer.json`/`package.json`; present `plugins/data_builder/composer.json`, `plugins/data_builder/package.json`, `app/ThirdParty/*`.
|
|
17
|
+
- [Observed | High] Data Builder adds GraphQL runtime dependency `webonyx/graphql-php` and frontend build toolchain (webpack/babel, Chart.js). Evidence: `plugins/data_builder/composer.json`, `plugins/data_builder/package.json`.
|
|
18
|
+
|
|
19
|
+
## 3. Repository Topology
|
|
20
|
+
|
|
21
|
+
- [Observed | High] Major root directories: `app`, `assets`, `plugins`, `system`, `writable`, `install`, `updates`, `_analytics`. Evidence: root directory listing.
|
|
22
|
+
- [Observed | High] Core MVC footprint is large (`app/Controllers`: 92 files, `app/Models`: 95 files), indicating mature monolith breadth. Evidence: file counts collected from `app/Controllers`, `app/Models`.
|
|
23
|
+
- [Observed | High] Data Builder plugin is modularized by concerns (`Controllers`, `Models`, `Libraries`, `Views`, `config`, `install`, `migrations`, `vendor`, `dist`). Evidence: `plugins/data_builder/*` structure.
|
|
24
|
+
- [Observed | High] Embedded third-party providers include Google, Stripe, Pusher, TCPDF, PhpSpreadsheet, reCAPTCHA. Evidence: `app/ThirdParty/*` directories.
|
|
25
|
+
|
|
26
|
+
## 4. Architecture and Dependency Flow
|
|
27
|
+
|
|
28
|
+
- [Observed | High] Boot flow: front controller -> CI bootstrap -> pre-system event -> plugin loading/hooks. Evidence: `index.php`; `app/Config/Events.php` (`Events::on('pre_system', ...)`, `load_plugin_indexes()`).
|
|
29
|
+
- [Observed | High] Activated plugins are auto-registered into PSR-4 namespaces at startup. Evidence: `app/Config/Autoload.php` (`load_activated_plugins()`).
|
|
30
|
+
- [Observed | High] Routing combines explicit routes and dynamic controller scanning at core level. Evidence: `app/Config/Routes.php` (directory scan of `app/Controllers`).
|
|
31
|
+
- [Observed | High] Data Builder routes are registered during plugin bootstrap and include both admin and public endpoints. Evidence: `plugins/data_builder/index.php` (`data_builder_register_routes()`), `plugins/data_builder/config/Routes.php`.
|
|
32
|
+
- [Observed | High] API controllers inherit a compatibility base that wraps CI4 services into CI3-style interfaces for legacy module code. Evidence: `plugins/data_builder/Controllers/Base_controller.php`, `plugins/data_builder/Helpers/CI3_Instance_Compat.php`.
|
|
33
|
+
- [Inferred | Medium] Dependency direction is mostly top-down (controllers -> models/libraries/helpers), but global helper and hook access patterns increase hidden coupling and side effects. Evidence: `app/Helpers/plugin_helper.php`, heavy global helper usage in controllers.
|
|
34
|
+
|
|
35
|
+
## 5. Coding Style and Conventions
|
|
36
|
+
|
|
37
|
+
- [Observed | High] Naming style is mixed legacy and modern (`snake_case` model names, CI-style controllers, namespaced classes). Evidence: `App_Controller.php`, `Permission_manager.php`, plugin `Db_*` classes.
|
|
38
|
+
- [Observed | High] Plugin code uses dense inline documentation and defensive runtime guards, especially in API middleware and webhook components. Evidence: `Db_api_base.php`, `Db_api_middleware.php`, `WebhookEventBus.php`.
|
|
39
|
+
- [Observed | Medium] Error handling strategy in Data Builder is centralized around structured API responses and an error registry. Evidence: `Db_api_response.php`, `ErrorRegistry.php`.
|
|
40
|
+
- [Observed | Medium] Core and plugin both rely on direct `echo/json_encode` and header operations in many controllers, reducing consistency with response abstractions. Evidence: multiple controller methods in `plugins/data_builder/Controllers/*` and core controllers.
|
|
41
|
+
- [Observed | High] No first-party test suite is present in repository root. Evidence: missing `tests/` directory and missing root phpunit config.
|
|
42
|
+
- [Inferred | Medium] Maintainability risk is elevated by mixed framework idioms (CI4 + CI3 compat layer) and very large base controllers.
|
|
43
|
+
|
|
44
|
+
## 6. Extension Points (Modules/Themes/Plugins/Hooks)
|
|
45
|
+
|
|
46
|
+
- [Observed | High] Plugin lifecycle hooks are available for install/activate/deactivate/uninstall/update. Evidence: `app/Helpers/plugin_helper.php` (`register_installation_hook`, `register_activation_hook`, etc.).
|
|
47
|
+
- [Observed | High] Data Builder uses lifecycle hooks to install schema and register routes. Evidence: `plugins/data_builder/index.php` hook registrations.
|
|
48
|
+
- [Observed | High] Core supports app-wide hook/filter injection via PHP-Hooks wrapper. Evidence: `app/Config/Events.php` (loads `PHP-Hooks`), `app/Helpers/plugin_helper.php` (`app_hooks()`).
|
|
49
|
+
- [Observed | High] UI extension point exists for admin sidebar composition through hook filters. Evidence: `plugins/data_builder/index.php` (`app_filter_staff_left_menu`).
|
|
50
|
+
- [Observed | Medium] CSRF exclusion patterns are extensible through filter hook and are modified by plugin at bootstrap. Evidence: `app/Config/Rise.php` constructor filter, `plugins/data_builder/index.php` add_filter for API/docs/embed URIs.
|
|
51
|
+
|
|
52
|
+
## 7. API and Interaction Surfaces
|
|
53
|
+
|
|
54
|
+
- [Observed | High] Public docs/UI surface: `/api_docs` with endpoint registry, code samples, Postman/OpenAPI export, and webhook simulator. Evidence: `plugins/data_builder/config/Routes.php`, `Public_api_docs.php`.
|
|
55
|
+
- [Observed | High] REST surface: `/api/v1/*` and alias `/data_builder/api/*` with resource, report, schema, and aggregate endpoints. Evidence: `plugins/data_builder/config/Routes.php`, `Db_resources.php`, `Db_views.php`.
|
|
56
|
+
- [Observed | High] GraphQL surface: `/api/v1/graphql` POST-only with depth/complexity controls and optional introspection restriction. Evidence: `Db_graphql.php`, `Libraries/api/Db_graphql_schema.php`.
|
|
57
|
+
- [Observed | High] Outbound webhook surface: subscription CRUD, test dispatch, live simulator, delivery logs. Evidence: `Webhooks.php`, `WebhookEventBus.php`, `HttpChannel.php`.
|
|
58
|
+
- [Observed | High] Inbound webhook surface exists in core for external systems (GitHub/Bitbucket/Stripe subscription events). Evidence: `app/Controllers/Webhooks_listener.php`.
|
|
59
|
+
- [Observed | Medium] Scheduled/background execution relies on HTTP-triggered cron controller, not a dedicated queue worker architecture. Evidence: `app/Controllers/Cron.php`.
|
|
60
|
+
|
|
61
|
+
## 8. Data Model and State Management
|
|
62
|
+
|
|
63
|
+
- [Observed | High] Core DB migrations/seeds are effectively empty placeholders (`.gitkeep`), while plugin owns explicit schema SQL and versioned migrations. Evidence: `app/Database/Migrations/.gitkeep`, `app/Database/Seeds/.gitkeep`, `plugins/data_builder/install/database.sql`, `plugins/data_builder/migrations/*`.
|
|
64
|
+
- [Observed | High] Data Builder persists API tokens, API logs, rate counters, report metadata, relations, and webhook subscriptions/logs in dedicated tables. Evidence: `plugins/data_builder/install/database.sql` (`data_builder_api_*`, `polydb_*` tables).
|
|
65
|
+
- [Observed | High] API write operations in Data Builder use transaction boundaries around mutating operations. Evidence: `Db_resources.php` (`trans_start`, `trans_complete`, rollback paths).
|
|
66
|
+
- [Observed | Medium] Table prefix abstraction is consistently applied (`db_prefix()`), aiding multi-install portability. Evidence: plugin migration/install scripts and helper wrappers.
|
|
67
|
+
- [Inferred | Medium] Data consistency is generally robust within single-request CRUD paths; cross-module consistency depends on model hooks and side effects not centrally orchestrated.
|
|
68
|
+
|
|
69
|
+
## 9. Security Posture
|
|
70
|
+
|
|
71
|
+
- [Observed | High] Core authentication/authorization is session-centric with role/permission gates in `Security_Controller` and `Permission_manager`. Evidence: `app/Controllers/Security_Controller.php`, `app/Libraries/Permission_manager.php`.
|
|
72
|
+
- [Observed | High] Data Builder API applies an explicit middleware chain: DDoS shield, CORS, admin-session bypass, auth gate, rate limiter, scope verifier, request logger. Evidence: `Db_api_base.php`, `Db_api_middleware.php`, middleware classes.
|
|
73
|
+
- [Observed | High] API token security includes scopes, table/view constraints, per-table CRUD permissions, HMAC signature validation, and anti-replay timestamp window. Evidence: `AuthGateMiddleware.php`, `ScopeVerifierMiddleware.php`, token schema in migrations.
|
|
74
|
+
- [Observed | High] API observability includes two-phase request logging and sensitive-field redaction. Evidence: `RequestLoggerMiddleware.php`, `Api_log_finalizer.php`, `Log_redactor.php`.
|
|
75
|
+
- [Observed | High] Public webhook simulator includes SSRF guard against localhost/private/reserved targets. Evidence: `Public_api_docs.php` (`_validate_webhook_simulator_target`, `_is_public_ip`).
|
|
76
|
+
- [Observed | Medium] CSRF filter is not globally enabled and relies on exclusion lists and endpoint-specific handling. Evidence: `app/Config/Filters.php` (`'csrf'` commented), `app/Config/Rise.php` exclusions, plugin-added exclusions in `plugins/data_builder/index.php`.
|
|
77
|
+
- [Observed | Medium] Core payment library code contains TLS verification disabled in some cURL paths, which is a material transport-security risk if unchanged in production. Evidence: `app/Libraries/Paypal.php` (`CURLOPT_SSL_VERIFYPEER => false`).
|
|
78
|
+
|
|
79
|
+
## 10. Integration Capability Matrix
|
|
80
|
+
|
|
81
|
+
| Domain | Entry Points | Required Adapters | Complexity | Risks | Confidence |
|
|
82
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------- | ---------------------------------------------------------------- | ---------- |
|
|
83
|
+
| External APIs | Core:`Google_api`, `Microsoft_api`, `Webhooks_listener`; Plugin: `/api/v1/*`, `/api_docs`, outbound webhooks | OAuth credential storage, API token issuance, endpoint-specific mappers | Medium | Credential sprawl, route exposure, vendor API drift | High |
|
|
84
|
+
| Authentication/SSO | Session auth in `Security_Controller`; token auth + HMAC in `AuthGateMiddleware` | Optional IdP bridge (OIDC/SAML) and token broker if enterprise SSO required | Medium-High | Mixed session/token contexts, bypass misconfiguration | Medium |
|
|
85
|
+
| Payment | `Paypal_redirect`, `Stripe_redirect`, `Paytm_redirect`, payment libraries | Payment gateway credential hardening, webhook signature verification standardization | Medium | TLS/cURL settings inconsistency, callback abuse if misconfigured | Medium |
|
|
86
|
+
| Messaging/Queue | Pusher integration (`Pusher_connect`), HTTP cron (`Cron`), webhook dispatch | Optional queue worker (Redis/RabbitMQ/SQS) for async retries/backoff | Medium | No first-class queue abstraction for heavy burst workloads | Medium |
|
|
87
|
+
| Storage/CDN | File/cache/session paths via `writable/`, `files/`, cache config | Object storage adapter (S3-compatible), CDN URL rewriting, signed URL strategy | Medium | Local disk coupling and backup/retention variability | Medium |
|
|
88
|
+
| Observability | API logs, webhook logs, activity logs, debug toolbar | Log shipping (ELK/Loki), metrics exporter, alert rules | Low-Medium | Fragmented telemetry across subsystems | High |
|
|
89
|
+
| Admin/UI customization | Hook/filter system (`app_hooks()`), plugin menu injection, plugin routes/views | Theme/view override conventions, stricter UI extension contracts | Low | Hook ordering collisions and undocumented custom hooks | High |
|
|
90
|
+
| Content/data migration | Plugin SQL installer + migrations, API docs export (Postman/OpenAPI), builder/template persistence | ETL scripts, schema-diff tooling, migration playbooks | Medium-High | Limited root migration automation and weak test safety net | Medium |
|
|
91
|
+
|
|
92
|
+
## 11. Strengths, Weaknesses, Risks
|
|
93
|
+
|
|
94
|
+
- [Observed | High] Strength: Clear plugin extensibility model with lifecycle hooks and route/menu injection points. Mitigation leverage: continue shipping new modules as plugins to reduce core edits.
|
|
95
|
+
- [Observed | High] Strength: Data Builder API stack includes practical hardening features (rate limit, HMAC, scope checks, log redaction).
|
|
96
|
+
- [Observed | Medium] Weakness: Core controller layer is monolithic and preloads many dependencies, increasing bootstrap cost and change blast radius.
|
|
97
|
+
- [Observed | Medium] Weakness: Mixed CI4 + CI3 compatibility layer increases cognitive load and future upgrade complexity.
|
|
98
|
+
- [Observed | Medium] Risk: Broad CSRF exclusions and globally disabled csrf filter can expand attack surface if endpoint assumptions drift.
|
|
99
|
+
- [Observed | Medium] Risk: Dynamic route generation from controller directory can unintentionally expose actions when naming/visibility controls are inconsistent.
|
|
100
|
+
- [Observed | Medium] Risk: No first-party automated tests detected; regression detection relies heavily on manual QA.
|
|
101
|
+
- [Observed | Medium] Risk: Payment integration TLS options in legacy library code require review before production hardening.
|
|
102
|
+
|
|
103
|
+
## 12. Top 10 Evidence Items
|
|
104
|
+
|
|
105
|
+
1. [Observed | High] CI4 runtime and minimum PHP: `index.php` (`$minPhpVersion = '8.1'`, `Boot::bootWeb`).
|
|
106
|
+
2. [Observed | High] Application version and CSRF exclusion baseline: `app/Config/Rise.php`.
|
|
107
|
+
3. [Observed | High] Dynamic core route registration: `app/Config/Routes.php` (controller directory scan).
|
|
108
|
+
4. [Observed | High] Plugin loading at bootstrap and hook init: `app/Config/Events.php` + `app/Config/Autoload.php`.
|
|
109
|
+
5. [Observed | High] Hook/lifecycle extension APIs: `app/Helpers/plugin_helper.php`.
|
|
110
|
+
6. [Observed | High] Data Builder bootstrap and menu/CSRF integration: `plugins/data_builder/index.php`.
|
|
111
|
+
7. [Observed | High] Full API route map (REST/GraphQL/docs/webhooks): `plugins/data_builder/config/Routes.php`.
|
|
112
|
+
8. [Observed | High] Middleware security pipeline wiring: `plugins/data_builder/Controllers/Db_api_base.php` + `Libraries/api/middleware/*`.
|
|
113
|
+
9. [Observed | High] Webhook dispatch architecture and delivery logging: `WebhookEventBus.php`, `channels/HttpChannel.php`, `Webhooks.php`.
|
|
114
|
+
10. [Observed | High] Persistent schema for tokens/logs/rate/webhooks: `plugins/data_builder/install/database.sql` and `migrations/200_version_200.php`.
|
|
115
|
+
|
|
116
|
+
## 13. Unknowns and Verification Plan
|
|
117
|
+
|
|
118
|
+
- [Assumed | Medium] Production deployment topology (single node vs load-balanced) is unknown. Verify by reviewing web server/proxy configs and session stickiness behavior.
|
|
119
|
+
- [Assumed | Medium] Secret management policy (env vars vs DB settings) is unclear. Verify by tracing `get_setting()` storage/encryption and backup handling.
|
|
120
|
+
- [Assumed | Medium] Real traffic/performance envelope for `/api/v1` and GraphQL is unknown. Verify with load tests and DB slow query profiling.
|
|
121
|
+
- [Assumed | Medium] Permission boundary correctness for every Data Builder admin screen is not fully proven. Verify via role-matrix test plan across non-admin staff.
|
|
122
|
+
- [Assumed | Low] Historical Laravel source parity requirements are not represented in this repo. Verify against external migration spec/change log.
|
|
123
|
+
|
|
124
|
+
## 14. Recommended Next Actions (30/60/90 day)
|
|
125
|
+
|
|
126
|
+
- [30 days]
|
|
127
|
+
- [Observed | High] Create a regression smoke suite for critical paths: login, permissions, `/api/v1` read/write, GraphQL, webhook simulate/send, payment callbacks.
|
|
128
|
+
- [Observed | High] Tighten security baseline: review and minimize CSRF excludes; enable endpoint-level CSRF strategy documentation.
|
|
129
|
+
- [Observed | Medium] Patch legacy transport settings (e.g., PayPal cURL TLS verification path) and validate gateway callbacks end-to-end.
|
|
130
|
+
- [60 days]
|
|
131
|
+
- [Inferred | Medium] Refactor high-coupling controller bootstrap patterns by introducing slimmer service boundaries for new code.
|
|
132
|
+
- [Observed | Medium] Standardize response/error handling across plugin controllers to reduce direct `echo/json_encode` drift.
|
|
133
|
+
- [Observed | Medium] Add API contract tests from exported OpenAPI/Postman fixtures.
|
|
134
|
+
- [90 days]
|
|
135
|
+
- [Inferred | Medium] Introduce optional async job layer for webhook retries and heavy API tasks.
|
|
136
|
+
- [Inferred | Medium] Establish centralized observability pipeline (structured logs + metrics + alerts).
|
|
137
|
+
- [Inferred | Medium] Define upgrade-safe extension contracts (hook catalog, route policy, compatibility guidelines) for future modules.
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "php-laravel-botble",
|
|
3
|
-
"name": "Botble CMS",
|
|
4
|
-
"runtime": "php",
|
|
5
|
-
"runtimeVersion": "^8.3|^8.4",
|
|
6
|
-
"framework": "laravel",
|
|
7
|
-
"frameworkVersion": "^13.0",
|
|
8
|
-
"cms": "botble",
|
|
9
|
-
"cmsType": "modular-monolith",
|
|
10
|
-
"description": "Laravel-based modular CMS with plugin/theme architecture and WordPress-style hooks",
|
|
11
|
-
"keyFeatures": [
|
|
12
|
-
"Plugin/Theme architecture via platform/ directory",
|
|
13
|
-
"WordPress-style hook system (add_filter/add_action/apply_filters/do_action)",
|
|
14
|
-
"Sanctum API authentication",
|
|
15
|
-
"Multi-cloud media storage drivers (s3/r2/wasabi/bunnycdn/do_spaces/backblaze)",
|
|
16
|
-
"Data synchronize import/export tooling",
|
|
17
|
-
"Composer merge plugin for plugin/theme dependencies",
|
|
18
|
-
"Module-based repository pattern with DI",
|
|
19
|
-
"Admin extension via AdminHelper::registerRoutes"
|
|
20
|
-
],
|
|
21
|
-
"directorySignature": [
|
|
22
|
-
"platform/core",
|
|
23
|
-
"platform/packages",
|
|
24
|
-
"platform/plugins",
|
|
25
|
-
"platform/themes"
|
|
26
|
-
],
|
|
27
|
-
"composerSignature": [
|
|
28
|
-
"botble",
|
|
29
|
-
"wikimedia/composer-merge-plugin"
|
|
30
|
-
],
|
|
31
|
-
"typicalPlugins": [
|
|
32
|
-
"analytics", "audit-log", "backup", "block", "blog",
|
|
33
|
-
"captcha", "contact", "cookie-consent", "custom-field",
|
|
34
|
-
"gallery", "language", "language-advanced", "member",
|
|
35
|
-
"request-log", "social-login", "translation"
|
|
36
|
-
],
|
|
37
|
-
"analysisFile": "structure.md",
|
|
38
|
-
"lastUpdated": "2026-04-04"
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "php-laravel-botble",
|
|
3
|
+
"name": "Botble CMS",
|
|
4
|
+
"runtime": "php",
|
|
5
|
+
"runtimeVersion": "^8.3|^8.4",
|
|
6
|
+
"framework": "laravel",
|
|
7
|
+
"frameworkVersion": "^13.0",
|
|
8
|
+
"cms": "botble",
|
|
9
|
+
"cmsType": "modular-monolith",
|
|
10
|
+
"description": "Laravel-based modular CMS with plugin/theme architecture and WordPress-style hooks",
|
|
11
|
+
"keyFeatures": [
|
|
12
|
+
"Plugin/Theme architecture via platform/ directory",
|
|
13
|
+
"WordPress-style hook system (add_filter/add_action/apply_filters/do_action)",
|
|
14
|
+
"Sanctum API authentication",
|
|
15
|
+
"Multi-cloud media storage drivers (s3/r2/wasabi/bunnycdn/do_spaces/backblaze)",
|
|
16
|
+
"Data synchronize import/export tooling",
|
|
17
|
+
"Composer merge plugin for plugin/theme dependencies",
|
|
18
|
+
"Module-based repository pattern with DI",
|
|
19
|
+
"Admin extension via AdminHelper::registerRoutes"
|
|
20
|
+
],
|
|
21
|
+
"directorySignature": [
|
|
22
|
+
"platform/core",
|
|
23
|
+
"platform/packages",
|
|
24
|
+
"platform/plugins",
|
|
25
|
+
"platform/themes"
|
|
26
|
+
],
|
|
27
|
+
"composerSignature": [
|
|
28
|
+
"botble",
|
|
29
|
+
"wikimedia/composer-merge-plugin"
|
|
30
|
+
],
|
|
31
|
+
"typicalPlugins": [
|
|
32
|
+
"analytics", "audit-log", "backup", "block", "blog",
|
|
33
|
+
"captcha", "contact", "cookie-consent", "custom-field",
|
|
34
|
+
"gallery", "language", "language-advanced", "member",
|
|
35
|
+
"request-log", "social-login", "translation"
|
|
36
|
+
],
|
|
37
|
+
"analysisFile": "structure.md",
|
|
38
|
+
"lastUpdated": "2026-04-04"
|
|
39
|
+
}
|