Skip to main content

Contributing to OpenPrime

Thank you for your interest in contributing to OpenPrime! This guide will help you get started.

Ways to Contribute​

  • Report bugs - File issues for bugs you encounter
  • Suggest features - Propose new functionality
  • Improve documentation - Fix typos, add examples, clarify explanations
  • Submit code - Fix bugs or implement new features
  • Review PRs - Help review pull requests from others

Getting Started​

1. Fork and Clone​

# Fork on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/OpenPrime.git
cd OpenPrime

2. Set Up Development Environment​

# Start all services
cd openprime-local-testing
npm start

# Verify everything is running
npm run health

3. Create a Branch​

git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-description

Development Workflow​

Code Style​

  • Frontend: ESLint + Prettier (configured in openprime-app/)
  • Backend: ESLint (configured in openprime-app-backend/)
  • Python: Black + isort (for Injecto service)
# Frontend linting
cd openprime-app
npm run lint
npm run lint:fix

# Backend linting
cd openprime-app-backend
npm run lint

Running Tests​

# Frontend tests
cd openprime-app
npm test

# Backend tests
cd openprime-app-backend
npm test

Making Changes​

  1. Write tests first when adding new functionality
  2. Follow existing patterns in the codebase
  3. Keep commits focused - one logical change per commit
  4. Update documentation if changing behavior

Pull Request Process​

Before Submitting​

  • All tests pass locally
  • Code follows project style guidelines
  • Documentation is updated (if needed)
  • Commit messages are clear and descriptive
  • Branch is up to date with main

PR Template​

When creating a PR, include:

## Summary
Brief description of changes

## Changes
- Change 1
- Change 2

## Testing
How to test these changes

## Screenshots (if applicable)
Before/after screenshots for UI changes

## Related Issues
Fixes #123

Review Process​

  1. Automated checks run on all PRs
  2. Maintainer review required before merge
  3. Address feedback promptly
  4. Squash and merge is preferred

Project Structure​

OpenPrime/
├── openprime-app/ # React frontend
├── openprime-app-backend/ # Express.js API
├── openprime-infra-templates/ # Terraform/Helm templates
├── openprime-local-testing/ # Docker orchestration
├── openprime-documentation/ # This documentation
├── Injecto/ # Python template processor
└── StateCraft/ # Terraform state manager

Key Files​

FilePurpose
openprime-app/src/config/servicesConfig.jsService definitions
openprime-app-backend/src/routes/API endpoints
openprime-infra-templates/templates/Infrastructure templates

Adding New Features​

Adding a Cloud Service​

  1. Define schema in servicesConfig.js
  2. Add provider mapping in providersConfig.js
  3. Create template in openprime-infra-templates/templates/
  4. Add tests for new functionality
  5. Update documentation

Adding a Helm Chart​

  1. Add chart definition to helmChartsConfig.js
  2. Include default values
  3. Test with the wizard flow
  4. Document configuration options

Code of Conduct​

We follow the Contributor Covenant. Please:

  • Be respectful - Treat everyone with respect
  • Be constructive - Provide helpful feedback
  • Be inclusive - Welcome newcomers
  • Be collaborative - Work together effectively

Getting Help​

  • GitHub Discussions - Ask questions and share ideas
  • Discord - Real-time chat with the community
  • Issues - Report bugs or request features

Recognition​

Contributors are recognized in:

  • Release notes for significant contributions
  • The Contributors section on GitHub
  • Our community showcase

Thank you for making OpenPrime better!