SafeEnv is a web-based solution for securely storing and retrieving environment variables. Built with Go ,React, and Tailwind CSS
- Secure and easy-to-use web interface to manage environment variables.
- Real-time syncing with the backend to ensure up-to-date data.
- Seamless authentication and authorization for accessing and modifying environment variables.
- Responsive design with Tailwind CSS for a modern user experience.
To set up the SafeEnv frontend locally, follow these steps:
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/David-mwas/safeenv-frontend.git
SafeEnv is a secure API service for storing, retrieving, and sharing environment variables using encryption.
http://localhost:8080
Description: Returns a welcome message.
Response:
{
"message": "Welcome to SafeEnv API"
}
Description: Stores an encrypted environment variable in MongoDB.
Request Body:
{
"key": "API_KEY",
"value": "secure123"
}
Response:
{
"message": "Stored successfully"
}
Description: Retrieves and decrypts a stored environment variable.
Response (Success):
{
"key": "database_password",
"value": "secure123"
}
Response (Error - Key Not Found):
{
"error": "Not found"
}
Description: Generates a shareable link for retrieving an environment variable.
Request Body:
{
"key": "database_password"
}
Response:
{
"message": "Shareable link generated",
"link": "http://localhost:8080/api/v1/retrieve/ZGF0YWJhc2VfcGFzc3dvcmQ="
}
Description: Retrieves an environment variable using a Base64-encoded key from a shared link.
Response (Success):
{
"key": "database_password",
"value": "secure123"
}
Response (Error - Invalid Key):
{
"error": "Invalid key"
}
Response (Error - Key Not Found):
{
"error": "Key not found"
}
- AES encryption is used to secure environment variables.
- A 32-byte encryption key is required (stored in
.env
asSAFEENV_SECRET_KEY
). - Base64 encoding is used for shareable keys.
Ensure you have Go and MongoDB installed, then run:
go run main.go
SAFEENV_SECRET_KEY
: A 32-byte key for encryption.MONGO_URI
: MongoDB connection string (default:mongodb://localhost:27017
).
- JWT authentication for access control.
- Audit logs for tracking variable access.
- Expiry feature for shared links.
MIT License.