Repository navigation
Description
Why
The app and the website's account area both implement checkout, payment history, payment status and password change. Two implementations of the same thing drift (they already show different status labels and layouts), double the testing, and make every pricing or checkout change a coordinated admin, backend and client release, with macOS waiting on notarization.
The conventional split for a desktop app with a web account (Slack, Zoom, Notion, 1Password, JetBrains) is:
- In the app: what is needed while using it. Sign in and out, plan status and free time left, the low-balance and expiry warnings, and the interview profile (
full_name, CV, job context). - On the website: account management. Checkout, payment history and receipts, password, and later email change and account deletion.
What changes
Payment page becomes a plan page (/payment route kept, so every existing "Subscribe" entry point still works)
- Keep the current-plan summary and the three pass cards with their prices from
GET /payment/subscription-plans, so the user still compares plans without leaving the app. - "Buy" on a card opens the website's checkout for that pass in the browser:
/account/billing?plan=<plan>, which opens the checkout dialog straight away. - Remove the in-app currency picker, payment creation, the History tab and the Status tab. "Payment history" becomes a link to
/account/billing. A payment that was in progress in the app before the update is offered for resuming on the website's billing page, so nothing is stranded. - When the window regains focus, refresh the balance, so a pass bought in the browser shows as soon as the user comes back.
Account page
- Replace the change-password form with a "Change password" row that opens
/account/security. - Rename the "Full name" field to make clear it is the name used in interview answers, which is a different field from the account name shown on the website.
Signed in on arrival
Every link to the account area goes through one main-process helper:
POST /api/auth/handofffor a single-use 60-second code (https://github.com/PowerInterviewAI/backend/issues/89).- Open
https://www.powerinterviewai.com/<locale>/app-sign-in?next=<path>#code=<code>withshell.openExternal(through the existingopenExternallyscheme guard). - If the code request fails (older backend, network), open the plain page instead; the website asks the user to sign in and continues to the same place.
The website URL is a constant next to API_BASE_URL, with the same dev override pattern.
Rollout
Backend handoff endpoints deployed and visible in prod openapi.json, then the website with /account and /app-sign-in live, then this client release (a minor bump). Older clients keep working throughout: no backend endpoint they use is removed.
Acceptance
- Buying a pass from the app opens the website's checkout for that pass, signed in
- History, status, currency and payment-creation code removed from the renderer, the IPC layer and the main-process API where nothing else uses it
- Password change opens the website
- Balance refreshes on window focus
- All nine locales updated
-
pnpm lint, bothtscconfigs,pnpm build,pnpm test:mainpass
Website side: PowerInterviewAI/marketing-website#32, PowerInterviewAI/marketing-website#33
Activity
alpha5611331 commentedon Dec 5, 2026
Done in #167, with two deviations: