- FeedbackModal: the submit button had no label (empty blue bar); add
"Submit Feedback" / "إرسال التقييم" text with a submitting state.
- Admin panel: new "⭐ Tool Feedback" tab showing per-tool summary cards
(count, average rating, positive/negative) plus the full list of individual
ratings with reason, project, user and date. Backed by GET /api/admin/feedback.
- Ensure the qto_project_feedback / qto_customer_complaints tables exist on
MySQL at startup (idempotent CREATE TABLE IF NOT EXISTS). They were only in
the SQLite bootstrap, so on prod the insert had no table. Deliberately does
NOT run the full migration suite — migration 008 drops qto_active_projects
and would wipe in-progress project state on every boot.
- Add migrations/010_project_feedback.sql for the documented manual path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(feedback): read auth token from correct localStorage key
FeedbackModal read the session token from 'token', but the app stores it under
'qto_token' (App.jsx, Auth.jsx, cacheUrl.js). The token came back null, so the
submit request was unauthenticated (401) and users saw "Failed to submit
feedback. Try again." Use the correct key.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Revert "fix(landing): match pricing cards to actual billed prices"
The 50% first-month offer (code QTO2026) is a real promo configured on the
payment-provider side, not in the codebase — my earlier change wrongly removed
it based only on grepping the Python billing code. Restore the original
pricing cards with the live offers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(landing): match pricing cards to actual billed prices
Landing page advertised 60/125 AED with a "50% OFF 1st month / code QTO2026"
promo that no longer exists in the checkout — the billing flow charges the full
plans.py prices (120/250/500 AED). Show the real prices, drop the fake discount
badge and crossed-out anchors, and label the cards with the actual plan names
(Professional / Business / Studio) instead of generic TIER 1/2/3.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(billing): free first project per tool, retire Starter tier (3 tiers)
Three product changes requested:
1. Free first project per tool on sign-up. Every new (unsubscribed) user now
gets ONE free project per tool for their whole lifetime, before subscribing.
utils/usage.py: added lifetime_usage() and a free-project branch in
project_entitlement (free_base=1 when base==0 and not admin). billing.py now
derives can_create / project_limit from project_entitlement (single source of
truth) and exposes free_projects.
2. Retired the 50 AED Starter tier -> only 3 paid tiers remain (Professional,
Business, Studio). plans_catalog now excludes tier 1, and /checkout rejects
tier 1 with a 400. PLANS[1] is kept only so existing Starter subs still resolve.
3. Landing / About / Dashboard copy: "1st month (2 projects) free" -> "Start your
1st project for free"; free card shows "Your 1st project free / per tool";
paid cards relabelled TIER 1-3; Dashboard start-bar now shows the create form
to users who still have their free project and only p…
feat(ui): bilingual About / platform-overview page
Adds an engineer-facing About page that walks through the platform and its three
tools (QTO, Work Programme, Cash Flow), the 5-step QTO workflow, methodology,
supporting features and plans — fully bilingual (AR/EN), matching the design
system. Wired into the sidebar and page router.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(admin): show the tool (QTO / Work Programme / Cash Flow) per subscription
The admin subscriptions list already returned rows for all features but never
selected/displayed s.feature, so every tool looked identical. Add feature to the
query and a colour-coded "Tool" column so all three tools are distinguishable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Security:
- /cache is no longer public static files: served via an authenticated route
that verifies a valid session AND project ownership (was an IDOR exposing
confidential drawings). Frontend appends the token to <img> cache URLs.
- verify_session_token now reads role FROM THE DB (not the token), so a
demotion/suspension takes effect immediately instead of persisting 8h.
- Cancel the user's Dodo subscriptions on account deletion (was: keep billing
a deleted account).
- Rate limiter keys on the real client IP (cf-connecting-ip / x-forwarded-for)
instead of the proxy IP, which had made it collective/useless behind Render.
- Upload reads are capped at MAX_UPLOAD_BYTES to prevent memory-exhaustion DoS.
- .dockerignore/.gitignore now exclude the local venv and scratch/debug scripts
(several held hardcoded secrets and were being baked into the image).
Reliability:
- DB errors are logged (were silently printed / swallowed as "no rows").
- New transaction() context manager for a…
Two payment-correctness fixes:
1) Add-ons are now ONE-TIME. Previously the extra-project allowance was added
permanently to the monthly limit, so buying one add-on granted +1 project
EVERY month forever. Now the monthly tier quota resets monthly, and each
add-on credit is consumed only when creating a project beyond that quota
(settle_project_creation + consume_extra_project). check_limit/billing expose
a single can_create gate; the dashboard uses it instead of used>=limit.
2) The checkout fallback used to INSERT a free 'manual' active subscription (or
grant a free credit) whenever create_checkout_session raised. On a transient
Dodo error this silently gave users paid plans they never bought (e.g. a
phantom tier-2 Work Programme = 4 projects). Now, when Dodo is configured,
the failure returns 502 instead of granting anything; the mock path only
runs locally when no Dodo key exists.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Subscriptions and add-ons now activate synchronously on return from checkout
instead of depending on webhooks that were failing silently.
- payments.py: resolve Dodo base URL from API-key prefix (kills test/live env
mismatch); deterministic product_id -> (feature, tier) map; synchronous
force_activate (subscriptions via /subscriptions, add-ons via /payments) with
idempotent grants; log instead of silent except:pass.
- billing.py: new POST /activate endpoint; per-tool extra-project allowance via
extra_projects_for(); feature-access "used" now matches the creation gate;
fix missing safe_execute import.
- usage.py: check_limit uses per-tool add-on column for all tools, not just qto.
- features.py: FEATURE_EXTRA_COL + extra_projects_for() helper.
- Dashboard.jsx: call /activate on payment return (retries, add-on aware);
add-on buttons now buy the correct per-tool add-on instead of a tier-1 sub.
- .env.example: document all 15 products (3 tools x 4 tiers + 1 add-on).
Co-Author…
fix: auto-sync on Dashboard load + fix programme/cashflow subscribe buttons (wrong tier param) + add payment success banner on Dashboard
fix: complete payment activation flow - redirect to billing after payment, show activation spinner, poll until subscription is live, show success screen with unlocked projects