Global billing, no foreign entity

From download to your first international payment, in a weekend.

Three frontends, an API and billing through two providers: Stripe on your home account, Paddle as merchant of record everywhere else. The code is yours, no lock-in.

React + TypeScript.NET 10 APIi18n includedCI/CD ready
Marketing SitePublic pages, pricing and SEO
React Web AppCustomer area with auth and billing
.NET APIProducts, plans, features and payments
Database · Auth · PaymentsPostgreSQL, Supabase, Stripe + Paddle
Admin PanelOperate products, plans and PSPs

Built to be shipped with AI coding agents

Why a foundation

Stop rebuilding the same SaaS foundation.

Start with the parts that make your product unique. The rest is already built and running.

Building from scratch

  • Authentication~5 days
  • Session handling~3 days
  • Admin structure~10 days
  • Product and pricing models~5 days
  • Global payments with two providers~15 days
  • Internationalization~5 days
  • Tests~5 days
  • CI/CD~3 days
  • Deployment structure~3 days
  • Documentation~3 days

Starting with CastorStack

  • Authenticationdone
  • Session handlingdone
  • Admin structuredone
  • Product and pricing modelsdone
  • Global payments with two providersdone
  • Internationalizationdone
  • Testsdone
  • CI/CDdone
  • Deployment structuredone
  • Documentationdone

≈ 11 weeks of work before the first line of your product — or $147 and you start after that.

What's inside

Every layer of a real SaaS, already in place.

Three frontends, one API and the operational plumbing between them.

Marketing Site

Public site with pricing, SEO structure and i18n, connected to the product catalog.

Customer Web App

Authenticated customer area: dashboard, plan, usage and billing foundation.

Admin Panel

Operate products, plans, features, users, subscriptions and PSPs.

.NET API

.NET 10 API with EF Core, PostgreSQL and versioned endpoints.

Authentication

Supabase-backed auth with sessions and protected routes across apps.

Product Management

Products, plans and catalog managed from the admin panel.

Pricing & Features

Plans, feature flags and plan-feature bindings ready to model your offer.

Payment Providers

Stripe and Paddle wired end to end: checkout, signed webhooks and entitlements, with checkout binding per plan.

Internationalization

Locale routing, translation files and language selectors in every frontend.

Automated Testing

Vitest unit tests on the frontends, xUnit tests on the API and Playwright end-to-end suites.

Deployment

Vercel-ready frontends and a containerized API you can deploy anywhere.

Centralized Configuration

Branding, product, pricing and features driven by config files.

Extensible
Global billing

Sell worldwide without a local entity in every market.

Domestic customers are charged through Stripe. Everyone else goes through Paddle as merchant of record, so VAT and sales tax are handled for you.

  • Country-to-provider routing rule, configured in the admin panel
  • Signed webhooks from both providers unlock the same entitlements
  • One checkout endpoint: the API resolves which provider to use
Buyer's countryConfirmed at checkout
Routing ruleDomestic, international, fallback
StripeYour domestic account
PaddleMerchant of record
Webhook → accessEntitlement granted
Architecture

One monorepo. Clear boundaries.

Every app has a single responsibility, and shared concerns live in one place.

apps/

Three frontends with the same design language: marketing, customer app and admin.

backend/api/

.NET 10 backend: products, plans, features, users, subscriptions and payment providers.

config/

branding.json, product.json, pricing.json and features.json drive the whole product.

shared/ · docs/ · scripts/

Conventions, documentation and automation shared by every project.

Explore the full architecture
Stack

A stack teams already know.

No exotic dependencies. Proven tools, typed end to end.

Frontend

ReactNext.jsViteTypeScriptReact Routeri18nextVitest

Backend

.NET 10C#EF CorePostgreSQLSupabase Auth

Quality & Infra

Playwright E2ESentryVercelMigrationsEnv Config
How it works

From download to deploy, without detours.

Branding, product, pricing and features are centralized configuration, not scattered constants.

Download the code

One monorepo with frontends, API, database and scripts.

Configure your brand

Colors, logo and themes in config/branding.json; name, slug and locales in config/product.json.

Define products and pricing

Model plans and features from the admin panel or config files.

Connect auth and payments

Plug in Supabase credentials and your Stripe and Paddle keys. The integrations are already built.

Build your unique experience

Spend your time on the product, not on the boilerplate.

Deploy

Ship to Vercel or any host you choose, with no lock-in.

config/branding.json
{
  "primaryColor": "#7C4DFF",
  "secondaryColor": "#0D0D16",
  "logoText": "CastorStack",
  "themeModes": [
    "light",
    "dark",
    "system"
  ]
}
Guided onboarding

A guided path from zero to your first payment

Your purchase includes a 15-step onboarding trail in English, Spanish, and Portuguese. It takes you from an unopened package to a deployed product taking real payments. Every step ends with a verifiable check, written to be executed with an AI coding agent.

Who it's for

Built for people who ship SaaS.

Different goals, same starting point.

Solo founders

Validate your idea with a real working product instead of a prototype.

SaaS developers

Skip the plumbing and work on the features that set your product apart.

Freelancers

Deliver client SaaS projects with a professional baseline from day one.

Software agencies

Standardize how your team starts every SaaS engagement.

Internal product teams

Launch internal tools with auth, admin and billing structure ready.

Serial builders

Reuse the same foundation across multiple products without re-learning it.

In detail

What the foundation covers.

Grouped by the areas that matter when you're shipping.

Monorepo structure
Shared conventions
Centralized configuration
Documentation
Security

Built-in protections you can verify in the repo.

Concrete defaults in the API and database — not a generic enterprise badge.

Signed payment webhooks

Stripe and Paddle use HMAC signature checks, constant-time comparison, a five-minute replay window, and idempotent event handling.

Admin routes gated end to end

Every /api/v1/admin/* endpoint requires an authenticated admin session — verified route by route.

Encrypted PSP credentials

Payment provider secrets are encrypted with ASP.NET Data Protection, stored in the database, and never returned in plain text from the API.

No raw SQL in the API

Entity Framework Core is the only database access path — no string-built queries that open injection surfaces.

RLS enforced by migration

Supabase tables ship with row-level security and privilege hardening, with a regression test that fails the build if a table is left exposed.

Strict CORS defaults

Allowed origins are explicit and credentials are disabled — CSRF against cookie sessions is ruled out by configuration.

Checkout redirect allowlist

returnTo URLs must match configured allowed origins so checkout cannot become an open redirect.

Preview

Three frontends, one visual language.

Same design system, different jobs.

Marketing site home in dark theme, showing the hero and the three-frontend diagram.
Marketing Site

Sell the product: hero, pricing and SEO-ready pages.

Customer web app dashboard with active plan, usage and quick actions, demo data.
Customer Web App

Simple, value-oriented area for the end customer.

Admin panel dashboard with products, plans, PSPs and integration status, demo data.
Admin Panel

Dense, operational cockpit for the people running the SaaS.

Extensibility

Change configuration, not scattered code.

Product identity and commercial rules live in versioned config files.

config/product.json
{
  "slug": "castorstack",
  "name": "CastorStack",
  "tagline": "A production-ready foundation to build and launch SaaS products.",
  "locales": [
    "en",
    "es",
    "pt"
  ],
  "defaultLocale": "en",
  "demoMode": true
}
config/pricing.json
{
  "currency": "USD",
  "plans": [
    {
      "id": "starter",
      "name": "Starter",
      "priceMonthly": 0
    },
    {
      "id": "growth",
      "name": "Growth",
      "priceMonthly": 199
    }
  ]
}

These samples are read from the real config/ files at build time. pricing.json is an install seed: after seeding, plans and prices live in the admin panel.

Who built this

There is a person behind this codebase

Danilo Rodrigues

Danilo Rodrigues

One of the founders of CastorStack and DanTI Digital, software engineer for 13+ years.

I built this template to ship SaaS products without rebuilding the foundation every time. It's the same code I use for my own products.

FAQ

Frequently asked questions

No. It's a code-first foundation for developers: a monorepo with React frontends, a .NET API and configuration files you own and extend.

Blog

Latest articles

Per-seat pricing is losing ground

2026 research shows 43% to 61% of SaaS companies already running some hybrid pricing model. What changes once charging per seat stops being the default.

View all articles

Your next SaaS should start with the product, not the boilerplate.

Get the codebase and spend your first week on what makes your product different.