Thank you for your interest in contributing to O2FileSearchPlus Enhanced! This document provides guidelines and information for contributors.
- Python 3.8+ with pip
- Node.js 18+ with npm
- Git
- Linux environment (recommended)
-
Fork and clone the repository:
git clone https://github.com/yourusername/O2FileSearchPlus.git cd O2FileSearchPlus -
Run the setup script:
chmod +x setup.sh ./setup.sh
-
Start development servers:
./start_all.sh
O2FileSearchPlus/
├── backend/ # FastAPI backend
├── frontend/ # Next.js frontend
├── legacy/ # Original Streamlit applications
├── setup.sh # Automated setup script
└── docs/ # Documentation
-
Navigate to backend directory:
cd backend source venv/bin/activate
-
Install development dependencies:
pip install -r requirements.txt
-
Run backend with auto-reload:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
-
API Documentation: Available at
http://localhost:8000/docs
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run development server:
npm run dev
-
Build for production:
npm run build
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Write docstrings for functions and classes
- Use meaningful variable and function names
- Keep functions focused and small
Example:
from typing import List, Optional
from pydantic import BaseModel
class SearchRequest(BaseModel):
"""Request model for file search operations."""
extensions: Optional[List[str]] = None
min_size: int = 0
max_size: int = 1073741824 # 1GB
def search_files(request: SearchRequest) -> List[FileResult]:
"""
Search files based on provided criteria.
Args:
request: Search parameters and filters
Returns:
List of matching files
"""
# Implementation here
pass- Use TypeScript for type safety
- Follow React best practices and hooks patterns
- Use functional components over class components
- Implement proper error boundaries
- Use meaningful component and variable names
Example:
interface SearchFormProps {
onSearch: (criteria: SearchCriteria) => void;
isLoading: boolean;
}
const SearchForm: React.FC<SearchFormProps> = ({ onSearch, isLoading }) => {
const [criteria, setCriteria] = useState<SearchCriteria>({
extensions: [],
minSize: 0,
maxSize: 1073741824,
});
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
onSearch(criteria);
};
return (
<form onSubmit={handleSubmit}>
{/* Form implementation */}
</form>
);
};cd backend
python -m pytest tests/ -vcd frontend
npm test
npm run test:e2e # End-to-end tests-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Write clean, documented code
- Add tests for new functionality
- Update documentation as needed
-
Test your changes:
# Backend tests cd backend && python -m pytest # Frontend tests cd frontend && npm test # Integration test ./setup.sh && ./start_all.sh
-
Commit your changes:
git add . git commit -m "feat: add new search filter functionality"
-
Push and create PR:
git push origin feature/your-feature-name
Use conventional commits format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
When reporting bugs, please include:
-
Environment information:
- OS version
- Python version
- Node.js version
- Browser (for frontend issues)
-
Steps to reproduce:
- Clear, numbered steps
- Expected vs actual behavior
- Screenshots if applicable
-
Error messages:
- Full error logs
- Console output
- Network errors (if applicable)
For new features:
- Check existing issues to avoid duplicates
- Describe the problem the feature would solve
- Propose a solution with implementation details
- Consider alternatives and their trade-offs
- Performance optimization for large file sets
- AI/LLM integration for semantic search
- File content preview functionality
- Advanced duplicate management
- Search history and saved searches
- Additional file format support
- Cloud storage integration
- Mobile app development
- Advanced filtering options
- Batch file operations
- API documentation improvements
- User guides and tutorials
- Architecture documentation
- Deployment guides
- Video tutorials
- Do not create public issues for security vulnerabilities
- Email security issues to: [security@yourproject.com]
- Include detailed reproduction steps
- Allow time for fixes before public disclosure
- Validate all user inputs
- Use parameterized queries for database operations
- Implement proper authentication and authorization
- Follow OWASP security guidelines
- Regular dependency updates
- Python Black - Code formatting
- ESLint - JavaScript linting
- Prettier - Code formatting
- TypeScript - Type checking
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and ideas
- Pull Requests: Code contributions and reviews
- Be respectful and inclusive
- Provide constructive feedback
- Help newcomers get started
- Focus on the project's goals
- Maintain professional communication
By contributing to O2FileSearchPlus Enhanced, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Project documentation
Thank you for contributing to O2FileSearchPlus Enhanced! 🚀