Thank you for your interest in contributing to the @muslims-community/quran package! This project aims to provide a reliable, offline Quran data package for JavaScript applications.
- 🐛 Bug Reports - Report issues you encounter
- 💡 Feature Requests - Suggest new functionality
- 📖 Documentation - Improve docs and examples
- 🧪 Tests - Add or improve test coverage
- 🔧 Code - Fix bugs or implement features
- Node.js (v14 or higher)
- npm (v6 or higher)
- Git
-
Fork the repository
# Fork on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/quran-data-js.git cd quran-data-js
-
Install dependencies
npm install
-
Build the project
npm run build
-
Run tests
npm test
quran-data-js/
├── data/ # Source Quran data files from Tanzil.net
├── dist/ # Built package files (auto-generated)
├── scripts/ # Build scripts
├── src/ # Source code
├── types/ # TypeScript definitions
├── test.js # Test file
└── package.json # Package configuration
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation if needed
-
Test your changes
npm test npm run build -
Commit your changes
git add . git commit -m "feat: add new feature description"
Use conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or changesrefactor:- Code refactoringchore:- Maintenance tasks
Examples:
feat: add search by surah name functionalityfix: handle edge case in getAyah functiondocs: update API documentation
npm testWhen adding new functionality:
- Add test cases in
test.js - Test both success and error scenarios
- Verify TypeScript definitions work correctly
Ensure your changes don't break existing functionality:
- All existing tests must pass
- New features should include tests
- Edge cases should be covered
When adding new functions:
- Add JSDoc comments to source code
- Update TypeScript definitions in
types/index.d.ts - Add examples to
README.md - Update this contributing guide if needed
Provide clear, working examples:
// Good example
import { getAyah } from '@muslims-community/quran';
const ayah = getAyah(1, 1);
console.log(ayah.text); // "بِسمِ اللَّهِ الرَّحمٰنِ الرَّحيمِ"CRITICAL: The Quran text must never be modified.
- ✅ Allowed: Formatting, organizing, adding metadata
- ❌ Forbidden: Changing any Arabic text, diacritics, or words
- 📚 Source: All text must remain exactly as provided by Tanzil.net
Always maintain proper attribution:
- Keep Tanzil Project attribution in all responses
- Include source information in API responses
- Maintain copyright notices in license files
- Use ES6+ features
- Prefer
constoverlet - Use descriptive variable names
- Add JSDoc comments for public functions
/**
* Get a specific ayah from the Quran
* @param {number} surahId - The surah number (1-114)
* @param {number} ayahId - The ayah number within the surah
* @returns {AyahWithSurah} The ayah with surah information
*/
function getAyah(surahId, ayahId) {
// Implementation
}- Validate input parameters
- Provide clear error messages
- Use appropriate error types
if (typeof surahId !== 'number') {
throw new Error('Surah ID must be a number');
}
if (surahId < 1 || surahId > 114) {
throw new Error('Surah ID must be between 1 and 114');
}- ✅ Tests pass:
npm test - ✅ Build succeeds:
npm run build - ✅ Code follows style guidelines
- ✅ Documentation is updated
- ✅ Commit messages follow conventions
-
Push to your fork
git push origin feature/your-feature-name
-
Create Pull Request
- Use a clear, descriptive title
- Explain what changes you made and why
- Reference any related issues
- Include screenshots if relevant
-
PR Template
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation update - [ ] Refactoring ## Testing - [ ] Tests pass - [ ] New tests added (if applicable) ## Checklist - [ ] Code follows style guidelines - [ ] Documentation updated - [ ] Quran text integrity maintained
Contributors will be:
- Added to the contributors list
- Mentioned in release notes
- Credited in documentation
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
- 📧 Email: memoibraheem1@gmail.com
This project follows Islamic principles of respect, kindness, and collaboration:
- Be respectful and inclusive
- Help others learn and grow
- Focus on constructive feedback
- Maintain the sanctity of the Quranic content
Our mission is to:
- Provide reliable, authentic Quran data for developers
- Maintain the highest standards of text accuracy
- Support the global Muslim developer community
- Enable Islamic applications worldwide
جزاك الله خيراً (May Allah reward you with good) for contributing to this project!
Made with ❤️ by the Muslim Community