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

RFC: DX wants #3261

Closed
zomars opened this issue Jul 8, 2022 · 6 comments
Closed

RFC: DX wants #3261

zomars opened this issue Jul 8, 2022 · 6 comments
Labels
🧹 Improvements Improvements to existing features. Mostly UX/UI

Comments

@zomars
Copy link
Member

zomars commented Jul 8, 2022

Got a nice summary of things we may want to add/simplify to enhance overall developer experience from this issue.

Alex is responsible for most of the Stack we use today and can say with confidence that his recommendations are always on point. 👌

Please let me know if you would like to implement any of the suggestions described in the mentioned issue.

@PeerRich
Copy link
Member

PeerRich commented Jul 8, 2022

great idea. maybe @KATT wants to help with some? ❤️

@leog
Copy link
Contributor

leog commented Jul 8, 2022

As far as environment variables, regarding making sure they exist, we currently use @chempogonzalez's dotenv-checker which already helps making sure a good report on their existence is present, but it does not error out when required variables are missing. Would be very neat if we could maybe add that functionality to dotenv-checker as a contribution, to avoid maintaining two different implementations for the same purpose because there's a possible feature missing in the library we use. Thoughts?

Example output:
image

@zomars
Copy link
Member Author

zomars commented Jul 8, 2022

@leog the thing is, on deployments we don't have an .env file. So @KATT 's solution using zod is actually genius since we can validate the whole process.env object. Also there's this tool by KATT as well but I don't think is still recommendable to use.

@zomars
Copy link
Member Author

zomars commented Jul 8, 2022

Also we already do some kind of validation but we could expand this further and maybe have better error messages and recommendations to print on the logs:

if (!process.env.NEXTAUTH_SECRET) throw new Error("Please set NEXTAUTH_SECRET");
if (!process.env.CALENDSO_ENCRYPTION_KEY) throw new Error("Please set CALENDSO_ENCRYPTION_KEY");

@zomars zomars added 📄 RFC 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Jul 8, 2022
@KATT
Copy link
Contributor

KATT commented Jul 9, 2022

Hey gang & thank y'all so much for your support of tRPC 🙏 ❤️

Spent a while outlining more stuff here, hopefully, some of it can help you in your thought process :)

@calcom calcom locked and limited conversation to collaborators Jul 10, 2022
@PeerRich PeerRich converted this issue into a discussion Jul 10, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧹 Improvements Improvements to existing features. Mostly UX/UI
Projects
None yet
Development

No branches or pull requests

4 participants