Skip to content

Latest commit

 

History

History
256 lines (199 loc) · 6.2 KB

File metadata and controls

256 lines (199 loc) · 6.2 KB

Contributing to SmartProBono

Thank you for your interest in contributing to SmartProBono! We welcome contributions from the community and are grateful for your help in making legal assistance more accessible.

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Python 3.9+
  • Git
  • A Supabase account (for database features)
  • Basic understanding of React, Flask, and legal technology

Development Setup

  1. Fork and Clone

    git clone https://github.com/yourusername/SmartProBonoAPP.git
    cd SmartProBonoAPP
  2. Install Dependencies

    # Install all dependencies
    npm run install-all
    
    # Or install separately
    cd frontend && npm install
    cd ../backend && pip install -r requirements.txt
  3. Environment Setup

    # Copy environment template
    cp .env.example .env
    
    # Configure your environment variables
    # See COMPLETE_SETUP_GUIDE.md for detailed instructions
  4. Start Development

    # Start both frontend and backend
    npm start
    
    # Or start individually
    ./start_mvp.sh  # Backend only
    cd frontend && npm start  # Frontend only

🎯 How to Contribute

Types of Contributions

We welcome several types of contributions:

  • 🐛 Bug Fixes - Fix issues and improve stability
  • ✨ New Features - Add new functionality to the platform
  • 📚 Documentation - Improve guides, README, and code comments
  • 🧪 Testing - Add tests and improve test coverage
  • 🎨 UI/UX - Improve user interface and experience
  • 🔧 DevOps - Improve deployment, CI/CD, and infrastructure
  • 🌍 Internationalization - Add new language support

Contribution Process

  1. Check Issues

    • Look at existing issues for something you'd like to work on
    • Or create a new issue to discuss your contribution idea
  2. Create a Branch

    git checkout -b feature/your-feature-name
    # or
    git checkout -b fix/issue-number
  3. Make Changes

    • Write clean, well-documented code
    • Follow our coding standards (see below)
    • Add tests for new functionality
    • Update documentation as needed
  4. Test Your Changes

    # Run comprehensive tests
    ./run_comprehensive_audit.sh
    
    # Run specific tests
    npm test
    python -m pytest backend/tests/
  5. Submit a Pull Request

    • Push your branch to your fork
    • Create a pull request with a clear description
    • Link any related issues
    • Request review from maintainers

📋 Coding Standards

Code Style

Frontend (React/TypeScript)

  • Use TypeScript for all new components
  • Follow Material-UI design patterns
  • Use functional components with hooks
  • Implement proper error boundaries
  • Follow ESLint configuration

Backend (Python/Flask)

  • Follow PEP 8 style guidelines
  • Use type hints for function parameters
  • Write comprehensive docstrings
  • Implement proper error handling
  • Use Flask best practices

Commit Messages

Use clear, descriptive commit messages:

feat: add document AI processing endpoint
fix: resolve authentication token expiration issue
docs: update API documentation for new endpoints
test: add unit tests for legal chat functionality

Code Review Process

  1. Automated Checks

    • All tests must pass
    • Code must pass linting
    • No security vulnerabilities
  2. Manual Review

    • Code quality and style
    • Functionality and edge cases
    • Documentation completeness
    • Performance considerations

🧪 Testing Guidelines

Frontend Testing

cd frontend
npm test                    # Run all tests
npm run test:coverage      # Run with coverage
npm run test:watch         # Watch mode

Backend Testing

cd backend
python -m pytest tests/    # Run all tests
python -m pytest tests/ -v # Verbose output
python -m pytest tests/ --cov # With coverage

Integration Testing

# Test complete system
./test_complete_system.py

# Test specific features
./test_legal_chat.py
./test_email.py
./test_jwt_auth.py

📚 Documentation

Code Documentation

  • Add JSDoc comments for React components
  • Add docstrings for Python functions
  • Include examples for complex functionality
  • Update README for new features

API Documentation

  • Document new endpoints in API routes
  • Include request/response examples
  • Update OpenAPI/Swagger specs
  • Add error code documentation

🐛 Reporting Issues

Bug Reports

When reporting bugs, please include:

  • Clear description of the issue
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment details (OS, browser, versions)
  • Screenshots or error logs if applicable

Feature Requests

For new features, please include:

  • Clear description of the feature
  • Use case and benefits
  • Potential implementation approach
  • Any relevant research or examples

🏷️ Release Process

Version Numbering

We follow semantic versioning (SemVer):

  • MAJOR: Breaking changes
  • MINOR: New features (backward compatible)
  • PATCH: Bug fixes (backward compatible)

Release Checklist

  • All tests pass
  • Documentation updated
  • Changelog updated
  • Version bumped
  • Release notes prepared

🤝 Community Guidelines

Code of Conduct

  • Be respectful and inclusive
  • Provide constructive feedback
  • Help others learn and grow
  • Focus on the project's mission

Communication

  • Use GitHub issues for technical discussions
  • Use pull request comments for code review
  • Be patient with response times
  • Ask questions when unclear

🎉 Recognition

Contributors will be recognized in:

  • CONTRIBUTORS.md file
  • Release notes
  • Project documentation
  • Community highlights

📞 Getting Help

If you need help:

  • Check existing documentation
  • Search GitHub issues
  • Create a new issue with the "help" label
  • Join our community discussions

🚀 Quick Contribution Ideas

Looking for something to work on? Here are some ideas:

  • Beginner: Fix typos, improve documentation, add tests
  • Intermediate: Add new UI components, implement API endpoints
  • Advanced: Optimize performance, add new AI features, improve security

Thank you for contributing to SmartProBono! Together, we're making legal assistance more accessible to everyone. 🏛️⚖️