Git Product home page Git Product logo

remix-saas's Introduction

🛍️ Remix SaaS

A Lightweight, Feature-Rich, and Production-Ready Remix Stack for your next SaaS application.

npx create-remix-saas@latest

Remix SaaS

We've created a simple demo that displays all template-provided features. Psst! Give the site a few seconds to load! (It's running on a free tier!)

Note

Remix SaaS is an Open Source Template that shares common bits of code with: Indie Stack, Epic Stack, Supa Stripe Stack, and some other amazing Open Source Remix resources. Check them out, please!

Getting Started

Please, read the Getting Started Documentation to successfully initialize your Remix SaaS Template.

Support

If you found Remix SaaS helpful, consider supporting it with a ⭐ Star. It helps the repository grow and provides the required motivation to continue maintaining the project. Thank you!

Acknowledgments

Special thanks to @mw10013 who has been part of the Remix SaaS development.

remix-saas's People

Contributors

adbib avatar dependabot[bot] avatar dev-xo avatar krishnapg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remix-saas's Issues

[ Question ] Production Use

this looks pretty awesome and thanks for putting all this together.

this is more of a question than an actual issue; DO you know of anyone that is using this as a starting point for something that is running in a production environment site will real world usage, transactions and traffic?

Thanks in advance

[ Question ] Set TOTP 64 Hex Characters

Running localhost and attempting to login via email, the following error occurs.

Typed email and clicked "Continue With Email" a message appears "Secret must be a string with 64 hex characters." . When checking api logs I do not see any attempt to resend or to stripe. I also tried regenerating all new api keys, which did not resolve the issue.

Screenshot 2024-07-05 at 12 23 51 PM

[ Question ] One-Time Payments with Stripe.

Hi there!

Firstly, thank you so much for the great work maintaining this important repo.

I was wondering if there is support for one-time purchase. I setup the product in stripe as one time but not sure how that will be work this saas subscription planning.

Please let me know if there is a doc that I missed about it.

Thank you!

[ Request ] Various Issues and Improvement Suggestions

Thank you for providing this template. It is very helpful.

Encountering couple of problems and not sure how to address them. Any help is greatly appreciated.

  1. I am able to run the project and login with eMail of admin. But in the billing section, the "manage" customer portal is failing (because user.customerId is NULL for admin).
  2. Tried with Github Auth, and was able to login, but after login it never goes to dashboard page. It is going back to localhost:3000. This is the same behavior on your live demo also. After social login it is taking to home-page rather than the dashboard. After debugging, it looks like below code is the culprit
    return authenticator.authenticate(params.provider, request, {
    successRedirect: LOGIN_PATH,
    failureRedirect: DASHBOARD_PATH,
    })
    }

    The redirect URLs are swapped. Making the successRedirect point to DASHBOARD_PATH resolved this problem.
  3. However, with Github emails there is another problem. The Github API does not automatically send email when it is declared as private. Hence the profile._json.email will be null.
    let user = await prisma.user.findUnique({
    where: { email: profile._json.email },
    include: {
    image: { select: { id: true } },
    roles: { select: { name: true } },
    },
    })
    if (!user) {
    user = await prisma.user.create({
    data: {
    roles: { connect: [{ name: 'user' }] },
    email: profile._json.email,
    },

    The email gets populated only in the profile.emails Hence changing the above code as below fixed that problem:
      const email = profile._json.email || profile.emails[0].value;
      let user = await prisma.user.findUnique({
        where: { email },
        include: {
          image: { select: { id: true } },
          roles: { select: { name: true } },
        },
      })

      if (!user) {
        user = await prisma.user.create({
          data: {
            roles: { connect: [{ name: 'user' }] },
            email,
          },
  1. Could not find event handlers for Stripe customer deletion customer.deleted event.
    I upgraded from Stripe Stack which had the event handlers for many Stripe events, which seem to be missing in this template. Would be great if the support for all events is added back into this.
  2. DB Seed code is currently creating the database entries directly for the plans, prices etc.

    remix-saas/prisma/seed.ts

    Lines 101 to 105 in a672e05

    // Store product into database.
    await prisma.plan.create({
    data: {
    id,
    name,

    Instead it should listen to the plan.created price.created etc. events from the Stripe webhook and create the equivalent entries in the database. This way the local database will always be kept in sync with the stripe. For example, when a price or plan is deleted it can be deleted or marked as inactive in the local database.

Thank you again for sharing this great work publicly. Some of these above changes can be make it much more refined.

[ Feature ] Workspaces and Teams

Will You Implement Workspaces and Teams?

Hi,

Do you plan to implement Workspaces and Teams management features in the project? We believe these functionalities would greatly improve organization and collaboration among users.

Grande projeto!

[ Request ] Let's improve Remix SaaS together!

Hello folks! 👋

Although Remix SaaS is currently in good shape, there are some small improvements we could make in order to provide a better template for us all.

Due to the lack of time I currently have, I'll leave here a few possible improvements, in case we could all start a talk and slowly look into them.

Possible Improvements

  • TypeScript Server File #240
  • Improved Testing Setup (Currently very basic) #239
  • More Payment Providers like Paddle or Lemon Squeezy
  • ... something else maybe?

Any doubts, ideas, or suggestions, feel free to reach out to me on X/Twitter or simply continue the talk here on GitHub!

[ Fix ] Docs: about skip-seed in document.

During the installation process, in the database section, if you follow the documentation and run the command:
npx prisma migrate dev --name init --skip-seed
You must then run the following command afterward:
npx prisma db seed
Before executing this command, you must ensure that you have set the STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY in the .env file, otherwise, it will throw an error in the seed.ts file.
Secondly, you need to delete all the products from the Stripe product list, otherwise, it won't create new products.
After running npx prisma db seed, it will create the admin account with the following credentials:
Username: [email protected]
Password: admin

It is recommended to do more description in documents about seed

It is recommended to separate the initialization process, including creating permissions and the admin account, from the product creation process. Place the initialization tasks in the seed command, while the product creation should be executed in a separate file.

great work,thanks

[ Question ] Where would you add Apps/Services (monorepo)?

Hi there, I am new to Remix and stumbled upon this awesome template. Looks like a really good starter for my use-case, thanks for all the work.

I was wondering about a few things:

  • If one would build services/apps now that should only be available for certain subscriptions, where would you create these and how would you scaffold it?
  • Would it make sense to create a monorepo to separate packages and apps with their dependencies?
  • Would be interesting to have an example service in this template to guide a new user/developer or give some suggestions in the docs to do so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.