Skip to content

Latest commit

 

History

History
121 lines (91 loc) · 2.61 KB

File metadata and controls

121 lines (91 loc) · 2.61 KB

Contributing to nextdotenv

Thanks for your interest in contributing!

Getting Started

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/curet-dev/nextdotenv.git
    cd nextdotenv
  3. Create a branch:
    git checkout -b feature/your-feature

Project Structure

nextdotenv/
├── index.js              # Entry point
├── src/
│   ├── constants.js      # Configuration constants
│   ├── errors.js         # Custom error types
│   ├── validation.js     # Input validation helpers
│   ├── crypto.js         # Encryption/decryption
│   ├── password.js       # Password input handling
│   ├── operations.js     # Core business logic
│   ├── cli.js            # CLI commands
│   └── web/
│       ├── server.js     # HTTP server with rate limiting
│       └── template.js   # Web UI template

Development

No build step required. Zero external dependencies.

Test locally

# Show help
node index.js help

# Test backup
echo "TEST=123" > .env
node index.js backup

# Test restore
rm .env
node index.js restore

# Test update
echo "NEW=456" >> .env
node index.js update

# Test diff
node index.js diff

# Test web interface
node index.js web

Test as global package

npm link
nextdotenv help

Code Style

  • No external dependencies
  • No unnecessary comments
  • Keep functions small and focused
  • Use custom error types from src/errors.js
  • Add validation via src/validation.js

Module Guidelines

Module Purpose
constants.js All configuration values
errors.js Custom error classes
validation.js Input validation
crypto.js Encryption/decryption only
operations.js Business logic (shared by CLI and API)
cli.js CLI-specific commands
web/server.js HTTP server
web/template.js HTML template

Pull Request Process

  1. Make sure your code works
  2. Test all commands (backup, restore, update, diff, rotate, web)
  3. Update README.md if needed
  4. Create a pull request with a clear description

Reporting Bugs

Open an issue with:

  • Node.js version
  • Operating system
  • Steps to reproduce
  • Expected vs actual behavior

Feature Requests

Open an issue describing:

  • The problem you're trying to solve
  • Your proposed solution
  • Any alternatives you considered

Security Issues

For security vulnerabilities, please email curet@vibrance.ltd instead of opening a public issue.

License

By contributing, you agree that your contributions will be licensed under the MIT License.