Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -29,5 +29,6 @@
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "npx -y @owloops/claude-powerline@latest --style=powerline"
|
||||
}
|
||||
},
|
||||
"outputStyle": "jacek"
|
||||
}
|
||||
|
||||
32
.vscode/ftp-kr.sync.cache.json
vendored
32
.vscode/ftp-kr.sync.cache.json
vendored
@@ -323,7 +323,7 @@
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 3891,
|
||||
"size": 4210,
|
||||
"lmtime": 1771198110809,
|
||||
"modified": true
|
||||
},
|
||||
@@ -622,15 +622,15 @@
|
||||
"products": {
|
||||
"main_view.php": {
|
||||
"type": "-",
|
||||
"size": 49238,
|
||||
"lmtime": 1771441425576,
|
||||
"size": 64362,
|
||||
"lmtime": 1771717398898,
|
||||
"modified": false
|
||||
},
|
||||
"product_history.php": {
|
||||
"type": "-",
|
||||
"size": 13214,
|
||||
"lmtime": 1769467103988,
|
||||
"modified": true
|
||||
"size": 13326,
|
||||
"lmtime": 1771717401282,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"site": {
|
||||
@@ -656,8 +656,8 @@
|
||||
"campaigns": {
|
||||
"main_view.php": {
|
||||
"type": "-",
|
||||
"size": 20532,
|
||||
"lmtime": 1771626632932,
|
||||
"size": 21607,
|
||||
"lmtime": 1771717394441,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
@@ -678,8 +678,8 @@
|
||||
"campaign_terms": {
|
||||
"main_view.php": {
|
||||
"type": "-",
|
||||
"size": 81281,
|
||||
"lmtime": 1771441788473,
|
||||
"size": 81511,
|
||||
"lmtime": 1771717410322,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
@@ -694,8 +694,16 @@
|
||||
"facebook_ads": {
|
||||
"main_view.php": {
|
||||
"type": "-",
|
||||
"size": 10785,
|
||||
"lmtime": 1771619352316,
|
||||
"size": 10806,
|
||||
"lmtime": 1771717403326,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"logs": {
|
||||
"main_view.php": {
|
||||
"type": "-",
|
||||
"size": 5948,
|
||||
"lmtime": 1771717396318,
|
||||
"modified": false
|
||||
}
|
||||
}
|
||||
|
||||
45
AGENTS.md
45
AGENTS.md
@@ -1,45 +0,0 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
adsPRO is a custom PHP MVC app. Keep business logic in:
|
||||
- `autoload/controls/` (`class.*.php`): request handling (`\controls\*`)
|
||||
- `autoload/factory/` (`class.*.php`): DB access via Medoo (`\factory\*`)
|
||||
- `autoload/view/` (`class.*.php`): view composition (`\view\*`)
|
||||
- `autoload/services/`: external integrations (Google Ads, OpenAI, Claude)
|
||||
- `templates/`: PHP templates rendered with `\Tpl::view()`
|
||||
- `migrations/`: SQL migrations (`NNN_description.sql` + optional `demo_data.sql`)
|
||||
- `layout/`: SCSS/CSS assets (`style.scss` -> `style.css`)
|
||||
|
||||
Main entry points are `index.php`, `ajax.php`, `api.php`, `cron.php`, and `install.php`.
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
- `php -S 127.0.0.1:8000` - run a local PHP server from repo root.
|
||||
- `php install.php` - apply pending DB migrations.
|
||||
- `php install.php --with_demo` - apply migrations and demo data.
|
||||
- `php install.php --force` - re-apply tracked migrations.
|
||||
- `php -l autoload/controls/class.Campaigns.php` - lint a changed PHP file.
|
||||
|
||||
There is no dedicated build pipeline; frontend dependencies are committed in `libraries/`. SCSS is typically compiled via VS Code Live Sass Compiler.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
- Follow existing PHP style: spaces inside parentheses (`if ( $x )`), braces on new lines.
|
||||
- Use `PascalCase` class names, lowercase namespaces (`\controls`, `\factory`), and `snake_case` for methods/variables/DB columns.
|
||||
- Controllers/factories are conventionally `static public function ...`.
|
||||
- Keep route/module naming aligned with URL pattern `/module/action/...`.
|
||||
|
||||
## Testing Guidelines
|
||||
No first-party automated test suite is maintained in this repo. Validate changes with:
|
||||
- PHP lint on edited files.
|
||||
- Manual UI checks for affected `templates/` views.
|
||||
- Endpoint checks for `ajax.php`, `api.php`, or `cron.php` paths you touched.
|
||||
- Migration dry run on a non-production database when schema is changed.
|
||||
|
||||
Document manual test steps and outcomes in each PR.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
- Use concise Polish commit messages with prefixes seen in history: `feat:`, `fix:`, `update:`.
|
||||
- Keep commits focused (feature, refactor, migration, UI tweak).
|
||||
- PRs should include: scope summary, linked issue/task, migration notes, manual test checklist, and screenshots for UI changes.
|
||||
|
||||
## Security & Configuration Tips
|
||||
`config.php` contains environment credentials. Do not introduce new secrets in commits or PR discussions, and treat any credential change as a coordinated ops task.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user