Thank you for your interest in contributing! This guide will help you get started.
-
Fork and Clone
git clone https://github.com/yourusername/ProtocolAnimator.git cd ProtocolAnimator -
Install Dependencies
# Quick setup ./setup.sh # Unix/macOS setup.bat # Windows # Or manual pip install -r requirements.txt npm install
-
Run Development Servers
# Terminal 1 - Backend npm run server # Terminal 2 - Frontend npm run dev
ProtocolAnimator/
├── backend/ # Python FastAPI backend
│ ├── main.py # API endpoints
│ ├── simulator.py # Core simulation logic
│ └── __init__.py
├── src/ # React frontend
│ ├── components/ # UI components
│ │ ├── ProtocolInput.jsx
│ │ ├── DeckVisualization.jsx
│ │ ├── StepsTimeline.jsx
│ │ ├── RobotConfig.jsx
│ │ ├── ValidationPanel.jsx
│ │ └── ExportDashboard.jsx
│ ├── App.jsx # Main app component
│ ├── main.jsx # Entry point
│ └── index.css # Global styles
├── examples/ # Sample protocols
└── docs/ # Documentation
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment details (OS, Python version, Node version)
- Check existing feature requests
- Create a new issue with:
- Clear use case
- Expected behavior
- Why this would be useful
- Possible implementation approach
-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Follow the coding standards below
- Add tests if applicable
- Update documentation
-
Test Your Changes
# Test backend cd backend python -m pytest # if tests exist # Test frontend npm run build
-
Commit
git add . git commit -m "feat: add new deck visualization feature"
Follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentationstyle:Formattingrefactor:Code restructuringtest:Adding testschore:Maintenance
-
Push and Create PR
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
- Style: Follow PEP 8
- Docstrings: Use Google style
- Type Hints: Use when possible
def simulate_protocol(protocol_path: str, metadata: Optional[Dict] = None) -> Dict[str, Any]:
"""
Simulate a protocol.
Args:
protocol_path: Path to the protocol file
metadata: Optional metadata dictionary
Returns:
Dictionary containing simulation results
"""
pass- Style: Use ESLint (if configured)
- Components: Functional components with hooks
- Props: Use PropTypes or TypeScript
- Naming: PascalCase for components, camelCase for functions/variables
export default function MyComponent({ config, onUpdate }) {
const [state, setState] = useState(null)
const handleClick = () => {
// handler logic
}
return (
<div className="container">
{/* JSX */}
</div>
)
}- Use Tailwind utility classes
- Custom styles in
index.cssif necessary - Responsive: mobile-first approach
<div className="p-4 bg-white rounded-lg shadow-md md:p-6 lg:p-8">
{/* Content */}
</div>-
Add endpoint in
backend/main.py@app.post("/api/new-feature") async def new_feature(data: YourModel): # Implementation return {"result": "success"}
-
Update simulator if needed (
backend/simulator.py) -
Test the endpoint
curl -X POST http://localhost:8000/api/new-feature
-
Create component in
src/components/// src/components/NewFeature.jsx export default function NewFeature({ prop1, prop2 }) { return ( <div className="bg-white p-4 rounded-lg"> {/* Component content */} </div> ) }
-
Import in
App.jsximport NewFeature from './components/NewFeature' function App() { return ( <div> <NewFeature prop1={data} prop2={handler} /> </div> ) }
-
Style with Tailwind in the component
cd backend
python -m pytest tests/npm test- Upload a valid protocol
- Upload an invalid protocol
- Test all download buttons
- Test step filtering
- Test deck zoom controls
- Test responsive layout (mobile/tablet/desktop)
- Test error states
When adding features, update:
- README.md - User-facing documentation
- QUICKSTART.md - Getting started guide
- claude.md - Technical specification
- Code comments - Inline documentation
- API docs - If adding endpoints
- Backend: Minimize simulation time
- Frontend: Optimize re-renders with
useMemo,useCallback - Bundle: Keep bundle size small (check with
npm run build)
- Use semantic HTML
- Add ARIA labels where needed
- Ensure keyboard navigation works
- Test with screen readers when possible
- Update version in
package.json - Update CHANGELOG.md
- Create release notes
- Tag release:
git tag v1.x.x - Push:
git push --tags
- Questions: Open a Discussion
- Bugs: Open an Issue
- Chat: Join our community (if available)
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what's best for the project and community
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Protocol Animator! 🔬✨