Coder Social home page Coder Social logo

dev-xo / remix-saas Goto Github PK

View Code? Open in Web Editor NEW
1.0K 17.0 69.0 3.79 MB

A Lightweight, Production-Ready Remix Stack for your next SaaS Application.

Home Page: https://remix-saas.fly.dev

License: MIT License

JavaScript 4.61% Dockerfile 0.74% TypeScript 93.35% CSS 1.30%
prisma remix-stack flydotio tailwindcss typescript stripe sqlite

remix-saas's Introduction

A Senior Software Engineer aiming to improve your Developer Experience.

Twitter ๐• Bento

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  avatar  avatar

remix-saas's Issues

[ 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
  • Minimize main repository size (Relocating "unnecessary" files)
  • More Payment Providers like Paddle or Lemon Squeezy
  • ... some other things that could be nice to have or improve.

Any doubts, ideas, or suggestions, feel free to reach out to me on 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

[ 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 ] 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.

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.