Generated output — this is a static snapshot rendered from .vibekb/. The .vibekb/ content is the source of truth. See Reference for provenance.

Functionality index

Everything the software does

Functionality is the primary unit. Each item is something the software does, with its real status and how it was verified.

Clear

Accounts & authentication

Registration, login, email verification, password reset, and account profile management.

  • Invite-code registration creates a user, runs Turnstile, and sends an email verification link via SMTP/PHPMailer.

    Verification
    Verified from source
    Trigger
    Visitor submits POST to arcana.register.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Login and logout

    Implemented

    Email/username plus password login with email-verification gate; logout clears the session.

    Verification
    Verified from source
    Trigger
    POST to arcana.login.php or login.php; GET arcana.logout.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Tokenized email verification gates login until the user confirms their address.

    Verification
    Verified from source
    Trigger
    GET arcana.verify.php?token=...; resend via arcana.resend_verification.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Password reset

    Implemented

    Forgot-password flow emails a reset token and allows setting a new password.

    Verification
    Verified from source
    Trigger
    POST arcana.password.forgot.php; GET/POST arcana.password.reset.php?token=...
    Facing
    User-facing
    Updated
    2026-07-21
  • Logged-in users can update username/email and change password from arcana.account.php.

    Verification
    Verified from source
    Trigger
    GET/POST arcana.account.php with action update_profile or change_password.
    Facing
    User-facing
    Updated
    2026-07-21

Plans & credits

Plan tiers, feature flags, and image/story credit balances that gate generation.

  • User plans and feature access

    Partially implemented

    Plan tiers APPRENTICE/STARTER/CREATOR gate portraits, aspect ratios, styles, and other capabilities.

    Verification
    Verified from source
    Trigger
    Protected pages call arcana_user_plan(); admin/Stripe may update users.plan_type.
    Facing
    User-facing
    Updated
    2026-07-21
  • Credit balances

    Implemented

    Image and story credits live on the users row; generation checks before enqueue and deducts after successful render.

    Verification
    Verified from source
    Trigger
    auth_user_has_credits before enqueue; auth_user_consume_credit after successful worker completion.
    Facing
    User-facing
    Updated
    2026-07-21

Image generation

The user-facing generator form: song inputs, styles, portraits, aspect ratios, and queue submission.

  • Authenticated generator UI collects band, song, lyrics, style, aspect, portraits, and queues a pending job.

    Verification
    Verified from source
    Trigger
    GET/POST arcana.image.generator.php with action=generate.
    Facing
    User-facing
    Updated
    2026-07-21
  • Admin-managed arcana_styles rows supply prompt_text appended when the user selects a style_key.

    Verification
    Verified from source
    Trigger
    User selects a style in the generator; worker loads arcana_styles by key.
    Facing
    User-facing
    Updated
    2026-07-21
  • Paid plans can upload one or two portrait images that are stored under uploads/dble/refs and sent as Gemini inlineData.

    Verification
    Verified from source
    Trigger
    User attaches ref1/ref2 on the generator form.
    Facing
    User-facing
    Updated
    2026-07-21
  • Users pick an aspect ratio stored on the queue/render and passed to Gemini imageConfig; expanded ratios are UI-gated by plan.

    Verification
    Verified from source
    Trigger
    Select aspect_ratio on the generator form.
    Facing
    User-facing
    Updated
    2026-07-21

Queue & workers

Background Gemini analysis, prompt construction, image generation, retries, and credit deduction.

  • Queue workers call Gemini text model to produce structured Song DNA JSON from band, song, and lyrics.

    Verification
    Verified from source
    Trigger
    Worker picks pending arcana_queue rows.
    Facing
    System
    Updated
    2026-07-21
  • Workers assemble a cinematic image prompt from Song DNA, aspect ratio, portraits, styles, and branding rules.

    Verification
    Verified from source
    Trigger
    After successful Song DNA analysis in a worker.
    Facing
    System
    Updated
    2026-07-21
  • Workers call Gemini image model with the cinematic prompt and optional portrait inlineData, then save WebP outputs.

    Verification
    Verified from source
    Trigger
    Worker has a constructed prompt for a queue item.
    Facing
    System
    Updated
    2026-07-21
  • Dynamic band-style analysis

    Partially implemented

    When image_style equals ANALYZE_BAND_STYLE, the worker asks Gemini for a StyleMap and appends it to the prompt.

    Verification
    Verified from source
    Trigger
    Queue row has image_style=ANALYZE_BAND_STYLE.
    Facing
    System
    Updated
    2026-07-21
  • Queue submission

    Implemented

    Generation requests become pending rows in arcana_queue for background workers to claim.

    Verification
    Verified from source
    Trigger
    Successful generate action on the image generator.
    Facing
    User-facing
    Updated
    2026-07-21
  • Cron/CLI worker scripts claim pending jobs, run Gemini pipeline, save assets, deduct credits, and mark completed/failed.

    Verification
    Verified from source
    Trigger
    Scheduled or manual execution of a queue processor PHP script.
    Facing
    System
    Updated
    2026-07-21
  • Parallel workers claim a small batch with row locks and use curl_multi for concurrent Gemini HTTP calls.

    Verification
    Verified from source
    Trigger
    Running a parallel cron processor.
    Facing
    System
    Updated
    2026-07-21
  • Image generation uses a multi-attempt chain that softens prompts, drops portraits, and switches to safer framing after safety blocks.

    Verification
    Verified from source
    Trigger
    Gemini image call fails or returns safety/no-image responses.
    Facing
    System
    Updated
    2026-07-21
  • Default branding is prompt-instructed AI text; admins can disable it per job; a separate Imagick/GD path exists in a nowatermark-named worker.

    Verification
    Verified from source
    Trigger
    Default queue watermark=1; admin sets no_watermark to store watermark=0.
    Facing
    User-facing
    Updated
    2026-07-21

Browsing, searching, sorting, paginating, viewing, emailing, and deleting completed renders.

  • Logged-in users browse their arcana_renders with search, sort, pagination, lightbox, email, and delete.

    Verification
    Verified from source
    Trigger
    Visit arcana.image.gallery.php while authenticated.
    Facing
    User-facing
    Updated
    2026-07-21
  • Gallery query parameters filter by text and control sort order and page size over the user's renders.

    Verification
    Verified from source
    Trigger
    Query params on arcana.image.gallery.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Gallery and viewer scripts provide enlarged image viewing and download overlay behavior.

    Verification
    Verified from source
    Trigger
    User opens a render in the gallery UI.
    Facing
    User-facing
    Updated
    2026-07-21
  • Render deletion

    Implemented

    Users (and admins) can delete render records and attempt removal of local/B2 files.

    Verification
    Verified from source
    Trigger
    Delete action from gallery or admin images page.
    Facing
    User-facing
    Updated
    2026-07-21

Payments & Stripe

Pricing pages, Checkout sessions, webhooks, subscriptions, and credit-pack grants.

  • Stripe checkout

    Partially implemented

    Authenticated pricing page creates Stripe Checkout sessions from stripe_products rows via stripe_lib.php.

    Verification
    Verified from source
    Trigger
    POST product_id to arcana.pricing.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Subscription plans

    Partially implemented

    Subscription products use Stripe subscription mode; user_subscriptions tracks status and cancel-at-period-end.

    Verification
    Verified from source
    Trigger
    Checkout for subscription products; manage via arcana.subscription.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Credit-pack purchases

    Partially implemented

    One-time Stripe payment products grant image credits via webhook and/or purchase success page.

    Verification
    Verified from source
    Trigger
    Checkout session completed for credit_pack products.
    Facing
    User-facing
    Updated
    2026-07-21
  • Stripe webhook processing

    Partially implemented

    Two webhook implementations exist: SDK-based arcana.stripe.endpoint.php and lightweight webhook.php.

    Verification
    Verified from source
    Trigger
    Stripe POSTs signed events to a configured endpoint URL.
    Facing
    System
    Updated
    2026-07-21

Email, notifications & admin

Transactional email, in-app notifications, administrator tools, and maintenance mode.

  • Admin users get watermark bypass, style management, admin console access, and maintenance controls.

    Verification
    Verified from source
    Trigger
    users.admin=1; visiting arcana.admin/* or admin UI affordances.
    Facing
    System
    Updated
    2026-07-21
  • Verification, password reset, and gallery image-share emails send via PHPMailer/SMTP with mail() fallback.

    Verification
    Verified from source
    Trigger
    Registration, resend, forgot-password, or gallery email-share actions.
    Facing
    User-facing
    Updated
    2026-07-21
  • In-app notifications

    Partially implemented

    Workers can create user_notifications rows; overlay UI marks them read.

    Verification
    Verified from source
    Trigger
    Worker completion/failure helpers; user opens notifications UI.
    Facing
    User-facing
    Updated
    2026-07-21
  • Maintenance mode

    Implemented

    Admins toggle arcana_settings.maintenance_mode; auth_check redirects protected pages to a 503 maintenance screen.

    Verification
    Verified from source
    Trigger
    Admin dashboard toggle; subsequent authenticated page loads.
    Facing
    User-facing
    Updated
    2026-07-21

Public pages & system

Landing pages, legal pages, feedback, environment loading, and storage integrations.

  • index.php serves marketing landing content and may redirect mobile UAs to index.mobile.php.

    Verification
    Verified from source
    Trigger
    GET / or index.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Legal pages

    Implemented

    Terms, privacy, and FAQ pages publish product rules, credit policies, and data-handling disclosures.

    Verification
    Verified from source
    Trigger
    Visit arcana.legal.*.php or FAQ pages.
    Facing
    User-facing
    Updated
    2026-07-21
  • Public feedback

    Partially implemented

    Feedback form uses CSRF and Turnstile, then sends mail via PHP mail() to SUPPORT_EMAIL.

    Verification
    Verified from source
    Trigger
    POST arcana.feedback.php.
    Facing
    User-facing
    Updated
    2026-07-21
  • Renders are written under uploads/dble and uploaded to Backblaze B2; public URLs come from B2_PUBLIC_URL.

    Verification
    Verified from source
    Trigger
    Worker save path; gallery/admin URL resolution and deletes.
    Facing
    System
    Updated
    2026-07-21