AOSSIE-Org / Resonate

Clubhouse, but Open Source. A social voice platform.
GNU General Public License v3.0
171 stars 123 forks source link

[refactor] implement dotenv to hide api-keys from codebase #277

Closed opxdelwin closed 1 month ago

opxdelwin commented 4 months ago

Description

This PR will add a .env file to securely store these credentials. The code now retrieves them from the environment variable, keeping them hidden within the development environment.

Here's what this means:

Fixes #273

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

I haven't added unit tests as these are code refactors, moreover it doesn't look like tests have been initialized beforehand. I'll be happy to add if required.

Checklist:

Maintainer Checklist

opxdelwin commented 4 months ago

As of now, API keys of the production server are exposed, which might have been unintended. This could lead to exploitation of resources and incur unexpected costs. That is why we prefer .env while initialisation of any project.

Secondly, But then, later when we're to run automation to publish releases straight to the respective platform, or run checks on PR and commits, removing this file from the codebase would raise issues.

Aarush-Acharya commented 1 month ago

Hey @opxdelwin Thanks a lot for your contribution 🚀✨,

having a .env is always considered as on of the best practices for any repository. But currenlty we planning to have a .bat script that creates an appwrite env similar to our main env on the contibutors local machine using appwrite self hosted (docker). Thus we wont have to expose our env variables anymore rather more control would be in the contributors hands.

We really appreciate your work towards Resonate. There are a lot of issues and things to be done in the app. Lets move forward and build Resonate a beautiful app.

Thank you