Thank you for your interest in contributing to WebEncode! This document provides guidelines for setting up your development environment and contributing to the project.
To develop on WebEncode, you will need:
- Go 1.24+: For the backend Kernel, Workers, and Plugins.
- Node.js 22+: For the Next.js Frontend.
- Docker & Docker Compose: For running infrastructure (Postgres, NATS) and integration testing.
- Protoc: Protocol Buffers compiler (optional, for modifying
.protofiles).
-
Clone the repository:
git clone https://github.com/rennerdo30/webencode.git cd webencode -
Install Go dependencies:
go mod download
-
Install UI dependencies:
cd ui npm install
- Issues: Use the built-in templates for bug reports and feature requests.
- Pull Requests: Follow the PR template and include validation results.
- Automation:
- CI runs backend tests/lint/build and frontend lint/test/build.
- Dependabot opens weekly dependency update PRs for Go modules, npm, and GitHub Actions.
- Create feature branches from
main. - Keep PRs focused and small when possible.
- Rebase or merge
mainregularly to reduce conflicts.
We aim for high test coverage. Please ensure all tests pass before submitting a PR.
# Run all Go unit tests
go test ./...
# Run UI lint/test/build checks
cd ui
npm run lint
npm run test:run
npm run build
# Run specific package tests
go test ./internal/orchestrator/...WebEncode is built around a plugin architecture. Writing a new plugin is the most common way to extend functionality.
Create a directory in plugins/, e.g., plugins/my-plugin.
Implement your logic in Go using pkg/pluginsdk for boilerplate.
package main
import (
"github.com/hashicorp/go-plugin"
"github.com/rennerdo30/webencode/pkg/pluginsdk"
)
// Implement pluginsdk.EncoderServiceServer interface...
type MyEncoder struct {
pluginsdk.UnimplementedEncoderServiceServer
}
func (e *MyEncoder) Transcode(req *pluginsdk.TranscodeRequest, stream pluginsdk.EncoderService_TranscodeServer) error {
// Your transcoding logic here
return nil
}
func main() {
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: pluginsdk.HandshakeConfig,
Plugins: map[string]plugin.Plugin{
"my-encoder": &pluginsdk.Plugin{
EncoderImpl: &MyEncoder{},
},
},
GRPCServer: plugin.DefaultGRPCServer,
})
}- Build the plugin:
go build -o ../../bin/my-encoder . - Register it via the API or add it to the
pluginstable.
For more details, see docs/PLUGIN_SDK.md.
- Formatting: run
go fmt ./... - Linting:
- Backend:
make lint(orgolangci-lint run ./...) - Frontend:
cd ui && npm run lint
- Backend:
- Commits: Use descriptive commit messages.
- PR Checklist:
- Tests and lint pass locally.
- Docs/config changes are included when behavior changes.
- Breaking changes are explicitly documented in the PR.