Hackmamba Docs

Contributing

Contribute to the Hackmamba project and community

Help improve Hackmamba by contributing to our project and community.

Ways to Contribute

Code Contributions

Bug Fixes

  • Report bugs through GitHub Issues
  • Fix bugs and submit pull requests
  • Test fixes thoroughly before submitting

Feature Development

  • Propose features through GitHub Discussions
  • Implement features following our guidelines
  • Write tests for new functionality

Documentation

  • Improve existing docs with clarifications
  • Add missing documentation for features
  • Fix typos and improve readability

Community Contributions

Answer Questions

  • Help in Discord - Answer questions in real-time
  • GitHub Discussions - Provide detailed answers
  • Stack Overflow - Help with tagged questions

Share Knowledge

  • Write tutorials and guides
  • Create code examples and samples
  • Share integration stories

Translation

  • Translate documentation to other languages
  • Localize content for different regions
  • Maintain translations over time

Getting Started

Prerequisites

  • Git - Version control
  • Node.js - v18 or higher
  • npm - Package manager
  • Code Editor - VS Code recommended

Setup Development Environment

  1. Fork the repository

    # Fork on GitHub, then clone
    git clone https://github.com/your-username/hackmamba.git
    cd hackmamba
  2. Install dependencies

    npm install
  3. Set up environment

    cp .env.example .env.local
    # Edit .env.local with your values
  4. Start development server

    npm run dev

Development Workflow

  1. Create a branch

    git checkout -b feature/your-feature-name
  2. Make changes

    • Write code following our style guide
    • Add tests for new functionality
    • Update documentation as needed
  3. Test your changes

    npm test
    npm run lint
    npm run build
  4. Commit changes

    git add .
    git commit -m "feat: add new feature"
  5. Push and create PR

    git push origin feature/your-feature-name
    # Create pull request on GitHub

Code Style Guide

JavaScript/TypeScript

  • Use TypeScript for new code
  • Follow ESLint rules - configured in project
  • Use Prettier for code formatting
  • Write meaningful names for variables and functions
// Good
interface User {
  id: string;
  name: string;
  email: string;
}

async function createUser(userData: CreateUserRequest): Promise<User> {
  // Implementation
}

// Bad
interface u {
  i: string;
  n: string;
  e: string;
}

async function create(u: any): Promise<any> {
  // Implementation
}

Documentation

  • Use Markdown for documentation
  • Include examples in code blocks
  • Write clear descriptions for functions and classes
  • Update README for significant changes
## Function Name

Brief description of what the function does.

### Parameters

- `param1` (string): Description of parameter
- `param2` (number): Description of parameter

### Returns

Description of return value.

### Example

```typescript
const result = functionName("example", 123);
console.log(result); // Expected output
```

## Pull Request Guidelines

### Before Submitting

- [ ] **Code follows** style guidelines
- [ ] **Tests pass** locally
- [ ] **Documentation updated** if needed
- [ ] **No console errors** or warnings
- [ ] **Feature works** as expected

### PR Description

Include the following in your PR description:

- **What** - What changes are made
- **Why** - Why these changes are needed
- **How** - How the changes work
- **Testing** - How to test the changes

### Example PR Description

```markdown
## What
Adds user creation API endpoint with validation.

## Why
Users need a way to create new accounts through the API.

## How
- Added POST /v1/users endpoint
- Implemented input validation
- Added error handling for duplicate emails
- Created comprehensive tests

## Testing
- Run `npm test` to run all tests
- Test with Postman collection in /docs/api
- Verify error handling with invalid data

Issue Guidelines

Bug Reports

Use the bug report template:

## Bug Description

Brief description of the bug.

## Steps to Reproduce

1. Go to '...'
2. Click on '...'
3. See error

## Expected Behavior

What should happen.

## Actual Behavior

What actually happens.

## Environment

- OS: [e.g., Windows 10]
- Browser: [e.g., Chrome 91]
- Version: [e.g., 1.2.3]

## Additional Context

Any other context about the problem.

Feature Requests

Use the feature request template:

## Feature Description

Brief description of the feature.

## Problem Statement

What problem does this solve?

## Proposed Solution

How should this work?

## Alternatives Considered

What other solutions were considered?

## Additional Context

Any other context or screenshots.

Community Guidelines

Code of Conduct

  • Be respectful and inclusive
  • Be constructive in feedback
  • Be patient with newcomers
  • Be collaborative in discussions

Communication

  • Use clear language in issues and PRs
  • Be specific about problems and solutions
  • Ask questions when unclear
  • Help others when you can

Recognition

Contributors

We recognize contributors in several ways:

  • Contributor badges on GitHub
  • Hall of Fame in documentation
  • Swag for significant contributions
  • Conference speaking opportunities

Types of Contributions

  • Code - Bug fixes, features, tests
  • Documentation - Guides, examples, translations
  • Community - Helping others, answering questions
  • Design - UI/UX improvements, graphics

Getting Help

Questions About Contributing

Mentorship

  • New contributor program
  • Pair programming sessions
  • Code review guidance
  • Learning resources