Spaces:
Sleeping
Sleeping
Contributing to AI Mirror
Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
π€ How to Contribute
Reporting Bugs
If you find a bug, please create an issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment details (OS, Python version, Node version)
Suggesting Features
Feature suggestions are welcome! Please:
- Check if the feature already exists
- Describe the feature clearly
- Explain the use case
- Provide examples if possible
Code Contributions
Fork the Repository
git clone https://github.com/yourusername/ai-mirror.git cd ai-mirrorCreate a Branch
git checkout -b feature/your-feature-nameMake Changes
- Follow existing code style
- Add comments for complex logic
- Update documentation if needed
Test Your Changes
- Test backend: Run all endpoints
- Test frontend: Check all pages
- Verify no breaking changes
Commit Changes
git add . git commit -m "Add: Description of your changes"Push and Create PR
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
π Code Style Guidelines
Python (Backend)
- Follow PEP 8 style guide
- Use type hints where possible
- Add docstrings to functions
- Keep functions focused and small
- Use meaningful variable names
Example:
def detect_emotion(text: str) -> Dict[str, float]:
"""
Detect emotions from input text.
Args:
text: Input text to analyze
Returns:
Dictionary of emotion probabilities
"""
# Implementation
pass
JavaScript/React (Frontend)
- Use functional components
- Follow React best practices
- Use meaningful component names
- Add PropTypes or TypeScript
- Keep components small and reusable
Example:
const EmotionCard = ({ emotion, score }) => {
return (
<div className="emotion-card">
<h3>{emotion}</h3>
<p>{score}%</p>
</div>
)
}
π§ͺ Testing
Backend Tests
cd backend
pytest tests/
Frontend Tests
cd frontend
npm test
π Documentation
When adding features:
- Update README.md if needed
- Add comments in code
- Update API documentation
- Create examples if applicable
π Code Review Process
All contributions go through code review:
- Automated checks (linting, tests)
- Manual review by maintainer
- Feedback and iteration
- Merge when approved
π― Priority Areas
Current focus areas for contributions:
- Multi-language support
- Additional emotion models
- Performance optimizations
- Mobile responsiveness
- Accessibility improvements
- Test coverage
- Documentation
π¬ Communication
- Issues: For bugs and features
- Discussions: For questions and ideas
- Email: zayeem.s.khateeb@gmail.com
π Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
π Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
βοΈ Terms
By contributing, you agree that your contributions will be part of this open educational project.
Thank you for contributing!