-
Notifications
You must be signed in to change notification settings - Fork 25
Guidelines for Contribution
Thank you for your interest in contributing to GoDAM! This document provides guidelines and information for contributors to help maintain a healthy and collaborative development environment.
GoDAM is a powerful WordPress plugin for digital asset management that provides automatic transcoding, adaptive bitrate streaming, and interactive video layers. It simplifies the entire video workflow, from upload to optimized playback, ensuring smooth delivery across all devices and network conditions.
GoDAM consists of multiple repositories:
- GoDAM Plugin (this repository): Main WordPress plugin
- GoDAM Core: Central Media Management backend
- GoDAM Chrome Extension: Browser extension for screen recording
- GoDAM Analytics: Analytics microservice
- GoDAM.io: Main website
Help us improve by reporting bugs with detailed information about the issue.
Please try to provide as much information as you can so the bug can be reproduced, and consequently fixed easily.
Suggest new features or improvements to existing functionality.
Improve documentation, tutorials, and help content.
Documentation is present in form of Markdown files & Docblock comments in code.
Fix bugs, implement features, or improve performance of the plugin.
Help translate GoDAM into different languages for all people around the world.
You can contribute translations to GoDAM on translate.wordpress.org
Test new features and provide feedback on beta releases.
Note
For all code related contributions, we recommend you to create an accompanying issue on GitHub first
- PHP: 7.4 or higher
- WordPress: 6.5 or higher
-
Node.js: 16+ (check
.nvmrcfor exact version) - Composer: Latest version
- Git: Latest version
- Clone the repository
git clone https://github.com/rtCamp/godam.git
cd godam- Install dependencies
# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install- Build assets
# For development
npm run build:dev
# For production
npm run build:prod
# For continuous development
npm start- WordPress Setup
- Set up a local WordPress environment
- The plugin code should be present in
wp-content/plugins/godam/ - Activate the plugin
- Setup constants that can be used for development and testing
Constants would be required to be added in wp-config.php for dev endpoints:
define( 'RTGODAM_IS_LOCAL', true ); // This constant will make sure media transcoding/re-transcoding requests will be restricted for the local development environment.# Start development server
npm start
# Build for development
npm run build:dev
# Build for production
npm run build:prod
# Run linting
npm run lint
# Fix linting issues
npm run lint:js:fix
npm run lint:php:fix
npm run lint:css:fix
# Generate translation files
composer run pot- Follow WordPress Coding Standards
- Use WordPress VIP Go standards
- PHPDoc comments for all functions and classes
- Use type hints where possible (PHP 7.4+)
/**
* Example function with proper documentation.
*
* @since n.e.x.t
* @param string $param1 Description of parameter.
* @param int $param2 Description of parameter.
* @return bool Description of return value.
*
*/
public function example_function( string $param1, int $param2 ): bool {
// Implementation
}- Follow WordPress JavaScript Coding Standards
- Use ESLint configuration provided
- Prefer functional components in React
- Use TypeScript-style JSDoc comments
/**
* Example React component.
*
* @param {Object} props - Component props.
* @param {string} props.title - The title to display.
* @return {JSX.Element} The component JSX.
*/
const ExampleComponent = ( { title } ) => {
return <h1>{ title }</h1>;
};- Follow WordPress CSS Coding Standards
- Use Tailwind CSS classes where possible
- Use BEM methodology for custom CSS
- Mobile-first responsive design
- All user-facing strings must be translatable
- Use
godamas the text domain - Include translator comments for context
/* translators: %s: Video title */
$message = sprintf( __( 'Video "%s" uploaded successfully', 'godam' ), $title );This repository has two important branches:
-
main- Contains stable code that is part of current public release -
develop- The latest development iteration of the plugin lives here with new features & fixes
For naming your branches, you can follow the below convention
-
feature/description- New features -
fix/description- Bug fixes -
hotfix/description- Critical fixes -
docs/description- Documentation updates
Important
When you are raising a PR to the GoDAM repository, please open it against the develop branch instead of main
Follow the conventional commit format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
-
feat: New feature -
fix: Bug fix -
docs: Documentation changes -
style: Code style changes -
refactor: Code refactoring -
perf: Performance improvements -
test: Test changes -
chore: Build/tool changes
feat(video): add adaptive bitrate streaming
fix(transcoder): resolve timeout issues
docs(readme): update installation guide
style(php): fix indentation
refactor(api): improve error handling
perf(media): optimize thumbnail generation
test(unit): add video migration tests
chore(deps): update action-scheduler