Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Remove resend, stripe, cron env variable dependency #217

Merged
merged 10 commits into from
Mar 21, 2024
Merged

Feature: Remove resend, stripe, cron env variable dependency #217

merged 10 commits into from
Mar 21, 2024

Conversation

ousszizou
Copy link

@ousszizou ousszizou commented Mar 16, 2024

Description

This PR removes the RESEND, STRIPE and CRON environment variable dependencies for the alpha version. These functionalities are not currently implemented.

What type of PR is this? (check all applicable)

  • 💡 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Closes #195

Mobile & Desktop Screenshots/Recordings

Steps to QA

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

This commit removes the requirement to set any STRIPE_* environment variables
for the alpha version. Stripe functionality is not currently implemented.
This commit removes the requirement to set any RESEND_* environment variables
for the alpha version. Resend functionality is not currently implemented.
This commit removes the requirement to set any CRON_* environment variables
for the alpha version. Cron functionality is not currently implemented.
applies the code formatter to fix inconsistencies in code style.
No functional changes were made.
Copy link

vercel bot commented Mar 16, 2024

@ousszizou is attempting to deploy a commit to the Salgsmaskin Team on Vercel.

A member of the Team first needs to authorize it.

This commit installs the missing dependency `@projectx/stripe` required for type checking.

- Installed `@projectx/stripe` using `pnpm install @projectx/stripe`.

**Note:** The lock file has been updated to reflect the new dependency.
Copy link

@alexghirelli alexghirelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems OK, but I would avoid commenting on parts of the code to temporarily deactivate functionality, because Stripe will still be needed and so will CRONs, and then one day we will have to remove the comments to make them work and we will be back at the same point again.

Instead, I would use environment variables to allow the use of these third-party components/tokens/configurations.

Let me explain: for Stripe (for example), you could put a variable "USE_STRIPE=false" before the variables relating to keys and its other configurations. Inside the code, it would suffice to surround the parts that have now been commented out with a check on the value of this variable. If it is set to false as by default, Stripe would not be triggered, while on the contrary Stripe would be initialised.

I would use the same logic everywhere. So for those developing locally or self-hosting the project it would be enough to keep the defaults of these booleans to disable these features while for the hosted version we would have full control.

Cc. @matteobad @meglerhagen @akinwol

@ousszizou ousszizou marked this pull request as draft March 18, 2024 17:21
@ousszizou ousszizou marked this pull request as ready for review March 18, 2024 20:33
Copy link

@alexghirelli alexghirelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexghirelli
Copy link

@meglerhagen we can merge this!

@Codehagen Codehagen merged commit 2d27ab3 into Codehagen:main Mar 21, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Remove resend, stripe, edgestore, cron env variable dependency
3 participants