Welcome Contributors
Thank you for your interest in contributing to ClipSync! This guide will help you get started with contributing code, reporting issues, and improving documentation.ClipSync is an open-source project, and we welcome contributions of all kinds - from bug fixes to new features, documentation improvements to performance optimizations.
Getting Started
Before You Begin
Set Up Development Environment
Follow the Local Setup Guide to get ClipSync running on your machine.
Understand the Architecture
Read the Architecture Documentation to understand how the app works.
Check Existing Issues
Look through GitHub Issues to see if your idea or bug is already being discussed.
Fork and Clone
Project Structure
Understanding the codebase structure will help you navigate and contribute effectively:Key Files
src/App.jsx
src/App.jsx
Lines: 706 totalThe main application component containing:
- State management
- Supabase realtime subscriptions
- UI components
- Clipboard operations
- File upload logic
src/App.jsx:1-706src/config/supabase.js
src/config/supabase.js
Lines: 7 totalInitializes the Supabase client with environment variables.Reference:
src/config/supabase.js:1-7src/service/doc.service.js
src/service/doc.service.js
Lines: 14 totalContains the
createSession function for generating random session codes.Reference: src/service/doc.service.js:1-14vite.config.js
vite.config.js
Lines: 52 totalConfigures Vite and PWA settings including manifest and service worker.Reference:
vite.config.js:1-52Code Style Guidelines
JavaScript/React Conventions
- Component Style
- Naming Conventions
- Async/Await
- Error Handling
Use Functional Components
CSS/Tailwind Conventions
- Utility Classes
- Responsive Design
- Dark Mode
- Avoid Custom CSS
Use Tailwind utilities consistently
Supabase Best Practices
Query Patterns
Query Patterns
Structure queries consistently:Reference:
src/App.jsx:68-82Realtime Subscriptions
Realtime Subscriptions
Clean up subscriptions:Reference:
src/App.jsx:386-410Storage Operations
Storage Operations
Handle file uploads properly:Reference:
src/App.jsx:136-164Development Workflow
Creating a New Feature
Create a Feature Branch
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringperf/- Performance improvements
Make Your Changes
Write your code following the style guidelines above.Tips:
- Keep commits focused and atomic
- Test your changes locally
- Check console for errors
Test Thoroughly
- Manual Testing
- Edge Cases
- Test in Chrome, Firefox, and Safari
- Test on mobile device
- Test with multiple browser tabs
- Test offline mode
- Test file uploads (images and documents)
Syncing with Upstream
Testing Approach
Manual Testing Checklist
- Core Functionality
- UI/UX
- PWA Features
Session Management
Session Management
- Generate new session
- Join existing session
- Session code validation
- Leave session
- Session persistence across refreshes
Clipboard Operations
Clipboard Operations
- Add clipboard content
- Copy content to clipboard
- Edit clipboard entry
- Delete single entry
- Delete all entries
- Mark content as sensitive
File Operations
File Operations
- Upload text file
- Upload image (compression works)
- Upload document (PDF, Word, etc.)
- Download/view uploaded file
- Delete uploaded file
- File size validation (>10MB rejected)
Realtime Sync
Realtime Sync
- New entries appear in other tabs
- Deleted entries disappear in other tabs
- Syncs across different devices
- Handles network interruptions
Testing Realtime Sync
Performance Testing
Large History
Test with 100+ clipboard entries
- Scroll performance
- Search responsiveness
- Memory usage
File Uploads
Test file upload performance
- Compression speed
- Upload progress
- Large file handling
Network Conditions
Test under poor network
- Slow 3G
- Offline/online transitions
- High latency
Multiple Devices
Test with many connected devices
- 5+ devices in same session
- Sync performance
- Realtime lag
Submitting Pull Requests
Before Submitting
Complete Checklist
- Code follows style guidelines
- All tests pass
- Linter passes (
npm run lint) - Feature works in Chrome, Firefox, Safari
- Mobile responsive
- Dark mode works
- No console errors
- Realtime sync tested
Update Documentation
If your feature adds new functionality:
- Update README if needed
- Add code comments for complex logic
- Update this contributing guide if workflow changes
Creating the Pull Request
Open PR on GitHub
- Go to your forked repository
- Click “Compare & pull request”
- Select the base repository and branch
Write a Clear Title
Format:Use prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentationrefactor:- Code refactoringperf:- Performance improvement
After Submitting
- Respond to Feedback
- CI/CD Checks
- Keep Updated
- Check for review comments
- Address requested changes promptly
- Push additional commits to the same branch
- Be respectful and open to suggestions
Code Review Guidelines
For Reviewers
What to Look For
What to Look For
- Code follows style guidelines
- No obvious bugs or edge cases
- Error handling is present
- Performance considerations
- Security concerns (especially with file uploads)
- Accessibility issues
Providing Feedback
Providing Feedback
Be constructive:
- Explain why something should change
- Suggest alternatives
- Distinguish between required changes and suggestions
For Contributors
Responding to reviews:
- Thank reviewers for their time
- Ask questions if feedback is unclear
- Don’t take criticism personally
- Mark conversations as resolved after addressing
Common Contribution Areas
Good First Issues
UI Improvements
- Add animations
- Improve mobile layout
- Enhance dark mode colors
- Better loading states
Feature Enhancements
- Add keyboard shortcuts
- Implement drag-and-drop
- Add more file type support
- Enhanced search (regex, filters)
Bug Fixes
- Fix edge cases
- Improve error messages
- Handle race conditions
- Memory leak fixes
Documentation
- Improve code comments
- Add setup tutorials
- Create video guides
- Translate to other languages
Areas Needing Help
- Testing
- Authentication
- Features
- Add unit tests (React Testing Library)
- E2E tests (Playwright/Cypress)
- Performance benchmarks
- Accessibility audits
Getting Help
Discord
Join our Discord server for real-time help and discussions
GitHub Discussions
Ask questions and share ideas in GitHub Discussions
Issue Tracker
Report bugs or request features via GitHub Issues
Contact maintainers directly for sensitive topics
Code of Conduct
Our Pledge
We are committed to providing a welcoming and inclusive environment for all contributors.- Expected Behavior
- Unacceptable Behavior
- Be respectful and inclusive
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy towards others
Recognition
All contributors will be:- Added to CONTRIBUTORS.md
- Mentioned in release notes
- Given credit in the README
- Featured on our website (if applicable)
Thank you for contributing to ClipSync! Your efforts help make this project better for everyone.
Next Steps
Local Setup
Get your development environment ready
Architecture
Understand how ClipSync works
Tech Stack
Learn about the technologies used