Files
pomysloweprezenty.pl/.serena/memories/project_overview.md
2026-03-10 21:37:24 +01:00

1.9 KiB

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