Welcome Contributors!
We're thrilled you're interested in contributing to EdgeFlow! Whether it's fixing bugs, adding features, improving documentation, or helping others, every contribution matters.
Getting Started
Prerequisites
- Go 1.21+ -
go version - Node.js 18+ - For frontend development
- Make - Build automation
- Git - Version control
Setting Up the Development Environment
# Fork the repo on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/edgeflow.git
cd edgeflow
# Add upstream remote
git remote add upstream https://github.com/EdgxCloud/EdgeFlow.git
# Install Go dependencies
go mod download
# Install frontend dependencies
cd web && npm install && cd ..
# Run in development mode
make dev Development Workflow
Branch Naming
feature/short-description- New featuresbugfix/issue-number-description- Bug fixesdocs/what-changed- Documentationrefactor/what-changed- Code refactoring
Commit Messages
We use Conventional Commits:
feat: add telegram notification node
fix: resolve memory leak in executor
docs: update API documentation
test: add tests for HTTP node
refactor: simplify node registry
chore: update dependencies Making Changes
# Create a feature branch
git checkout -b feature/my-feature
# Make your changes
# ...
# Run tests
make test
# Run linter
make lint
# Commit changes
git add .
git commit -m "feat: add my feature"
# Push to your fork
git push origin feature/my-feature Pull Request Guidelines
Before Submitting
- Tests pass:
make test - Linter passes:
make lint - Documentation updated if needed
- Commit messages follow conventions
PR Template
## Description
[Brief description of changes]
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
[How was this tested?]
## Checklist
- [ ] Tests pass
- [ ] Linter passes
- [ ] Documentation updated Creating New Nodes
Node Structure
package network
import "github.com/EdgxCloud/EdgeFlow/internal/node"
// Register the node
func init() {
node.Register("my-node", NewMyNode)
}
// MyNode does something useful
type MyNode struct {
node.BaseNode
// Properties (shown in UI)
URL string `json:"url" title:"URL" required:"true"`
Method string `json:"method" title:"Method" default:"GET"`
}
// NewMyNode creates a new instance
func NewMyNode() node.Node {
return &MyNode{}
}
// GetSchema returns the node schema for UI
func (n *MyNode) GetSchema() node.NodeSchema {
return node.NodeSchema{
Type: "my-node",
Name: "My Node",
Description: "Does something useful",
Category: "Network",
Color: "#3B82F6",
Inputs: []node.PortSchema{{Name: "input", Type: "any"}},
Outputs: []node.PortSchema{{Name: "output", Type: "any"}},
}
}
// Execute runs the node logic
func (n *MyNode) Execute(ctx *node.ExecutionContext) (*node.Message, error) {
// Your logic here
return &node.Message{Payload: result}, nil
} Testing Your Node
package network_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/EdgxCloud/EdgeFlow/pkg/nodes/network"
)
func TestMyNode_Execute(t *testing.T) {
node := &network.MyNode{URL: "https://example.com"}
ctx := &node.ExecutionContext{
Input: &node.Message{Payload: "test"},
}
result, err := node.Execute(ctx)
assert.NoError(t, err)
assert.NotNil(t, result)
} Code Style
Go
- Use
gofmtandgoimports - Follow Effective Go guidelines
- Add comments for public functions
- Handle errors properly
- Use context for cancellation
TypeScript (Frontend)
- Use TypeScript interfaces
- Prefer functional components
- Use named exports
- Follow existing patterns in the codebase
Ways to Contribute
Good First Issues
Look for issues labeled good first issue on GitHub. These are great
for getting started with the codebase.
Other Contributions
- Documentation - Fix typos, improve explanations, add examples
- Testing - Add unit tests, integration tests
- Bug Reports - File detailed bug reports with reproduction steps
- Feature Requests - Suggest new features with use cases
- Translations - Help translate documentation
- Community - Answer questions on Discord or GitHub Discussions
Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the issue, not the person
- Welcome newcomers and help them
Getting Help
- Discord - Join our community
- GitHub Discussions - Ask questions and share ideas
- GitHub Issues - Report bugs and request features
Thank you for contributing to EdgeFlow! 🎉