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.Getting Started
Before You Begin
Set Up Development Environment
Understand the Architecture
Check Existing Issues
Fork and Clone
Fork the Repository
Clone Your Fork
Add Upstream Remote
Project Structure
Understanding the codebase structure will help you navigate and contribute effectively:Key Files
src/App.jsx
src/App.jsx
- State management
- Supabase realtime subscriptions
- UI components
- Clipboard operations
- File upload logic
src/App.jsx:1-706src/config/supabase.js
src/config/supabase.js
src/config/supabase.js:1-7src/service/doc.service.js
src/service/doc.service.js
createSession function for generating random session codes.Reference: src/service/doc.service.js:1-14vite.config.js
vite.config.js
vite.config.js:1-52Code Style Guidelines
JavaScript/React Conventions
- Component Style
- Naming Conventions
- Async/Await
- Error Handling
CSS/Tailwind Conventions
- Utility Classes
- Responsive Design
- Dark Mode
- Avoid Custom CSS
Supabase Best Practices
Query Patterns
Query Patterns
src/App.jsx:68-82Realtime Subscriptions
Realtime Subscriptions
src/App.jsx:386-410Storage Operations
Storage Operations
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
- 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)
Run Linter
package.json:9Commit Your Changes
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code refactoringperf: Performancetest: Testschore: Maintenance
Syncing with Upstream
Fetch Latest Changes
Merge Main Branch
Rebase Your Feature Branch
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
Open Multiple Windows
Use Different Browsers
Test Scenarios
- Add content in Window A → Should appear in B and C
- Delete in Window B → Should disappear in A and C
- Edit in Window C → Should update in A and B
- Upload file in A → Should appear with link in B and C
Performance Testing
Large History
- Scroll performance
- Search responsiveness
- Memory usage
File Uploads
- Compression speed
- Upload progress
- Large file handling
Network Conditions
- Slow 3G
- Offline/online transitions
- High latency
Multiple 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
- Update README if needed
- Add code comments for complex logic
- Update this contributing guide if workflow changes
Push to Your Fork
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
feat:- New featurefix:- Bug fixdocs:- Documentationrefactor:- Code refactoringperf:- Performance improvement
Write Detailed Description
Request Review
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
- Explain why something should change
- Suggest alternatives
- Distinguish between required changes and suggestions
For Contributors
- 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
GitHub Discussions
Issue Tracker
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)