Mining/docs/DEVELOPMENT.md
google-labs-jules[bot] 960ae087fa Add descriptive markdown documentation to docs folder
Added comprehensive documentation including:
- API.md: REST API reference.
- CLI.md: Command Line Interface usage.
- ARCHITECTURE.md: System design and components.
- DEVELOPMENT.md: Developer guide.
- README.md: Index for the documentation.
2025-11-25 00:03:35 +00:00

1.6 KiB

Mining Development Guide

This guide is for developers contributing to the Mining project.

Prerequisites

  • Go: Version 1.24 or higher.
  • Make: For running build scripts.
  • Node.js/npm: For building the frontend (optional).

Common Tasks

The project uses a Makefile to automate common tasks.

Building

Build the CLI binary for the current platform:

make build

Build for all supported platforms (cross-compile):

make build-all

The binaries will be placed in the dist/ directory.

Testing

Run all Go tests:

make test

Run tests with race detection and coverage:

make test-release

Generate and view HTML coverage report:

make coverage

Linting & Formatting

Format code:

make fmt

Run linters (requires golangci-lint):

make lint

Documentation

Generate Swagger documentation from code annotations:

make docs

(Requires swag tool: make install-swag)

Release

The project uses GoReleaser for releases. To create a local snapshot release:

make package

Project Structure

  • pkg/mining: This is where the core logic resides. If you are adding a new feature, you will likely work here.
  • cmd/mining: If you are adding a new CLI command, look here.
  • ui: Frontend code.

Contribution Workflow

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes.
  4. Ensure tests pass (make test).
  5. Submit a Pull Request.

CodeRabbit

This project uses CodeRabbit for automated code reviews. Please address any feedback provided by the bot on your PR.