Contributing Guide¶
Thank you for your interest in contributing to Macumba Travel! This guide will help you get started with contributing to our AI-powered travel planning platform.
๐ Getting Started¶
Prerequisites¶
- Node.js 18+ (for frontend)
- Python 3.9+ (for backend)
- Docker and Docker Compose
- Git for version control
Development Environment Setup¶
-
Clone the repositories:
-
Backend setup:
-
Frontend setup:
-
Documentation setup:
๐ Code Standards¶
Python (Backend)¶
- PEP 8 compliance
- Type hints required for all functions
- Async/await for I/O operations
- Comprehensive docstrings
Example:
async def get_recommendations(
budget: float,
duration: int,
departure_city: str,
preferences: List[str]
) -> List[SimpleRecommendation]:
"""
Generate travel recommendations based on user preferences.
Args:
budget: Total budget for the trip
duration: Trip duration in days
departure_city: City to depart from
preferences: List of user preferences
Returns:
List of simple recommendations
"""
JavaScript/Vue.js (Frontend)¶
- ESLint and Prettier configuration
- Composition API preferred
- TypeScript where applicable
- Component naming: PascalCase
Example:
<script setup>
import { ref, computed } from 'vue'
import { useRecommendations } from '@/composables/useRecommendations'
const budget = ref(1000)
const { recommendations, loading, error } = useRecommendations(budget)
</script>
Documentation¶
- Markdown for all documentation
- Clear headings and structure
- Code examples for all features
- Screenshots where helpful
๐ Development Workflow¶
1. Issue Creation¶
- Check existing issues first
- Use appropriate issue templates
- Provide clear reproduction steps
- Include system information
2. Branch Strategy¶
- Main branch:
main- Production ready - Development branch:
development- Integration branch - Feature branches:
feature/description - Bug fixes:
fix/description
3. Pull Request Process¶
-
Create feature branch:
-
Make changes and commit:
-
Push and create PR:
-
Fill out PR template:
- Clear description of changes
- Link to related issues
- Screenshots for UI changes
- Test coverage information
4. Code Review Process¶
- All PRs require at least one review
- Address feedback promptly
- Ensure CI passes
- Update documentation as needed
๐งช Testing¶
Backend Testing¶
# Run all tests
docker-compose exec backend pytest
# Run with coverage
docker-compose exec backend pytest --cov=app tests/
# Run specific test file
docker-compose exec backend pytest tests/api/test_recommendations.py
Frontend Testing¶
# Run unit tests
npm run test:unit
# Run e2e tests
npm run test:e2e
# Run with coverage
npm run test:coverage
Test Requirements¶
- Unit tests for all new functions
- Integration tests for API endpoints
- E2E tests for user workflows
- Minimum 80% coverage for new code
๐ Commit Message Convention¶
We use conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Test additions/modificationschore:- Maintenance tasks
Examples:
feat: add budget-based recommendation filtering
fix: resolve cache expiration issue
docs: update API documentation for new endpoints
test: add integration tests for recommendation service
๐จ Common Issues and Solutions¶
Environment Issues¶
- Port conflicts: Check if ports 8000/3000 are available
- Database connection: Ensure PostgreSQL is running
- Environment variables: Double-check .env configuration
Docker Issues¶
- Container won't start: Check logs with
docker-compose logs - Permission issues: Ensure Docker has proper permissions
- Build failures: Clear cache with
docker-compose build --no-cache
AI Service Issues¶
- API key errors: Verify Gemini/Claude API keys
- Rate limiting: Check API usage limits
- Response timeouts: Increase timeout values in configuration
๐ Resources¶
Documentation¶
Project-Specific¶
๐ค Community¶
Communication¶
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and ideas
- Code Reviews: Technical discussions on PRs
Getting Help¶
- Check documentation first
- Search existing issues
- Ask in GitHub Discussions
- Create detailed issue if needed
๐ Contribution Ideas¶
Good First Issues¶
- Documentation improvements
- UI/UX enhancements
- Test coverage improvements
- Code style fixes
Advanced Contributions¶
- AI prompt optimization
- Performance improvements
- New feature implementation
- Infrastructure enhancements
Areas Needing Help¶
- Frontend: Vue.js components and styling
- Backend: API endpoints and optimization
- Documentation: User guides and tutorials
- Testing: Test coverage and automation
- DevOps: CI/CD and deployment improvements
๐ Recognition¶
Contributors are recognized through: - GitHub Contributors page - Release notes mentions - Community highlights - Maintainer recommendations
Thank you for contributing to Macumba Travel! Together, we're making travel planning more accessible and intelligent for everyone. ๐โ๏ธ