Thank you for your interest in contributing to Vectr! We're excited to have you help us build a better AI-powered image search application.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/vectr.git - Install dependencies:
pnpm install - Set up your environment variables (see README.md)
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes
- Test your changes locally with
pnpm dev - Run linting and formatting:
pnpm check && pnpm format - Commit your changes with clear, descriptive commit messages
- Push to your fork
- Submit a Pull Request
# Start the development server
pnpm dev
# Run linting checks
pnpm check
# Format code
pnpm formatBefore submitting a PR, please ensure:
- The app builds successfully:
pnpm build - All linting checks pass:
pnpm check - Code is properly formatted:
pnpm format - Test the full workflow:
- Upload an image
- Verify it appears in the UI
- Check that the description is generated
- Test semantic search functionality
- Ensure your PR addresses a specific issue or adds value to the project
- Include a clear description of the changes and why they're needed
- Keep changes focused and atomic - one feature/fix per PR
- Follow existing code style and conventions
- Update documentation (README.md) if you're changing functionality
- Add comments to explain complex workflow logic or error handling
- If you're modifying workflow steps, ensure retry logic and error handling are preserved
- Formatting: We use Biome for linting and formatting
- TypeScript: Use strict typing - avoid
anytypes - Components: Follow React best practices and use functional components
- Workflow Steps: Each step should:
- Use
"use step"directive - Include comprehensive error handling with
RetryableErrorandFatalError - Use
getStepMetadata()for context-aware retries - Have appropriate
maxRetriesconfiguration - Include logging with step IDs
- Use
- Naming: Use descriptive names for variables, functions, and files
- Comments: Add comments to explain "why", not "what" (code should be self-documenting)
If you're modifying workflow logic:
- Each step should be isolated in its own file
- Always use
"use step"directive for steps - Always use
"use workflow"directive for workflows - Implement proper error classification:
RetryableError: Temporary failures (rate limits, network issues)FatalError: Permanent failures (invalid data, constraint violations)- Generic
Error: Automatic retry with exponential backoff
- Include retry configuration:
functionName.maxRetries = N - Use
getStepMetadata()for attempt tracking and logging
If you're modifying how data is indexed in Upstash:
- Update
index-image.tsto change metadata structure - Test locally to ensure search results include all needed data
- Document any breaking changes in your PR
- Consider backward compatibility with existing indexed data
If you're modifying the UI:
- Use existing shadcn/ui components where possible
- Follow Tailwind CSS 4 conventions
- Ensure responsive design (mobile-first)
- Test dark mode compatibility
- Maintain accessibility standards
When reporting bugs or requesting features:
- Use the GitHub issue tracker
- Check if the issue already exists before creating a new one
- For bugs, include:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshots if applicable
- Browser/environment details
- For features, explain:
- The use case
- Why it would benefit users
- Potential implementation approach
We welcome contributions in these areas:
- UI/UX improvements: Better image gallery, search interface, upload feedback
- Performance: Optimize image loading, caching strategies
- Features: Batch uploads, image editing, advanced search filters
- Error handling: Better error messages, retry strategies
- Documentation: Tutorials, examples, API documentation
- Testing: Unit tests, integration tests, E2E tests
- Accessibility: ARIA labels, keyboard navigation
- Internationalization: Multi-language support
- Open a GitHub issue for questions
- Check the README.md for setup and architecture details
- Review existing PRs and issues for similar discussions
Please be respectful and constructive in all interactions. We're building a welcoming community where everyone can contribute.
By contributing to Vectr, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Vectr!