dev-xo / remix-saas

A Lightweight, Production-Ready Remix Stack for your next SaaS Application.
https://remix-saas.fly.dev
MIT License
1.18k stars 82 forks source link

[ Docs ] About `STRIPE_PUBLIC_KEY`. #324

Open andrecasal opened 6 days ago

andrecasal commented 6 days ago

Hey Daniel,

Thanks for putting this together!

To my knowledge, the STRIPE_PUBLIC_KEY (which identifies the Stripe account), is required only when interacting with Stripe from the frontend, so I was wondering why we need the STRIPE_PUBLIC_KEY. It's also not used anywhere in the code. Does the Stripe CLI need it?

Thanks!

P.S.: I opened an issue because there were no discussions available :)

dev-xo commented 6 days ago

Hello @andrecasal,

Nothing to worry about the issue, we may end up opening the discussions although for that, the project may need some more activity or issues being opened.

About your question: Remix SaaS is part of a previous Remix project called Stripe Stack, where if I'm not wrong, we had a specific use for the key.

With the transition to a more modern project structure and adapting the latest Remix patterns and improvements, probably that key has lost its purpose, ending up creating issues or questions like the one you raised.

Question for you:

If not, we may end up cleaning it, and I will take a day or so to properly look into this issue and some others that are still pending!

andrecasal commented 6 days ago

Hey @dev-xo, thanks for getting back to me!

Yes, I think it creates confusion because one wonders why that key is there. It's best to explicitly mention what the public key is for—frontend—and that we won't need it because we're doing a backend integration. This makes things clearer for developers.

dev-xo commented 6 days ago

Sounds good to me @andrecasal!

Will try to look into it in the following days, adding a comment in the docs reflecting the use case for STRIPE_PUBLIC_KEY (Frontend Only).

Gonna leave this issue open for now in order to tackle it. Any other feedback or even a PR will be welcome!