How to Contribute
We welcome contributions from the community! Whether you’re fixing bugs, adding new features, improving documentation, or suggesting enhancements, your help is appreciated.Types of Contributions
- Bug Fixes: Found a bug? Submit a fix!
- New Features: Have an idea for a new feature? Let’s discuss it!
- Documentation: Help improve or translate documentation
- Code Quality: Refactoring, performance improvements, or code cleanup
- Testing: Add or improve test coverage
Getting Started
Fork the Repository
Fork the Your Bible repository to your own GitHub account by clicking the “Fork” button on the main repository page.
Set Up Development Environment
Follow the detailed instructions in the Local Setup guide to configure your development environment.
Branch Workflow
Creating a Feature Branch
Always create a new branch for your work. Never commit directly tomain.
Branch Naming Conventions
Use descriptive branch names that follow these patterns:- Features:
feature/add-verse-bookmarks - Bug Fixes:
fix/search-pagination-error - Documentation:
docs/update-api-reference - Refactoring:
refactor/optimize-bible-query - Performance:
perf/improve-search-speed - Tests:
test/add-collection-tests
Keeping Your Branch Updated
Regularly sync your branch with the upstream repository:Code Style and Conventions
TypeScript Guidelines
- Type Safety: Always use proper TypeScript types. Avoid
anyunless absolutely necessary. - Interfaces: Prefer
typeoverinterfacefor consistency with the codebase. - Exports: Use named exports for components and utilities.
React Component Guidelines
Component Structure
Component Structure
Naming Conventions
Naming Conventions
- Components: PascalCase (e.g.,
VerseCard,BibleReader) - Files: kebab-case for component files (e.g.,
verse-card.tsx) - Hooks: camelCase with
useprefix (e.g.,useBibleData) - Constants: UPPER_SNAKE_CASE (e.g.,
API_BASE_URL) - Functions: camelCase (e.g.,
fetchVerses)
Component Organization
Component Organization
- Place reusable UI components in
src/components/ui/ - Feature-specific components go in their respective directories:
- Bible components:
src/components/bible/ - Collection components:
src/components/collections/ - Story components:
src/components/stories/ - Search components:
src/components/search/
- Bible components:
Styling Guidelines
- Tailwind CSS: Use Tailwind utility classes for styling
- Component Variants: Use
class-variance-authority(CVA) for component variants - Responsive Design: Always consider mobile-first design
Code Formatting
- Indentation: 2 spaces (no tabs)
- Quotes: Single quotes for strings, except in JSX
- Semicolons: Use semicolons
- Line Length: Aim for 80-100 characters per line
Testing Requirements
Before Submitting
Manual Testing Checklist
Manual Testing Checklist
- Test your changes in development mode (
pnpm dev) - Test the production build (
pnpm build) - Verify functionality works on both desktop and mobile viewports
- Test with different Bible translations if applicable
- Check console for errors or warnings
- Test authentication flows if your changes affect auth
Feature-Specific Testing
Feature-Specific Testing
For Bible Reading Features:
- Test chapter navigation (previous/next)
- Verify verse highlighting works correctly
- Test with different Bible translations
- Test creating, editing, and deleting collections
- Verify verse adding/removal works
- Check that only the user’s collections are visible
- Test story creation with various parameters
- Verify rate limiting works (5 stories per day)
- Check story display and deletion
- Test search with various keywords
- Verify pagination works correctly
- Test search across different Bible translations
Commit Guidelines
Commit Messages
Write clear, descriptive commit messages:Commit Message Format
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks
Pull Request Process
Create Pull Request
- Go to your fork on GitHub
- Click “Compare & pull request”
- Fill out the PR template with:
- Clear description of changes
- Screenshots (if UI changes)
- Testing steps
- Related issues
Pull Request Template
Your PR description should include:Code Review Process
What to Expect
- Reviews typically happen within 2-3 business days
- Reviewers will check code quality, functionality, and alignment with project goals
- Be open to feedback and suggestions
- Multiple review rounds may be necessary
Review Checklist
Reviewers will look for:- Code follows project conventions and style guide
- TypeScript types are properly used
- No unnecessary dependencies added
- Components are properly organized
- Changes are well-documented
- No breaking changes without discussion
- Performance considerations addressed
Getting Help
Resources
- Documentation: Check the docs for guides and references
- Issues: Browse existing issues for similar problems
- Discussions: Join community discussions for questions and ideas
Asking Questions
When asking for help:- Check existing documentation first
- Search for similar issues or questions
- Provide context: what you’re trying to do, what you’ve tried, what’s not working
- Include error messages and relevant code snippets
- Share your environment details (OS, Node version, etc.)