{"id":14968908,"url":"https://github.com/rphlmr/supa-stripe-stack","last_synced_at":"2026-02-27T18:32:38.290Z","repository":{"id":65682222,"uuid":"596570647","full_name":"rphlmr/supa-stripe-stack","owner":"rphlmr","description":"A Remix \u0026 Stripe Stack, backed by Supabase (driven by Prisma), that integrates authentication, subscriptions (multi-currency, month and year intervals) and handling tier limit. ","archived":false,"fork":false,"pushed_at":"2024-05-19T15:37:12.000Z","size":131,"stargazers_count":149,"open_issues_count":0,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-12-17T06:13:58.466Z","etag":null,"topics":["remix-run","remix-stack","remix-starter","stripe","stripe-checkout","supabase-js"],"latest_commit_sha":null,"homepage":"https://remix-supa-stripe-stack.fly.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rphlmr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"rphlmr"}},"created_at":"2023-02-02T13:29:39.000Z","updated_at":"2025-10-03T04:38:12.000Z","dependencies_parsed_at":"2023-12-21T20:07:05.947Z","dependency_job_id":"a5aea4ad-7d41-424c-84e0-4ba91186dc23","html_url":"https://github.com/rphlmr/supa-stripe-stack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rphlmr/supa-stripe-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphlmr%2Fsupa-stripe-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphlmr%2Fsupa-stripe-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphlmr%2Fsupa-stripe-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphlmr%2Fsupa-stripe-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rphlmr","download_url":"https://codeload.github.com/rphlmr/supa-stripe-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphlmr%2Fsupa-stripe-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29907790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["remix-run","remix-stack","remix-starter","stripe","stripe-checkout","supabase-js"],"created_at":"2024-09-24T13:40:47.929Z","updated_at":"2026-02-27T18:32:38.272Z","avatar_url":"https://github.com/rphlmr.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003eRemix Supa Stripe Stack\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/rphlmr\"\u003eTwitter\u003c/a\u003e • \u003ca href=\"https://remix-supa-stripe-stack.fly.dev/\"\u003eLive Demo\u003c/a\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n  A Remix \u0026 Stripe Stack, backed by Supabase (driven by Prisma), that integrates authentication, subscriptions (multi-currency, month and year intervals) and handling tier limit. \n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Remix deploy target: Fly.io \n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eDisclaimer\u003c/b\u003e: This stack gives you a good starting point but it can't handle a specific business model. You'll need to adapt it to your needs and you must understand how Stripe works before going to production.\n\u003c/p\u003e\n\n![supa-stripe-stack](https://user-images.githubusercontent.com/20722140/216357731-806840c9-03f0-4ee5-a3cc-f12382b4bc88.png)\n\n\u003e I want to thank and credit [DevXO](https://github.com/dev-xo) for its work on [Stripe Stack](https://github.com/dev-xo/stripe-stack) which helped me a lot to build the webhook part of this stack.\n\nLearn more about [Remix Stacks](https://remix.run/stacks).\n\n```sh\nnpx create-remix --template rphlmr/supa-stripe-stack\n```\n\n## What's in the stack\n\n### Features\n\n-   Authentication (email/password) with [Supabase](https://supabase.com/)\n-   Subscriptions (default: `free`, `tier_1`, `tier_2`) with [Stripe](https://stripe.com/)\n    -   Multi-currency (default: `usd` and `eur`)\n    -   Interval (default: `month` and `year`)\n-   A taking notes app demo with tier limits on the max number of notes (default: `free` = 2, `tier_1` = 4, `tier_2` = infinite)\n\n### Tools\n\n-   [Fly app deployment](https://fly.io) with [Docker](https://www.docker.com/products/docker-desktop/)\n-   Production-ready [Supabase Database](https://supabase.com/)\n-   Healthcheck endpoint for [Fly backups region fallbacks](https://fly.io/docs/reference/configuration/#services-http_checks)\n-   Email/Password Authentication with [cookie-based sessions](https://remix.run/docs/en/v1/api/remix#createcookiesessionstorage)\n-   Database ORM with [Prisma](https://prisma.io)\n-   Forms Schema (client and server sides !) validation with [Zod](https://github.com/colinhacks/zod) and [React Zorm](https://github.com/esamattis/react-zorm)\n-   Styling with [Tailwind](https://tailwindcss.com/)\n-   Code formatting with [Prettier](https://prettier.io)\n-   Linting with [ESLint](https://eslint.org)\n-   Static Types with [TypeScript 4.9](https://typescriptlang.org)\n\n## What's not in the stack\n\n-   Unit Testing 😶 (will try to add it)\n-   E2E Testing 😶 (will try to add it with [Playwright](https://playwright.dev/)))\n-   GitHub Actions\n\n## Why Supabase?\n\nI love it.\n\n# Requirements\n\n## #1 Supabase project\n\n-   Create a [Supabase database](https://supabase.com/) (the free tier gives you 2 databases)\n\n    \u003e It'll ask you to define the `Database Password`. Save it somewhere, you'll need it later.\n\n    ![create_project](https://user-images.githubusercontent.com/20722140/216093400-405916ae-7c30-4aa1-8c73-b41a512f1507.png)\n\n-   Go to https://app.supabase.io/project/{PROJECT}/settings/database to find your database secrets\n\n    ![database_secrets](https://user-images.githubusercontent.com/20722140/216097216-f77a56ac-b17e-4031-bd29-ad239639829d.png)\n\n    -   It's time to copy/paste some secrets from this page 👆 into your `.env` file\n    -   `URI` 👉 `DATABASE_URL`\n        -   Replace `[YOUR-PASSWORD]` with your `Database Password` (from the previous step)\n\n-   Go to https://app.supabase.io/project/{PROJECT}/settings/api to find your API secrets\n\n    ![project_secrets](https://user-images.githubusercontent.com/20722140/216094297-df265aaf-1c50-4dc7-bdd0-14bc8aa00e17.png)\n\n    -   It's time to copy/paste some secrets from this page 👆 into your `.env` file\n    -   `URL` 👉 `SUPABASE_URL`\n    -   `anon` `public` 👉 `SUPABASE_ANON_PUBLIC`\n    -   `service_role` `secret` 👉 `SUPABASE_SERVICE_ROLE`\n\n## #2 Stripe project\n\n\u003e You'll also need to install the [Stripe CLI](https://stripe.com/docs/stripe-cli) to test the webhook locally\n\n\u003e This CLI gives you the ability to listen Stripe webhook events and forward them to your local server.\n\n-   Create a [Stripe account](https://dashboard.stripe.com/register)\n-   Go to https://dashboard.stripe.com/test/apikeys\n\n    ![stripe_secrets](https://user-images.githubusercontent.com/20722140/216101036-1e94b7fe-29e6-4f34-85eb-9e0f7c0002a4.png)\n\n    -   It's time to copy/paste some secrets from this page 👆 into your `.env` file\n    -   `Secret key` 👉 `STRIPE_SECRET_KEY`\n\n-   As long as you're here, and let's assume you've installed the Stripe CLI, you can run the following command to start Stripe webhook listener and get your `webhook signing secret`\n    ```sh\n    stripe listen --forward-to localhost:3000/api/webhook\n    ...\n    \u003e Ready! You are using Stripe API Version [2022-11-15]. Your webhook signing secret is whsec_d7f96cbdb268xxxxxxxxxxxxxxxx\n    ```\n    -   `whsec_d7f96cbdb268xxxxxxxxxxxxxxxx` 👉 `STRIPE_ENDPOINT_SECRET`\n\n## #3 Fly project\n\nTODO\nIn the meantime, you can look at [my other stack working with Fly](https://github.com/rphlmr/supa-fly-stack/blob/main/README.md#deployment)\n\n## #4 Environment variables\n\nThere are other environment variables you can set in your `.env` file.\n\n-   `SERVER_URL`: the URL of your server (`http://localhost:3000` in local env)\n-   `SESSION_SECRET`: a secret string used to encrypt your session cookie\n-   `DEFAULT_CURRENCY`: default currency for your Stripe subscriptions if the user currency is not supported. (only used for UI purposes)\n    \u003e **Note**:\n    \u003e\n    \u003e The currency we show on the Pricing page is based on the user locale.See [getDefaultCurrency](app/utils/http.server.ts)\n    \u003e\n    \u003e It's not reliable because Stripe checkout will choose a currency based on the user's IP address.\n    \u003e\n    \u003e You can implement a better solution by using geo-ip services.\n    \u003e\n    \u003e **After the user subscribe, we'll use the currency selected by Stripe**.\n\n# How it works\n\nTODO: explain the stack\n\nTODO: explain the pricing plan\n\nTODO: explain how to make this stack your own\n\n# Development\n\nIt's time to play with the stack 🎉\n\n\u003e ⚠️ This step only applies if you've opted out of having the Remix CLI install dependencies for you:\n\u003e\n\u003e ```sh\n\u003e npx remix init\n\u003e ```\n\nThe default pricing plan included in this stack can be found in [`scripts/config/index.ts`](scripts/config/index.ts)\n\n## Seed the database and Stripe\n\n```sh\nnpm run setup\n```\n\n## Start Stripe Webhook listener\n\n**It is mandatory to test the webhook locally.**\n\nStripe sends webhook events to your server when a customer subscribes, cancels, or updates their subscription.\n\nStripe events are sent to the [`/api/webhook`](app/routes/api/webhook.ts) endpoint.\n\n```sh\nstripe listen --forward-to localhost:3000/api/webhook\n```\n\n## Start the server\n\nWith the Stripe webhook listener running, open a new terminal and use the command to start a development server:\n\n```sh\nnpm run dev\n```\n\nBoth the listener and the development server must be running concurrently in separate terminals for the app to work.\n\n# Notes\n\nTest credit card: `4242424242424242` Date `12/33` CVC `123`\n\nMore cards: https://stripe.com/docs/testing?testing-method=card-numbers#cards\n","funding_links":["https://github.com/sponsors/rphlmr"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphlmr%2Fsupa-stripe-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frphlmr%2Fsupa-stripe-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphlmr%2Fsupa-stripe-stack/lists"}