Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions apps/docs/docs/contribution-guide/code-of-conduct.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,42 @@ sidebar_position: 2

# Code of Conduct

As contributors and maintainers of the DeepScanBot package, we are committed to showing respect to all individuals who contribute to this project. This respect encompasses actions such as posting issues, updating documentation, submitting pull requests, providing constructive feedback in comments, and engaging in any other project-related activities.
## Our Pledge

In our communication through GitHub and other project channels, we are dedicated to maintaining a constructive and professional atmosphere. We will not tolerate personal attacks, trolling, public or private harassment, insults, or any other unprofessional conduct.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

Our commitment extends to showing courtesy and respect to everyone involved in this project, regardless of their gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We also hold the expectation that anyone contributing to the DeepScanBot project will adhere to these principles.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

In cases where a community member violates this code of conduct, the maintainers of the DeepScanBot package may take appropriate actions, including the removal of issues, comments, and pull requests, or the blocking of user accounts.
## Our Standards

If you experience or witness any behavior that goes against this code of conduct or if you have other concerns, please feel free to contact us via email.
Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior:

- The use of sexualized language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue in the [DeepScanBot repository](https://github.com/mindfiredigital/DeepScanBot/issues) or by emailing the maintainers at **deepscanbot@mindfiresolutions.com**. All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
170 changes: 83 additions & 87 deletions apps/docs/docs/contribution-guide/how-to-contribute.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,128 +4,124 @@ sidebar_position: 1

# How to Contribute

Thank you for your interest in contributing to DeepScanBot! This guide provides instructions for contributing to the project.
Thank you for your interest in contributing to DeepScanBot! We welcome contributions from the community.

## Getting Started
---

1. Fork the repository on GitHub
2. Clone your fork locally:
```bash
git clone https://github.com/YOUR_USERNAME/DeepScanBot.git
cd DeepScanBot
```
3. Add the upstream remote:
```bash
git remote add upstream https://github.com/mindfiredigital/DeepScanBot.git
```
## Code of Conduct

## Development Setup
This project adheres to our [Code of Conduct](/docs/contribution-guide/code-of-conduct). By participating, you are expected to uphold this code. Please report unacceptable behavior by opening an issue or emailing **deepscanbot@mindfiresolutions.com**.

## Getting Started

### Prerequisites
- **Go** (version 1.22 or higher)
- **Git**
### 1. Fork the Repository

### Installation
Start by forking the [DeepScanBot repository](https://github.com/mindfiredigital/DeepScanBot) on GitHub.

### 2. Clone Your Fork

```bash
# Download dependencies
go mod download
git clone https://github.com/YOUR_USERNAME/DeepScanBot.git
cd DeepScanBot
```

### 3. Set Up Development Tools

# Install development tools
```bash
# Code formatting
go install mvdan.cc/gofumpt@latest

# Import management
go install github.com/daixiang0/gci@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/evilmartians/lefthook@latest

# Install git hooks
lefthook install
# Linting
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

# Build the project
go build -o deepscanbot ./apps/cli
# Git hooks
go install github.com/evilmartians/lefthook@latest && lefthook install
```

## How to Contribute
### 4. Sync and Create a Branch

### Reporting Bugs
If you find a bug, please create an issue using the bug report template. Include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Go version, DeepScanBot version)
Make sure your fork is up to date with the base repository before creating a feature branch:

### Suggesting Features
Feature requests are welcome! Please use the feature request template and include:
- Clear description of the feature
- Problem statement and proposed solution
- Use cases
```bash
# Add the upstream remote (one-time setup)
git remote add upstream https://github.com/mindfiredigital/DeepScanBot.git

### Contributing Code
# Sync with the latest development branch
git checkout development
git pull upstream development
git push origin development

1. Create a new branch from `development`:
```bash
git checkout development
git pull upstream development
git checkout -b feat/your-feature-name
```
# Create your feature branch
git checkout -b feat/your-feature-name
```

2. Make your changes following the coding standards
## Development Workflow

3. Ensure all checks pass:
```bash
gofumpt -w .
gci write -s standard -s default -s "prefix(github.com/mindfiredigital/DeepScanBot)" .
golangci-lint run
go test ./...
```
### Code Formatting

4. Commit with a conventional commit message:
```bash
git add .
git commit -m "feat: add feature X"
```
All Go code must be formatted with `gofumpt`:

5. Push to your fork and create a Pull Request
```bash
gofumpt -l -w .
```

## Code Style
### Import Management

### Go Code Style
- Follow [Effective Go](https://go.dev/doc/effective_go) guidelines
- Use `gofumpt` for strict formatting
- Use `gci` for import management
Imports must be organized with `gci`:

### Naming Conventions
- **Packages**: lowercase, single-word names
- **Functions**: `MixedCaps` or `mixedCaps`
- **Variables**: descriptive `mixedCaps`
```bash
gci write --skip-vendor -s standard -s default -s "prefix(github.com/mindfiredigital/DeepScanBot)" .
```

### Commit Messages
Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
### Linting

Run the linter before committing:

```bash
golangci-lint run ./...
```
<type>(<scope>): <subject>

<body>
### Testing

Ensure all tests pass:

<footer>
```bash
go test ./...
```

**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `perf`, `ci`, `build`, `revert`
### Commit Messages

This project uses [Conventional Commits](https://www.conventionalcommits.org/):

**Examples:**
```
feat(crawler): add support for custom headers
fix(parser): handle malformed HTML gracefully
docs(usage): add proxy configuration examples
feat: add new feature
fix: resolve issue with X
docs: update documentation
refactor: improve code structure
test: add tests for X
chore: update dependencies
```

## Pull Request Process

1. Ensure your branch is up to date with `development`
2. Run all checks before submitting:
- `gofumpt -w .`
- `gci write ...`
- `golangci-lint run`
- `go test ./...`
3. Use the PR template with clear description of changes
4. Link related issues (e.g., "Closes #123")
5. At least one maintainer must approve before merge
1. Ensure your code passes all linting and tests
2. Update documentation if needed
3. Submit a pull request with a clear description of changes
4. Your PR will be reviewed by maintainers

## Project Structure

```
apps/
cli/ # CLI entry point and tests
docs/ # Docusaurus documentation site
packages/
crawler/ # Core crawling logic
fetcher/ # HTTP fetch layer
logger/ # Logging utilities
parser/ # HTML parsing
storage/ # Result storage and reports
types/ # Shared type definitions
Loading
Loading