Skip to content

Latest commit

 

History

History
216 lines (161 loc) · 4.84 KB

File metadata and controls

216 lines (161 loc) · 4.84 KB

Contributing to Entropy-Pass

Thank you for your interest in contributing to Entropy-Pass! This document provides guidelines and instructions for contributing.

Code of Conduct

  • Be respectful and inclusive
  • Focus on constructive feedback
  • Help create a welcoming environment for all contributors

Getting Started

Prerequisites

  • Node.js 18 or higher
  • Rust 1.70 or higher
  • Git
  • A code editor (VS Code recommended)

Setup Development Environment

  1. Fork the repository

    # Click the "Fork" button on GitHub
  2. Clone your fork

    git clone https://github.com/yourusername/entropy-pass.git
    cd entropy-pass
  3. Install dependencies

    npm install
  4. Run the development server

    npm run tauri dev

Development Workflow

Branch Naming

  • feature/ - New features (e.g., feature/memorable-passwords)
  • fix/ - Bug fixes (e.g., fix/clipboard-error)
  • docs/ - Documentation updates (e.g., docs/update-readme)
  • refactor/ - Code refactoring (e.g., refactor/entropy-collector)

Making Changes

  1. Create a new branch

    git checkout -b feature/your-feature-name
  2. Make your changes

    • Follow the existing code style
    • Write clear, descriptive commit messages
    • Add tests for new functionality
  3. Test your changes

    # Run Rust tests
    cd src-tauri
    cargo test
    
    # Run frontend tests
    cd ..
    npm test
    
    # Test the app
    npm run tauri dev
  4. Commit your changes

    git add .
    git commit -m "feat: add memorable password generator"
  5. Push to your fork

    git push origin feature/your-feature-name
  6. Create a Pull Request

    • Go to the original repository on GitHub
    • Click "New Pull Request"
    • Select your branch
    • Fill in the PR template with details

Coding Standards

TypeScript/React

  • Use TypeScript for all new code
  • Follow React hooks best practices
  • Use functional components
  • Keep components small and focused
  • Use meaningful variable names

Rust

  • Follow Rust naming conventions
  • Write documentation comments for public APIs
  • Handle errors properly (use Result types)
  • Write unit tests for new functions
  • Keep functions small and focused

Styling

  • Use Tailwind CSS utility classes
  • Follow the existing design system
  • Ensure responsive design
  • Test in both light and dark themes

Testing

Writing Tests

  • Write unit tests for all new functions
  • Test edge cases and error conditions
  • Aim for high code coverage
  • Use descriptive test names

Running Tests

# Rust tests
cd src-tauri
cargo test

# Frontend tests
npm test

# Run tests in watch mode
npm run test:watch

Project Structure

entropy-pass/
├── src/                    # React frontend
│   ├── components/         # Reusable UI components
│   ├── services/          # Business logic services
│   ├── types/             # TypeScript type definitions
│   └── App.tsx            # Main application component
├── src-tauri/             # Rust backend
│   └── src/
│       ├── entropy/       # Entropy collection modules
│       ├── generator/     # Password generation
│       ├── strength/      # Strength calculation
│       └── commands.rs    # Tauri command handlers
└── .kiro/specs/           # Design specifications

Commit Message Guidelines

Follow the Conventional Commits specification:

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation changes
  • style: - Code style changes (formatting, etc.)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks

Examples:

feat: add memorable password generator
fix: resolve clipboard permission error
docs: update installation instructions
refactor: simplify entropy collection logic

Pull Request Process

  1. Update documentation if needed
  2. Add tests for new functionality
  3. Ensure all tests pass
  4. Update CHANGELOG.md with your changes
  5. Request review from maintainers
  6. Address feedback promptly
  7. Squash commits if requested

Security Considerations

When contributing, keep these security principles in mind:

  • Never persist passwords to disk
  • Always use secure random generation
  • Validate all user inputs
  • Handle errors gracefully
  • Follow the principle of least privilege
  • Test security features thoroughly

Questions?

If you have questions or need help:

  • Open an issue on GitHub
  • Check existing issues and discussions
  • Read the specification documents in .kiro/specs/

License

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


Thank you for contributing to Entropy-Pass! 🎉