Contributing to JifiJs

Thank you for your interest in contributing to JifiJs! π
We welcome contributions from developers of all experience levels. Whether you're fixing a bug, adding a feature, or improving documentation, your help makes JifiJs better for everyone.
π Ways to Contributeβ
1. Report Bugs πβ
Found a bug? Please report it!
- Check existing issues first to avoid duplicates
- Use the bug report template on GitHub
- Include reproduction steps and environment details
- Add relevant logs or screenshots
2. Suggest Features π‘β
Have an idea to make JifiJs better?
- Search existing feature requests first
- Describe the use case and expected benefit
- Consider backward compatibility
- Be open to discussion on implementation
3. Improve Documentation πβ
Documentation improvements are always welcome:
- Fix typos or unclear explanations
- Add examples and use cases
- Improve code snippets
- Translate to other languages
4. Submit Code π§β
Ready to write code? Great! Follow the guidelines below.
π Getting Startedβ
Prerequisitesβ
Before contributing, ensure you have:
- Node.js 18+ installed
- npm or yarn package manager
- Git for version control
- MongoDB for database testing (optional, can use Docker)
- Redis for caching tests (optional, can use Docker)
Fork and Cloneβ
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/jifijs.git
cd jifijs
- Add upstream remote:
git remote add upstream https://github.com/mrnjifanda/jifijs.git
Install Dependenciesβ
npm install
Set Up Environmentβ
Copy the example environment file:
cp .env.example .env
Update .env with your local configuration (MongoDB, Redis, etc.)
ποΈ Development Workflowβ
1. Create a Feature Branchβ
Always create a new branch for your work:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description
Branch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding or updating tests
2. Make Your Changesβ
Write clean, maintainable code that follows our standards:
- Use TypeScript with strict mode
- Follow existing code style and patterns
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
3. Test Your Changesβ
Run the test suite to ensure nothing breaks:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Check test coverage
npm run test:coverage
# Run linter
npm run lint
# Fix linting issues
npm run lint:fix
4. Commit Your Changesβ
Write clear, descriptive commit messages:
git add .
git commit -m "feat: add user profile caching"
Commit message format:
<type>: <subject>
<body (optional)>
<footer (optional)>
Types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, semicolons, etc.)refactor- Code refactoringtest- Adding or updating testschore- Build process or auxiliary tool changes
Examples:
feat: add email verification for new users
fix: resolve token expiration issue in authentication
docs: update installation guide with Docker setup
refactor: simplify user service error handling
test: add unit tests for file upload service
5. Push and Create Pull Requestβ
Push your changes and create a PR:
git push origin feature/your-feature-name
Then open a Pull Request on GitHub with:
- Clear title describing the change
- Description of what changed and why
- Reference to related issues (e.g., "Fixes #123")
- Screenshots for UI changes (if applicable)
π Code Standardsβ
TypeScript Guidelinesβ
// β
Good: Clear types and interfaces
interface UserProfile {
id: string;
email: string;
createdAt: Date;
}
async function getUserProfile(userId: string): Promise<UserProfile> {
// Implementation
}
// β Bad: Using 'any' or missing types
async function getUserProfile(userId) {
// Implementation
}
Naming Conventionsβ
- Classes: PascalCase (
UserService,AuthController) - Functions/Methods: camelCase (
getUser,validateEmail) - Constants: UPPER_SNAKE_CASE (
MAX_RETRY_ATTEMPTS) - Interfaces: PascalCase with 'I' prefix (
IUserRepository) - Files: kebab-case (
user-service.ts,auth-controller.ts)
Code Styleβ
- Use 2 spaces for indentation
- Use single quotes for strings
- Add semicolons at the end of statements
- Keep line length under 120 characters
- Add JSDoc comments for public APIs
/**
* Validates user email address
* @param email - The email address to validate
* @returns True if email is valid, false otherwise
*/
function validateEmail(email: string): boolean {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
}
π§ͺ Testing Guidelinesβ
Writing Testsβ
- Write tests for all new features
- Maintain or improve code coverage
- Use descriptive test names
- Test edge cases and error scenarios
describe('UserService', () => {
describe('createUser', () => {
it('should create a new user with valid data', async () => {
// Test implementation
});
it('should throw error when email already exists', async () => {
// Test implementation
});
it('should hash password before saving', async () => {
// Test implementation
});
});
});
Test Structureβ
tests/
βββ unit/ # Unit tests for individual functions/methods
βββ integration/ # Integration tests for API endpoints
βββ e2e/ # End-to-end tests for complete workflows
π Documentation Guidelinesβ
When updating documentation:
Code Documentationβ
- Add JSDoc comments for public APIs
- Include parameter descriptions and return types
- Provide usage examples
Markdown Documentationβ
- Use clear, concise language
- Include code examples
- Add screenshots when helpful
- Keep formatting consistent
π Pull Request Review Processβ
- Automated checks run on your PR (tests, linting)
- Maintainer review within 48 hours
- Feedback and discussion if changes needed
- Approval and merge once ready
What We Look Forβ
- β Code quality and style
- β Test coverage
- β Documentation updates
- β No breaking changes (without discussion)
- β Performance considerations
π― Priority Areasβ
We especially welcome contributions in these areas:
- Test Coverage - Improving test coverage for existing code
- Documentation - Better examples, guides, and API docs
- Performance - Optimizations and benchmarks
- Bug Fixes - Resolving open issues
- TypeScript Types - Improving type definitions
β Questions?β
Need help with your contribution?
- GitHub Discussions: Ask questions
- GitHub Issues: Get help with issues
- Email: jifijs@njifanda.com
π Recognitionβ
All contributors are recognized in our:
- README contributors section
- Release notes for their contributions
- GitHub contributors page
π Code of Conductβ
We expect all contributors to:
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what's best for the community
- Show empathy towards others
π Licenseβ
By contributing to JifiJs, you agree that your contributions will be licensed under the MIT License.

Ready to Contribute?
Join our community of contributors and help make JifiJs better!