BestDigitalCard changelog
Design and Developed by MediaByteX

v1.0.3
    - Documentation and listing consistency: database/database.sql is
      described everywhere as "tables, plans, settings — no default
      accounts". The 4 dummy cards, demo customer and coupon WELCOME20
      are described only as the OPTIONAL database/demo-data.sql, imported
      by the installer only when "Install demo content" is ticked (off by
      default) or imported manually.
    - Installer form and success page name exactly what demo-data.sql adds.
    - database.sql header states explicitly that it contains no demo cards,
      no demo customer and no coupons.
    - Historical v1.0.0 changelog entries annotated to point to the v1.0.2
      split of demo content into demo-data.sql.
    - Minimum PHP version corrected to 8.1 in the docs and the installer
      check (the code uses PHP 8.1 syntax; tested on PHP 8.3 and 8.4).
    - No application logic or database schema changes from v1.0.2 (upgrading from
      v1.0.2 needs no SQL import).

v1.0.2
    - Admin session revocation: core/Middleware/auth-admin.php re-loads the
      administrator from the database on every authenticated request. The
      account must exist, be active, hold the super/admin role and still
      have the password it signed in with; otherwise the session is
      destroyed immediately (redirect to login, HTTP 401 JSON for AJAX).
      The role is refreshed from the database on every request.
    - Transactional, idempotent payments: Razorpay and Cashfree webhooks
      and the browser return flows fulfil an order in ONE database
      transaction with a row lock (SELECT ... FOR UPDATE). Subscription,
      transaction record, user plan, coupon usage and order status commit
      together or roll back together. The intermediate 'processing' state
      was removed, failed attempts are retried safely, and a plan is
      granted exactly once (new core/Helpers/payments.php, unique keys on
      subscriptions.razorpay_order_id / cashfree_order_id).
    - No default administrator credentials: database.sql no longer contains
      an admin account or any password. The web installer requires a
      unique strong admin password (typed twice). Manual installs create
      the first admin with the one-time install/create-admin.php (CLI, or
      browser protected by a SETUP_TOKEN in .env). Demo content moved to
      optional database/demo-data.sql (installer checkbox, off by default,
      random demo password shown once).
    - Installer lock: the installed.lock write is checked and verified; a
      failure is reported as an error, never as success. Second safeguard:
      the installer refuses to run when the database already contains an
      administrator or the installed_at flag, even if the lock is deleted.
    - Strong-password rule for admins created or changed in Admin → Admins.
    - New database/upgrade-1.0.2.sql for existing installs.

v1.0.1
    - Super-admin gate on admin account management
    - require_super_admin() now runs at the start of the save_admin and
      delete_admin actions in core/ajax/admin-ajax.php (before POST data
      is read), and on the Admins page, with a live database role check
      so a demoted admin loses access immediately
    - Submitted admin roles are limited to "super" or "admin"
    - Removed unimplemented "WhatsApp lead alerts" and "Export to Excel"
      claims from the public landing page

v1.0.0
    - Initial public release
    - Web installer at /install/
    - Single MySQL dump: database/database.sql
    - Four dummy published cards and demo user (since v1.0.2 these are
      in the optional database/demo-data.sql, not in database.sql)
    - Admin panel, user panel, public landing and blog
    - Razorpay, Cashfree and manual UPI
    - SMTP mailer, cron jobs, HTML + text documentation
    - Product name BestDigitalCard, author MediaByteX
