epicweb-dev / epic-stack

This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
https://www.epicweb.dev/epic-stack
MIT License
4.47k stars 368 forks source link

Add Stripe example #683

Closed saurabhp75 closed 6 months ago

saurabhp75 commented 6 months ago

Test Plan

Checklist

Screenshots

fredericrous commented 6 months ago

imo this example needs a rework

saurabhp75 commented 6 months ago

I will fix first two items.

As for third item, there are few points to consider :

fredericrous commented 6 months ago

I'm thinking of https://github.com/stripe-samples/subscription-use-cases

have a look at the server for the fixed price subscriptions example. no deduplication of data, the data is stored on stripe and not on prisma: https://github.com/stripe-samples/subscription-use-cases/blob/main/fixed-price-subscriptions/server/node/server.js

Regarding the latency I base my local data on the stripe json seed directly.. but if you have i18n in your app you might go with just i18next strings or a mix of both to get the prices in one place only

Regarding the multi redirect, maybe I don't know if piling up the calls in the same request (for the user) and waiting for all to complete is better user experience. For sure you get a clean browser history but you get a user that might cancel the page load..I went with bullmq to get an async workflow with tigris. Maybe just add comment in the readme or in the file to let the dev know why you chose this solution and what other solutions exist

saurabhp75 commented 6 months ago

README updated based on the discussion.