Files
adsPRO/.paul/codebase/overview.md
2026-05-06 23:19:35 +02:00

2.5 KiB

adsPRO — Codebase Overview

Generated: 2026-05-06

What it is

adsPRO is a PHP web application for managing Google Ads, Facebook Ads, and Google Merchant Center campaigns. It tracks performance (ROAS, budgets, conversions), manages product feeds, and provides AI-powered suggestions (OpenAI / Claude / Gemini) for product titles and descriptions. UI in Polish, timezone Europe/Warsaw.

At a glance

Aspect Value
Language PHP (no framework, custom MVC-like)
Database MySQL via Medoo ORM ($mdb) + RedBeanPHP (\R::) in legacy paths
Frontend jQuery 3.6, Bootstrap 5, DataTables 2.1.7, Highcharts, Select2, FontAwesome 6.5.1
Build SCSS → CSS (manual); no Composer, no npm
Tests None (manual tmp/debug_*.php scripts)
CI/CD None

Entry points

  • index.php — main router, autoloader, auth, request dispatch
  • ajax.php — AJAX endpoints, session+IP binding
  • api.php — external API endpoints (~1350 lines, RedBeanPHP)
  • cron.php — legacy cron (task reminders, recurring tasks)
  • /cron/* routes (via index.php) — modern cron pipelines

Layered structure

  • autoload/controls/ — Controllers (static methods, read params via \S::get())
  • autoload/factory/ — Data access (static, uses global $mdb)
  • autoload/services/ — External API integrations
  • autoload/view/ — Thin view helpers wrapping \Tpl::view()
  • templates/{module}/ — PHP templates accessed via $this->varName
  • migrations/ — Numbered SQL files, tracked in schema_migrations table

Key base classes

Class File Purpose
\S autoload/class.S.php Params (get), session, alerts, email, currency formatting
\Tpl autoload/class.Tpl.php Template engine (looks in templates_user/ then templates/)
\DbModel autoload/class.DbModel.php Active Record base
\Cache autoload/class.Cache.php File-based cache in temp/

Documents in this map