First off, thank you for considering contributing to AxioDB! 🎉 It's people like you that make AxioDB such a great tool for the Node.js community.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Project Structure
- Coding Standards
- Commit Messages
- Testing
- Documentation
This project and everyone participating in it is governed by the AxioDB Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to ankansahaofficial@gmail.com.
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
Great Bug Reports include:
- Clear title and description
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Environment details:
- AxioDB version
- Node.js version
- Operating system
- Relevant dependencies
Example Bug Report:
## Bug: Collection encryption fails with custom keys
**Environment:**
- AxioDB: 3.31.104
- Node.js: 20.10.0
- OS: Ubuntu 22.04
**Steps to Reproduce:**
1. Create AxioDB instance
2. Create encrypted collection with custom key
3. Insert document
4. Error occurs
**Expected:** Document should be encrypted and saved
**Actual:** Error: "Encryption failed: Invalid key length"
**Code:**
\`\`\`javascript
const collection = await db.createCollection('test', true, schema, true, 'short');
\`\`\`Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Clear and descriptive title
- Detailed description of the proposed feature
- Use cases - why this would be useful
- Possible implementation (optional)
- Examples from other projects (optional)
We actively welcome your pull requests! Here's the process:
- Fork the repository and create your branch from
main - Make your changes following our coding standards
- Add tests if you've added code that should be tested
- Ensure the test suite passes
- Update documentation if needed
- Issue the pull request
Pull Request Guidelines:
- ✅ One feature/fix per pull request
- ✅ Follow the existing code style
- ✅ Include tests for new features
- ✅ Update documentation
- ✅ Keep commits atomic and well-described
- ❌ Don't include unrelated changes
- ❌ Don't submit large, unfocused PRs
- Node.js >= 20.0.0
- npm >= 6.0.0
- Git
- Fork and clone the repository:
git clone https://github.com/YOUR-USERNAME/AxioDB.git
cd AxioDB- Install dependencies:
npm install- Build the project:
npm run build- Run tests:
npm test- Create a branch for your work:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-descriptionAxioDB/
├── src/ # Source files (TypeScript)
│ ├── config/ # Configuration files
│ ├── core/ # Core database functionality
│ ├── utils/ # Utility functions
│ └── types/ # TypeScript type definitions
├── lib/ # Compiled JavaScript (generated)
├── Test/ # Test files
├── Document/ # Documentation website
├── Docker/ # Docker configuration
├── GUI/ # Built-in web GUI
└── package.json # Project metadata
- Use TypeScript for all new code
- Follow existing code style
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Prefer
async/awaitover callbacks
Example:
/**
* Inserts a document into the collection
* @param data - The document data to insert
* @returns Promise resolving to operation result
*/
async insert(data: object): Promise<SuccessInterface | ErrorInterface> {
// Implementation
}- Linting: Run
npm run lintbefore committing - Type Safety: No
anytypes unless absolutely necessary - Error Handling: Always handle errors appropriately
- Performance: Consider performance implications
- Security: Follow security best practices
We use ESLint for code formatting. Before committing:
npm run lintWe follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks
Examples:
feat(core): add support for bulk delete operations
Added DeleteMany method to allow efficient deletion of multiple
documents matching a query. Includes caching invalidation.
Closes #123fix(encryption): resolve key length validation issue
Fixed encryption key validation to properly check AES-256 requirements.
Minimum key length is now enforced at 32 bytes.
Fixes #456# Run all tests
npm test
# Run specific test file
node ./Test/run.js- Write tests for new features
- Update tests when modifying existing features
- Ensure tests are deterministic
- Use descriptive test names
Example Test:
// Test for insert operation
const testInsert = async () => {
const collection = await db.createCollection('test', false);
const result = await collection.insert({ name: 'Test User' });
if (result.success) {
console.log('✓ Insert test passed');
} else {
console.error('✗ Insert test failed');
}
};- Add JSDoc comments to all public APIs
- Include parameter descriptions and return types
- Provide usage examples for complex features
- Update README.md for user-facing changes
- Update documentation website in
Document/folder - Keep examples up-to-date
- Check for broken links
- Automated Checks: CI/CD runs tests and linting
- Code Review: Maintainers review the code
- Feedback: Address review comments
- Approval: Once approved, PR is merged
- Release: Changes included in next release
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
- 📧 Email: ankansahaofficial@gmail.com
- 📖 Documentation: https://axiodb.in/
Contributors are recognized in:
- GitHub contributors page
- Release notes
- Documentation (for significant contributions)
By contributing to AxioDB, you agree that your contributions will be licensed under its MIT License.
Thank you for contributing to AxioDB! 🚀
Your efforts help make database management easier for Node.js developers worldwide.