update
This commit is contained in:
44
.serena/memories/project_overview.md
Normal file
44
.serena/memories/project_overview.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Project Overview: pomysloweprezenty.pl
|
||||
|
||||
## Purpose
|
||||
Polish e-commerce website (gift shop) - a custom-built online store at pomysloweprezenty.pl.
|
||||
|
||||
## Tech Stack
|
||||
- **Language**: PHP (no framework, custom MVC-like architecture)
|
||||
- **Database**: MySQL via RedBeanPHP ORM (`\R::`) and Medoo query builder
|
||||
- **Email**: PHPMailer
|
||||
- **Caching**: Redis (optional)
|
||||
- **Frontend**: PHP templates, SCSS for admin styles, vanilla JavaScript
|
||||
- **Libraries**: Included directly in `/libraries/` (no Composer)
|
||||
- **Server**: Apache (.htaccess files present)
|
||||
|
||||
## Architecture
|
||||
- **`autoload/`** - Core PHP classes (auto-loaded via custom spl_autoload_register)
|
||||
- `Domain/` - Business logic repositories (Article, Product, Category, Order, Client, etc.)
|
||||
- `admin/Controllers/` - Admin panel controllers
|
||||
- `admin/ViewModels/` - View models for admin forms and tables
|
||||
- `admin/Support/` - Form handling, table list support
|
||||
- `api/` - REST API router and controllers
|
||||
- `front/` - Frontend app, controllers, views, layout engine
|
||||
- `Shared/` - Helpers, Cache, Email, HTML, Image, Template engine
|
||||
- **`admin/`** - Admin panel (templates, JS, AJAX handlers, styles)
|
||||
- **`templates/`** - Frontend templates (shop, articles, basket, client, etc.)
|
||||
- **`templates_user/`** - User-customizable templates
|
||||
- **`libraries/`** - Third-party libraries (medoo, RedBeanPHP, PHPMailer)
|
||||
- **`cron/`** - Cron job scripts
|
||||
- **`plugins/`** - Plugin system
|
||||
|
||||
## Entry Points
|
||||
- `index.php` - Main frontend entry point
|
||||
- `admin/index.php` - Admin panel
|
||||
- `api.php` - API entry point
|
||||
- `ajax.php` - AJAX handler (frontend)
|
||||
- `admin/ajax.php` - AJAX handler (admin)
|
||||
- `cron.php` - Cron jobs entry point
|
||||
|
||||
## Key Patterns
|
||||
- Repositories pattern for data access (e.g., `ProductRepository`, `OrderRepository`)
|
||||
- PHP templates with `Tpl` engine for rendering
|
||||
- Admin uses form-edit and table-list component patterns
|
||||
- Session-based authentication with IP validation
|
||||
- Timezone: Europe/Warsaw
|
||||
28
.serena/memories/style_and_conventions.md
Normal file
28
.serena/memories/style_and_conventions.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Code Style and Conventions
|
||||
|
||||
## PHP Style
|
||||
- Spaces around brackets in array access: `$_SESSION[ 'key' ]`, `$array[ 'field' ]`
|
||||
- Spaces inside parentheses: `function( $param )`, `if ( condition )`
|
||||
- Opening braces on new line for functions/classes
|
||||
- Opening braces on same line for control structures (mixed - some on new line)
|
||||
- No type hints on most functions (legacy codebase)
|
||||
- No docblocks on most methods
|
||||
- camelCase for methods, PascalCase for classes
|
||||
- File naming: `class.ClassName.php` for autoloaded classes, regular names for others
|
||||
|
||||
## Naming Conventions
|
||||
- Controllers: `{Entity}Controller.php` (e.g., `ShopProductController.php`)
|
||||
- Repositories: `{Entity}Repository.php` (e.g., `ProductRepository.php`)
|
||||
- Views: `{Entity}.php` in `Views/` directory
|
||||
- Templates: kebab-case directories (e.g., `shop-product/`, `shop-basket/`)
|
||||
- Admin templates: organized by feature in `admin/templates/`
|
||||
|
||||
## Database
|
||||
- RedBeanPHP ORM with `\R::` facade
|
||||
- Medoo for complex queries via `$mdb`
|
||||
- Tables use snake_case naming
|
||||
|
||||
## Frontend
|
||||
- SCSS compiled to CSS in admin (`style.scss` -> `style.css`)
|
||||
- Vanilla JavaScript (no build system, no npm/node)
|
||||
- jQuery likely used in admin panel
|
||||
26
.serena/memories/suggested_commands.md
Normal file
26
.serena/memories/suggested_commands.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Suggested Commands
|
||||
|
||||
## System (Windows with Git Bash)
|
||||
- `git` - version control
|
||||
- `ls`, `cd`, `grep`, `find` - standard Unix utils via Git Bash
|
||||
|
||||
## Development
|
||||
- No build system or package manager (no Composer, no npm)
|
||||
- PHP files are edited directly and served by Apache
|
||||
- SCSS needs manual compilation for admin styles (`admin/layout/style-scss/style.scss`)
|
||||
|
||||
## Testing
|
||||
- No automated test framework detected
|
||||
- Manual testing via browser
|
||||
|
||||
## Deployment
|
||||
- FTP-based deployment (`.vscode/ftp-kr.sync.cache.json` in gitignore suggests VS Code FTP extension)
|
||||
|
||||
## Cron
|
||||
- `cron.php` - main cron entry point
|
||||
- `cron-turstmate.php` - Trustmate integration cron
|
||||
|
||||
## Notes
|
||||
- No linter or formatter configured
|
||||
- No CI/CD pipeline detected
|
||||
- Changes are tested manually on the live/staging server
|
||||
11
.serena/memories/task_completion_checklist.md
Normal file
11
.serena/memories/task_completion_checklist.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Task Completion Checklist
|
||||
|
||||
When completing a task in this project:
|
||||
|
||||
1. **Code style**: Follow existing spacing conventions (spaces inside brackets/parentheses)
|
||||
2. **No build step**: PHP changes take effect immediately (no compilation needed, except SCSS)
|
||||
3. **SCSS**: If admin styles were changed, SCSS needs to be recompiled
|
||||
4. **Test manually**: No automated tests - verify changes work by describing what to test in browser
|
||||
5. **Database**: If DB schema changes are needed, document them (no migration system)
|
||||
6. **Git**: Commit changes with descriptive message
|
||||
7. **Security**: Be careful with SQL queries, XSS, and session handling
|
||||
Reference in New Issue
Block a user