Repository navigation
feat(signup): no-card 7-day trial on Starter plan - #38
Merged
Merged
Conversation
added 8 commits
May 14, 2026 19:37
New signups land on a 7-day generic trial (Cashier trial_ends_at) without a Stripe customer or subscription. Account is on Starter plan limits during the trial. After 7 days, EnsureAccountReady redirects to /subscribe per the existing flow. - CreateUser sets account.trial_ends_at and plan_id = Starter - EnsureAccountReady allows access when subscribed() OR onGenericTrial() - Account::isOnTrial() includes generic trial check Existing users unaffected: paying users have a subscription; never-paid users continue redirecting to /subscribe.
…efault - BillingController::index reads onTrial from Account::isOnTrial() (covers generic trial without a Stripe subscription) and falls back to account.trial_ends_at when no subscription exists. Vue page already had the badge + 'Trial ends' UI wired — just needed the right props. - Drop default trial_days from 8 to 7 for consistency with messaging.
…ial() Centralizes the 'is the user on any kind of trial?' question in the model. Equivalent behavior — Cashier's subscribed() already includes trialing subscriptions — but semantically cleaner and easier to extend.
…lEndsAt() Centralizes 'what date should the UI show as trial end?' on the model. Returns null when not on trial, the subscription's trial date when on trial-with-card, or the generic trial date for no-card users.
…ock on activeTrialEndsAt
Trial now exists exclusively at signup (no-card generic trial). The /subscribe page is reached only after the trial has been consumed (or to upgrade plans), so it should never offer another trial — that would be a double-trial loophole. - BillingController::subscribe drops trialDays prop - BillingController::checkout drops ->trialDays() call (direct charge) - Subscribe.vue drops trialDays prop and :days placeholders - i18n (en/pt-BR/es): new subscribe-focused copy, remove start_trial/trial_info
- StripeEventListener::handleSubscriptionCreated nulls account.trial_ends_at when a Stripe subscription is created. Prevents 'Trial' badge from lingering for users who convert mid-generic-trial to paid. - Drop unused trialDays global Inertia prop (no frontend consumers after /subscribe redesign). Tests added (10 new, 0 regressions, 1533 total): - AccountTest: isOnTrial + activeTrialEndsAt across 4 scenarios (no trial, generic only, subscription only, both — subscription wins) - StripeEventListenerTest: subscription created clears generic trial - TrialMiddlewareAccessTest: trialing-with-card subscription passes - BillingControllerTest: index exposes onTrial/trialEndsAt for the 3 trial states (generic-only, subscription-only, paying); subscribe page no longer exposes trialDays prop
rx-roxxit
added a commit
to rx-roxxit/therxdesk
that referenced
this pull request
Nov 20, 2026
…rypostit#38) A guest opening the domain now reads a landing page instead of being sent to the login screen, while a signed-in visitor still goes straight to the calendar. `/` leaves the authenticated group and keeps its `app.home` name; `HomeController` renders `public/Landing` or redirects. One public layout serves the landing and the legal pages: a header with the mark, the language picker and Sign in, and a footer with Terms, Privacy, the support address, Source code, the AGPL credit and the language picker, plus a Status link only when `SITE_STATUS_URL` is configured, so no public page links to a page that does not exist. `/terms` and `/privacy` keep their Markdown, titles and tests, now inside the shared layout. The landing copy lives in `rxdesk.php` under `public`, written natively in all 16 locales (title, deck, Sign in, the signup-soon line, the footer links and the skip link), with the single-line budgets added. `/pricing` stays unregistered until the v3.0.0 selling pages ship. Tests: guest landing and signed-in redirect, the public shell props and the `/pricing` 404, a browser test (Sign in lands on login, language switch in place with RTL, footer links, Status only when configured, signed-in redirect), and the landing added to the 390px overflow guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New signups land on a 7-day generic trial (Cashier trial_ends_at) without a Stripe customer or subscription. Account is on Starter plan limits during the trial. After 7 days, EnsureAccountReady redirects to /subscribe per the existing flow.
Existing users unaffected: paying users have a subscription; never-paid users continue redirecting to /subscribe.