Thank you for your interest in contributing to SyncVault! This document provides guidelines and instructions for contributing.
- Node.js 18+
- npm, yarn, or pnpm
- Git
-
Fork and Clone
git clone https://github.com/your-username/sync-vault-js.git cd sync-vault-js -
Install Dependencies
npm install
-
Build the Package
npm run build
-
Run the Demo
npm run demo
This will start the interactive demo at
http://localhost:8000 -
Run Tests (when available)
npm test
The demo app in /demo is the best way to test your changes:
- Make your changes to the source code
- Run
npm run buildto rebuild - Run
npm run demoto see your changes in action - Test various scenarios:
- Queue requests when offline
- Process queue when coming online
- Test retry logic with failing endpoints
- Verify Dead Letter Queue behavior
- Request queuing works when offline
- Queue processes when coming online
- Exponential backoff retry logic works
- Dead Letter Queue captures failed jobs
- Events are emitted correctly
- Storage adapters work (IndexedDB and Memory)
- Network detection works (online/offline events)
- Framework integrations work (React, Vue, Angular, Svelte)
- TypeScript: Strict mode, no
anytypes - Formatting: Follow existing code style
- Naming: Use descriptive names, camelCase for variables/functions, PascalCase for classes
- Comments: Document complex logic and public APIs
src/
├── core/ # Core library logic (framework-agnostic)
├── storage/ # Storage adapters (IndexedDB, Memory)
├── utils/ # Utility functions (retry, backoff)
└── integrations/ # Framework-specific wrappers
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Update tests and documentation
- Test with the demo app
- Submit a pull request
- Create a bugfix branch:
git checkout -b fix/bug-description - Fix the issue
- Add tests if possible
- Test with the demo app
- Submit a pull request
- Update README.md for user-facing changes
- Add JSDoc comments for new public APIs
- Update demo app if adding new features
- Update Documentation: Ensure README and code comments are updated
- Test Thoroughly: Use the demo app to test all scenarios
- Write Clear PR Description: Explain what changed and why
- Link Issues: Reference any related issues
- Keep PRs Focused: One feature/fix per PR when possible
All submissions require review. We use GitHub pull requests for this purpose. The review process includes:
- Code quality and style
- Functionality testing
- Documentation completeness
- Performance considerations
- Open an issue for bugs or feature requests
- Check existing issues and PRs first
- Be respectful and constructive in discussions
Thank you for contributing to SyncVault! 🚀