This repository contains server code for the npm package envoix.
- Introduction
- Tech stack
- Getting Started
- Installation
- Configuration
- Running the Server
- API Reference
- Authentication Endpoints
- Environment Variables Endpoints
- Permission Management Endpoints
- Security Considerations
- Conclusion
- NodeJS (RTE)
- Postgres (Database)
- TypeORM (ORM)
- ExpressJS (web server)
- Bcrypt + crypto (security)
Envoix Server is built using Node.js and Express.js, providing a RESTful API for handling user authentication, environment variables management, and permission management. It leverages PostgreSQL as its database for storing user data, environment variables, and permissions.
To install Envoix Server, follow these steps:
- Clone the Envoix Server repository:
git clone https://github.com/your_username/envoix-server.git
- Navigate to the Envoix Server directory:
cd envoix-server
- Install dependencies:
npm install
- Configuration
Before running the server, configure the environment variables by copying the .env.example file to .env and providing appropriate values for your environment. Running the Server
- To start the Envoix Server, run the following command:
npm start
Envoix Server provides the following endpoints for managing authentication, environment variables, and permissions:
POST /auth/signup: Create a new user account.
POST /auth/login: Authenticate user credentials and generate an access token.
GET /auth/me: Retrieve user details (requires authentication).
Environment Variables Endpoints (/envs)
GET /envs: Retrieve all environment variables associated with the authenticated user.
POST /envs: Add a new environment variable.
GET /envs/:env_id: Retrieve an environment variable by ID.
PUT /envs/:env_id: Update an existing environment variable.
DELETE /envs/:env_id: Delete an environment variable.
Permission Management Endpoints (/permissions)
POST /permissions/:env_id: Add permissions for accessing an environment variable.
PUT /permissions/:env_id: Update existing permissions for accessing an environment variable.
DELETE /permissions/:env_id: Remove permissions for accessing an environment variable.
GET /permissions/:env_id: Retrieve permissions for an environment variable.
Envoix Server utilizes encryption techniques to ensure the security of sensitive data, such as user passwords and environment variable contents.
Access to sensitive endpoints and data is restricted based on user authentication and permissions.
Regularly review and update user permissions to maintain security.
Avoid sharing sensitive information in environment variables unless necessary.
Envoix Server provides a robust backend solution for managing environment variables within development teams. By centralizing storage, enforcing encryption, and providing fine-grained access control, Envoix Server enhances collaboration while prioritizing security and simplicity.
developed by Anurag Shukla