Decisions & rationale
The reasoning behind the software
Decisions, constraints, assumptions, warnings, and discoveries — each connected to the functionality it explains. Repository memory supports the software model; it does not replace it.
Decisions
-
Administrator watermark bypass
Verified from sourceAdmins may queue jobs with watermark=0 to skip prompt branding instructions.
-
Credit deduction after successful completion
Verified from sourceWorkers consume an image credit after inserting arcana_renders; failure rolls back the render row.
-
Environment-file configuration
Verified from sourceSecrets and integration endpoints are loaded from a .env file via config/load_env.php.
Stripe checkout Transactional emails Local and Backblaze B2 storage
-
Feature flags on user records
Verified from sourcePlan capabilities are derived from users.plan_type via arcana.plan_tiers.php.
-
Filesystem image storage plus B2
Verified from sourceImages are stored under uploads/dble and uploaded to Backblaze B2 for public URLs.
-
Gemini as analysis and image provider
Verified from sourceSong analysis and image generation call Google Gemini generateContent APIs.
-
MySQL persistence
Verified from sourceApplication state lives in MySQL/MariaDB accessed primarily through PDO in auth_lib.
-
PHP 8.2 and shared-hosting compatibility
Verified from sourceArcana is built as plain PHP 8.2 pages runnable on XAMPP and Hostinger-style hosts without a Node build.
-
Queue-based rendering
Verified from sourceHTTP requests enqueue work; workers perform slow Gemini calls asynchronously.
-
Static and dynamic style systems
Verified from sourceStyles may be DB prompt fragments or a special ANALYZE_BAND_STYLE Gemini StyleMap path.
Constraints
-
Invite-only registration
Verified from sourceRegistration requires a code from access_codes.
-
PHP 8.2 shared hosting
Verified from sourceRuntime assumes PHP 8.2 with cron capability.
-
SMTP required for reliable mail flows
Verified from sourceVerification, reset, and gallery email prefer PHPMailer/SMTP; without it, mail() fallback is weak.
Assumptions
-
Active worker is parallel v3 dynamicstyle
Inferred from sourceProduction cron likely runs arcana.queue.processor.cron.parallel.v3.dynamicstyle.php because it has the broadest feature set.
-
Stripe tables provisioned externally
Not verifiedstripe_products and related tables exist in production even though CREATE is absent from the repo.
Warnings
-
access_codes schema missing in-repo
high Verified from sourceRegistration and admin settings depend on access_codes but no CREATE TABLE was found.
-
arcana_queue schema missing in-repo
high Verified from sourceActive queue table is assumed; only opportunistic ALTERs found.
-
credit_transactions schema mismatch
high Verified from sourceauth_lib CREATE columns differ from stripe_lib insert columns (transaction_type/subscription_id).
-
Debug/test utilities present in tree
high Verified from sourcepath.php, B2 debug/test, admin test, notification debug may be web-reachable.
-
Dual Stripe webhook implementations
medium Verified from sourcewebhook.php and arcana.stripe.endpoint.php both exist; live target uncertain.
-
Duplicate login pages
medium Verified from sourcearcana.login.php and login.php can diverge; auth_check defaults to login.php.
-
Email change skips re-verification
medium Verified from sourceAccount profile email updates do not reset email_verified.
-
user_notifications schema missing
medium Verified from sourceNotification system expects a table with no in-repo CREATE.
-
Password reset lacks rate limiting
medium Verified from sourceNo rate limiter observed on forgot-password requests.
-
Plan model inconsistency
medium Verified from sourceHelper supports three tiers; admin UI largely free/paid; some files check paid directly.
-
Possible double credit grant paths
medium Verified from sourcePurchase success page and webhooks can both attempt grants.
-
Suspended/banned status not enforced at login
high Verified from sourceusers.status can be set in admin but auth_attempt_login does not check it.
-
Stripe commerce tables missing CREATE
high Verified from sourcestripe_products, stripe_checkout_sessions, user_subscriptions referenced without creation scripts.
Discoveries
-
Dynamic band-style UI gap
Verified from sourceWorkers implement ANALYZE_BAND_STYLE but main generator default style key is empty.
-
Feedback uses mail() not SMTP client
Verified from sourceFeedback reads SMTP settings but sends via PHP mail().
-
cron.gpt.php uses Gemini
Verified from sourceDespite filename, processor.cron.gpt.php calls Gemini endpoints/models.
-
Multiple landing page variants
Verified from sourceindex.php, index.mobile.php, index.gemini.php, index.four.tiers.php coexist.
-
nowatermark worker still watermarks
Verified from sourcecron.nowatermark.php applies Imagick physical watermarks despite its name.
Changes
-
Queue worker script evolution
Verified from sourceMultiple versioned/named queue processors coexist (sequential, parallel, v3 dynamicstyle, gpt, nowatermark, backups).
Background render processing Parallel worker execution Dynamic band-style analysis
-
Hardcoded secrets removed in favor of placeholders
Inferred from sourceRecent repository history replaced hardcoded secrets with .env.example placeholders.
-
Rebootstrap onto current VibeKB tooling
Inferred from sourceReplaced the older custom static HTML guide workflow with the current VibeKB guide/tools, explainable diagrams, and generate-static.php snapshot under /docs.