Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 15:22
· 5 commits to main since this release

The template is renamed the LibreSharp SaaS Starter. Billing and a full back office for --Auth saas, and shadcn/ui with dark mode on every page.

Changes to know about

  • The template is renamed the LibreSharp SaaS Starter. The package is now
    LibreSharp.Templates.SaasStarter and the command dotnet new saas-starter; the repository
    moved to LibreSharp/saas-starter (old links
    redirect). LibreSharp.Templates.WolverineFxReact is deprecated and gets no more versions:
    dotnet new uninstall LibreSharp.Templates.WolverineFxReact, then
    dotnet new install LibreSharp.Templates.SaasStarter.
  • --Auth defaults to saas. Pass --Auth none for the previous default.
  • With accounts, the admin page is a back office with sections. Users are at /admin with
    --Auth identity and at /admin/users with saas (where /admin is the dashboard). The
    user menu in the header is a dropdown.
  • The UI uses shadcn/ui (MIT) and the theme's colours, and dark
    mode follows the operating system. New client dependencies: radix-ui, lucide-react,
    class-variance-authority, cn, tw-animate-css, shadcn (for its Tailwind styles) and the
    Geist font, served by the app itself.
  • EF Core: new migrations add the audit log (identity and saas), and billing and back
    office tables (saas).

Projects created from earlier versions don't change: a template update only affects new projects.

New

  • Plans, trials and limits (--Auth saas):
    • A plan catalogue in one place (Billing/Plans.cs), with prices per currency, features and
      limits. Plans have versions, so customers keep their price when a plan changes.
    • A reverse trial: a new organisation gets the top plan for 14 days, then the free plan.
    • One check for features and limits (Entitlements), in Wolverine Before methods (402
      Payment Required) and in the client (GET /api/billing). Features are feature flags
      (Microsoft.FeatureManagement).
    • Limits on what exists (open Todos, members including invitations) and on use per billing
      period (reminders a month, counted in one SQL statement so requests at the same moment
      can't pass it), with a warning at 80%.
    • A downgrade never deletes data: nothing more can be added over a limit, and paid features
      switch off.
    • A public, pre-rendered pricing page, generated from the catalogue.
  • Stripe subscriptions (--Auth saas; Stripe.net,
    Apache-2.0):
    • Stripe Checkout (keeping what's left of the trial) and the customer portal.
    • Signed webhooks, stored once and handled from a durable Wolverine queue, keep a local copy of
      each organisation's billing state and invoices.
    • dotnet run -- stripe-prices creates the catalogue's prices in Stripe.
    • Deleting an organisation cancels its subscription.
    • Payments sit behind IPaymentProvider, so another provider can replace Stripe.
    • Without Stripe keys, the app runs with the trial and the free plan only.
  • Back office (/admin):
    • Users (with accounts): ending a user's sessions and resending the confirmation email, on
      top of roles, locks and invitations.
    • An audit log of every admin action.
    • Failed messages: Wolverine's dead-letter queue, to replay or discard.
    • With saas:
      • A dashboard: monthly recurring revenue, organisations, trials ending, failed payments.
      • Organisations: members, plan, usage, invoices (with Stripe links), and giving a plan
        until a date (or extending a trial), suspending, notes and deleting.
      • Feature flags for everyone, a plan, or one organisation.
  • shadcn/ui on every page, with shared Section and Messages components, and dark mode
    with no script, so pre-rendered pages show the right colours at once.