Thanks for your interest in contributing! This guide will help you get started.
- Fork the repository
- Clone your fork locally
- Follow the Setup Guide to get the system running
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Test thoroughly
- Open a Pull Request
- Follow PEP 8
- Use type hints where practical
- Keep functions focused and small
- Add docstrings to public functions
- Use
loggingmodule, notprint()
- Use functional components with hooks
- Keep components small and focused
- Use descriptive variable names
- CSS: prefer single-file styles per component
backend/app/
βββ api/ β REST endpoints, WebSocket handlers
βββ core/ β Config, database, MQTT, events
βββ ai/ β Decision engine, strategies, anomaly detection
βββ agents/ β Multi-agent system
βββ models/ β Database models
βββ services/ β Business logic
- Create a new file in
backend/app/ai/or add to existing - Implement the
DecisionStrategyinterface - Register it in
agents/multi_agent.py
from app.ai.rules import DecisionStrategy, Decision
class MyStrategy(DecisionStrategy):
@property
def name(self) -> str:
return "my_strategy"
def evaluate(self, device_id, device_type, value, history):
# Your logic here
return [] # list of Decision objects- Add simulation logic in
device-simulator/simulator.py - Add rules in
backend/app/ai/rules.py(ThresholdStrategy) - Add anomaly detection thresholds in
backend/app/ai/anomaly.pyif needed
- Add route in
backend/app/api/routes.py - Keep it under
/api/v1/prefix - Use proper HTTP methods and status codes
Use conventional commits format:
feat: add humidity sensor support
fix: resolve MQTT reconnection issue
docs: update architecture documentation
refactor: simplify decision engine pipeline
test: add unit tests for anomaly detector
- Keep PRs focused β one feature/fix per PR
- Include a clear description of what and why
- Test your changes before submitting
- Respond to review feedback promptly
Use the bug report or feature request templates.
Open a discussion or ask in Issues.
Thank you for contributing to EdgeBrain! π§