Skip to content

Latest commit

 

History

History
222 lines (161 loc) · 5.15 KB

File metadata and controls

222 lines (161 loc) · 5.15 KB

Contributing to SQLMap GUI

First off, thank you for considering contributing to SQLMap GUI! 🎉

📋 Table of Contents

Code of Conduct

This project and everyone participating in it is governed by respect and professionalism. By participating, you are expected to uphold this code.

How Can I Contribute?

🐛 Reporting Bugs

Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:

  • Clear title and description
  • Steps to reproduce the issue
  • Expected behavior vs actual behavior
  • Screenshots if applicable
  • Environment details (OS, Bun version, Python version)
  • Error logs from backend/logs/error.log

💡 Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:

  • Clear title and description
  • Use case - why this enhancement would be useful
  • Proposed implementation if you have ideas
  • Mockups or examples if applicable

🔧 Pull Requests

  1. Fork the repo and create your branch from master
  2. If you've added code, update the documentation
  3. Ensure the test suite passes (if applicable)
  4. Make sure your code follows the existing style
  5. Write a clear commit message

Development Setup

Prerequisites

  • Bun >= 1.0
  • Python >= 3.10
  • Git

Setup Steps

# Clone your fork
git clone https://github.com/YOUR_USERNAME/sqlgui.git
cd sqlgui

# Install dependencies
cd backend && bun install && cd ..
cd frontend && bun install && cd ..
cd webui && bun install && cd ..

# Run in development mode
bun run webui

Project Structure

sqlgui/
├── backend/     # Express API + SQLite
├── frontend/    # React + Vite UI
├── webui/       # Next.js WebUI (primary)
└── sqlmap/      # SQLMap installation

Pull Request Process

  1. Update Documentation: Update the README.md with details of changes
  2. Follow Code Style: Match existing TypeScript/React patterns
  3. Test Your Changes: Ensure everything works
  4. Update Changelog: Add your changes to CHANGELOG.md
  5. One Feature Per PR: Keep pull requests focused
  6. Link Issues: Reference related issues in your PR description

PR Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Comments added for complex code
  • Documentation updated
  • No new warnings generated
  • Works with both frontend and webui
  • Tested on Windows (if applicable)

Coding Standards

TypeScript/JavaScript

  • Use TypeScript for type safety
  • Follow ESLint rules
  • Use async/await over promises
  • Prefer const over let
  • Use meaningful variable names

React Components

// ✅ Good
export function ScanCard({ scan, onStop }: ScanCardProps) {
  const [isExpanded, setIsExpanded] = useState(false)

  return (
    <Card>
      {/* Component content */}
    </Card>
  )
}

// ❌ Bad
export function sc(props) {
  const [exp, setExp] = useState(false)
  // ...
}

API Endpoints

  • Use RESTful conventions
  • Return consistent JSON responses
  • Include proper error handling
  • Add logging for debugging
// ✅ Good
app.get('/api/scan/status/:taskId', async (req, res) => {
  try {
    const { taskId } = req.params
    const status = await getScanStatus(taskId)
    res.json({ success: true, status })
  } catch (error) {
    logger.error('Failed to get scan status', { error, taskId })
    res.status(500).json({ success: false, error: error.message })
  }
})

Commit Messages

Use clear and meaningful commit messages:

Format

<type>: <subject>

<body>

<footer>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Maintenance tasks

Examples

feat: Add database download as ZIP functionality

- Implemented downloadDatabaseAsZip function
- Added download buttons under each database
- Export data in JSON and CSV formats
- Include README.txt with metadata

Closes #42
fix: Resolve pagination visibility in Database Explorer

Fixed overflow issues preventing pagination controls from showing.
Replaced ScrollArea with standard div for better compatibility.

Fixes #38

Testing

While we don't have automated tests yet, please manually test:

  1. Start/Stop Scans - Ensure scans work correctly
  2. Database Explorer - Test pagination and data display
  3. Export Features - Verify ZIP downloads work
  4. Multi-URL Scanning - Test batch functionality
  5. Port Cleanup - Ensure ports are freed properly

Questions?

Feel free to:

  • Open an issue for discussion
  • Reach out on GitHub
  • Check existing documentation

Recognition

Contributors will be added to the README acknowledgments section!


Thank you for contributing! 🚀