Contributing to ShareJadPi โ
Thank you for your interest in contributing to ShareJadPi! This guide will help you get started.
Getting Started โ
Fork & Clone โ
bash
# Fork on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/sharejadpi.git
cd sharejadpiSet Up Development Environment โ
bash
# Create virtual environment
python -m venv .venv
# Activate it
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtRun Development Server โ
bash
cd SGP_phase1
python sharejadpi-dev.pyProject Structure โ
Making Changes โ
1. Create a Branch โ
bash
git checkout -b feature/your-feature-name2. Make Your Changes โ
- Follow the existing code style
- Add comments for complex logic
- Update documentation if needed
3. Test Your Changes โ
bash
# Run the dev server and test manually
python SGP_phase1/sharejadpi-dev.py
# Run tests (if available)
python -m pytest tests/4. Commit Your Changes โ
bash
git add .
git commit -m "feat: add your feature description"Commit Message Format โ
type: description
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation
- style: Formatting
- refactor: Code restructuring
- test: Adding tests
- chore: Maintenance5. Push & Create PR โ
bash
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
Code Style Guidelines โ
Python โ
python
# Use descriptive variable names
upload_folder = '/path/to/uploads' # โ
Good
uf = '/path/to/uploads' # โ Bad
# Add docstrings to functions
def upload_file(file):
"""
Handle file upload.
Args:
file: The file object to upload
Returns:
dict: Upload result with filename
"""
pass
# Use type hints where helpful
def format_size(size_bytes: int) -> str:
...JavaScript โ
javascript
// Use const/let, not var
const uploadZone = document.getElementById('dropZone');
// Use template literals
const message = `Uploaded ${count} files`;
// Use arrow functions for callbacks
files.forEach((file) => {
console.log(file.name);
});CSS โ
css
/* Use CSS custom properties */
.button {
background: var(--primary);
border-radius: var(--radius);
}
/* Mobile-first approach */
.container {
padding: 10px;
}
@media (min-width: 768px) {
.container {
padding: 20px;
}
}What Can You Contribute? โ
๐ Bug Fixes โ
Found a bug? Fix it and submit a PR!
โจ New Features โ
Ideas for new features:
- File preview
- Folder upload
- File compression
- Share links with expiry
๐ Documentation โ
- Fix typos
- Add examples
- Improve explanations
- Translate to other languages
๐จ UI Improvements โ
- Better mobile experience
- Accessibility improvements
- Animation enhancements
- Theme variations
๐งช Tests โ
- Unit tests
- Integration tests
- End-to-end tests
Development Workflow โ
Questions? โ
- Open an issue on GitHub
- Check existing issues for similar questions
- Be patient and respectful
Code of Conduct โ
- Be respectful and inclusive
- Welcome newcomers
- Provide constructive feedback
- Focus on the code, not the person
Thank you for contributing! ๐