thehardwarestore.ai

where AI agents shop for the right tools

── 99440 repos indexed ── | filtered by tag: golang
cloudwego/netpoll ★ 4603 504 APPLICATION

Netpoll is a high-performance non-blocking I/O networking framework for Go, developed by ByteDance for RPC scenarios. It provides an event-loop server and dialer with zero-copy Reader/Writer APIs backed by a custom linked buffer (LinkBuffer). Under the hood, it uses epoll on Linux and kqueue on BSD, with an operator cache and a load-balanced poll manager. The architecture is a non-blocking reactor pattern: an event loop accepts connections, assigns them to pollers, and schedules OnRequest/OnConnect/OnDisconnect callbacks asynchronously via a goroutine pool. The library features connection health checking, idle timeout, and a connection reuse probe for client pools. It is production-ready and used by ByteDance's RPC framework Kitex and HTTP framework Hertz.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
MunifTanjim/stremthru ★ 554 119 APPLICATION

StremThru is a media server backend designed as a companion for Stremio, providing unified access to torrents, Usenet, and various debrid services (Real-Debrid, TorBox, AllDebrid, etc.) through Stremio addons. The architecture features a Go-based backend with modular packages for store integrations, metadata enrichment, worker queues, and caching, alongside a TypeScript/React dashboard for configuration and monitoring. Key functionalities include Stremio addon endpoints (wrap, store, newz, torz), indexer support (Torznab/Newznab), background workers for data synchronization, and SDKs for JavaScript and Python. Data flows involve user requests via Stremio addons triggering store API calls, metadata enrichment from services like TMDB/TVDB, and background jobs maintaining caches and syncing external accounts. External dependencies include debrid services, metadata APIs, Usenet servers, and a SQLite/PostgreSQL database with optional Redis caching.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
quic-go/webtransport-go ★ 512 87 APPLICATION

webtransport-go is a Go library implementing the WebTransport protocol over HTTP/3, based on quic-go. It provides both client and server functionality to establish WebTransport sessions over QUIC connections, supporting bidirectional and unidirectional streams, datagrams, and session flow control. The library follows draft-ietf-webtrans-http3-16 and includes mechanisms for capsule-based control messages, stream error mapping, and origin checking. It is used in production by projects like Centrifugo, go-libp2p, and MediaMTX. The architecture is modular, with separate components for session management, stream maps, flow control, and capsule parsing. The server integrates with http3.Server via ConfigureHTTP3Server and provides an Upgrade method on HTTP handlers. The client offers both one-shot Dial and multi-session NewClientConn. The codebase emphasizes correctness with extensive unit and integration tests, including tests for reordering, flow control, and error handling. Key design decisions include the use of goroutines for concurrent stream acceptance and capsule processing, channel-based notification for flow control updates, and careful handling of session close to ensure streams are properly terminated. The implementation handles edge cases like stream reordering before session establishment, deadline propagation, and graceful shutdown with configurable timeouts. The repository is well-maintained with active CI, linting, and dependency management. It demonstrates strong Go engineering practices with clean interfaces, proper error handling, and comprehensive test coverage.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 2 reusable components found
openfaas/faas ★ 26243 1963 APPLICATION

OpenFaaS is a serverless platform that provides an API gateway for deploying, managing, and invoking functions. The gateway handles HTTP routing to functions, collects and exposes Prometheus metrics, implements autoscaling based on invocation rates, includes a built-in AngularJS UI for function management, and supports alerting via integrations like Slack. It uses a plugin architecture for function providers (e.g., Kubernetes, Docker Swarm) via the faas-provider interface, allowing the core to remain decoupled from the underlying runtime. The system processes synchronous function invocations through a reverse proxy and asynchronous invocations via NATS queues.

RATING: 9.1/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
d2lang/d2 ★ 25564 758 APPLICATION

D2 is a declarative diagramming language and compiler implemented in Go. It parses a textual DSL, compiles to an intermediate representation, applies automatic layout via multiple engines (Dagre, ELK, and the custom TALA engine), and renders to SVG, PNG, PDF, PPTX, ASCII art, and animated GIF. The architecture is a pipeline: parser (d2parser) → compiler (d2compiler/d2ir) → graph (d2graph) → layout (d2layouts) → renderer (d2renderers). It also includes a language server (d2lsp) for IDE integration and JavaScript/WASM bindings for browser and Node.js usage. The codebase is production-grade with extensive testing, resource safety patterns (work guards, budgets, transactions), security hardening (SVG escaping, network policy), and a CI/CD release pipeline. External dependencies include Go modules for layout algorithms, bundled fonts, and Noto Color Emoji. The system is primarily a CLI tool and Go library, with a secondary JavaScript API.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
ThreeDotsLabs/watermill ★ 9914 512 APPLICATION

Watermill is a Go library for building message-driven and event-driven applications. It is not a standalone service; applications embed it and use the core Publisher/Subscriber interfaces to communicate with brokers such as Kafka, RabbitMQ, NATS, Redis Streams, Google Cloud Pub/Sub, AWS SNS/SQS, SQL databases, or an in-memory Go channel. This repository contains the core library, reusable components, runnable examples, and small CLI tools, while broker-specific adapters and some integrations live in separate modules. The architecture is layered. At the bottom are the low-level Pub/Sub abstractions and the Message object with UUID metadata, payload, and Ack/Nack lifecycle semantics. The middle layer is the Router, which wires handlers into consumption loops and supports middleware and publisher/subscriber decorators. On top of that, optional components implement CQRS event/command buses and processors, topic forwarding, request-reply, delayed publishing, metrics, fan-in/fan-out, and requeuing. Middleware covers retry with exponential backoff, poison queues, deduplication, throttling, circuit breaking, correlation IDs, timeout enforcement, and panic recovery. The repository is extensively tested, including a universal pub/sub conformance suite intended for adapter authors to reuse, and GoChannel serves as a complete in-memory reference implementation. The examples demonstrate real production patterns: CQRS with protobuf, ordered events, exactly-once delivery counters, outbox/transactional event forwarding, server-sent event feeds, webhook ingestion, and consumer groups. There is no data research component; this is purely a software library/application framework.

RATING: 9.1/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
anchore/syft ★ 9678 998 APPLICATION

Syft is a production-grade CLI tool and Go library for generating Software Bills of Materials (SBOMs) from container images, filesystems, directories, and OCI artifacts. It detects and catalogs packages across 40+ ecosystems (Alpine, Debian, RPM, Python, Java, Go, Ruby, Rust, JavaScript, .NET, etc.) by parsing lockfiles, package databases, binary metadata, and source manifests. The tool outputs SBOMs in multiple formats including CycloneDX (JSON/XML), SPDX (JSON/tag-value), Syft JSON, and GitHub Dependency Snapshots, with version-aware encoding and decoding. Architecturally, Syft uses a modular cataloger system where each ecosystem implements a `generic.Cataloger` with parser functions registered by file globs or MIME types. A task-based pipeline orchestrates file indexing, package cataloging, dependency resolution, and relationship linking. The system supports both library integration via `syft.CreateSBOM()` and a CLI with cobra commands (`scan`, `attest`, `convert`, `cataloger`). A bubbletea-based TUI provides real-time progress feedback during image pulls and cataloging. External dependencies include `stereoscope` for container image access, `cosign` for attestation signing, and `go-partybus` for event-driven UI. Key entry points include `cmd/syft/main.go` (CLI), `syft/create_sbom.go` (library API), `syft/get_source.go` (source resolution), and the format encoders/decoders in `syft/format/`. The codebase demonstrates strong engineering practices: extensive test coverage (unit, integration, snapshot), CI/CD with GitHub Actions, auto-generated JSON schemas, and drift-check scripts for capabilities and schema. Notable reusable components include the generic cataloger framework, the dependency resolver, and the file resolver abstraction.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
EndlessCheng/codeforces-go ★ 8674 821 APPLICATION

EndlessCheng/codeforces-go is a comprehensive collection of competitive programming solutions and algorithm templates written in Go. The repository provides reusable implementations of data structures (e.g., segment trees, fenwick trees, treaps, suffix automata) and algorithms (e.g., Aho-Corasick, various math functions) in the copypasta directory. It also includes a test harness (main/testutil) for verifying solutions against sample inputs and outputs, along with code generators to automate test file creation. Each solution is typically a standalone Go program that reads from standard input and writes to standard output, following the typical format for online judge submissions. The repository is organized by problem source (LeetCode, Codeforces, AtCoder, etc.) and difficulty, making it a valuable reference for learning and practicing competitive programming.

RATING: 9.1/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
oapi-codegen/oapi-codegen ★ 8621 1061 APPLICATION

oapi-codegen is a production-grade OpenAPI 3.0/3.1 code generator for Go that produces idiomatic server stubs, typed HTTP clients, and data models. It supports multiple Go web frameworks (Chi, Echo, Fiber v2/v3, Gin, Gorilla, Iris, and stdlib net/http) and generates both plain and strict server interfaces with middleware composition, request validation, and error handling. The generator is configurable via YAML files and offers features like import mapping for multi-package specs, OpenAPI overlay support, webhook generation, streaming responses, custom struct tags, and configurable schema-merging behaviors (v1/v2/v3) for allOf/anyOf/oneOf composition. The architecture is a library with a CLI wrapper (`cmd/oapi-codegen`). The core generation pipeline loads and validates an OpenAPI spec, gathers schemas from components/operations, resolves naming collisions, merges composed schemas, prunes unused components, and renders Go source files via user-overridable text/template files. The codebase is extensively tested with hundreds of generated regression tests covering edge cases in schema composition, parameter serialization, content types, and framework-specific behavior. The generator also embeds the original spec as a compressed base64 blob in generated packages for runtime access. Key reusable components include a robust naming resolution algorithm with collision handling, a configurable struct tag generation system with eager validation, a dead-code elimination module for pruning unused schema components, and standalone security providers (Bearer token, API key, Basic auth) for generated clients. The project maintains compatibility layers for schema-merging behavior versions and deprecated APIs, ensuring smooth upgrades while preserving existing generated code.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
ko-build/ko ★ 8569 454 APPLICATION

ko is a CLI tool for building container images from Go source code. It compiles Go binaries, packages them into OCI images with a minimal base image, and pushes them to container registries. It supports multi-platform builds, generates SPDX SBOMs by default, and integrates with Kubernetes for deploying images directly from YAML manifests. The tool does not require Docker to be installed, as it uses the go-containerregistry library for OCI operations. The architecture is modular, with separate packages for building (pkg/build), publishing (pkg/publish), and Kubernetes integration (pkg/commands, pkg/resolve). The build pipeline compiles Go code using the system's Go toolchain, creates OCI image layers, and attaches static assets from kodata directories. The publish pipeline supports multiple targets: container registries, local Docker daemon, KinD clusters, OCI layout directories, and tarballs. Key features include automatic SBOM generation, Linux capabilities support, build caching (KOCACHE), and YAML templating for Kubernetes manifests. The codebase is well-tested with unit tests, integration tests, and end-to-end tests running in CI. It is actively maintained by the ko-build community and is a CNCF Sandbox project.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
mostlygeek/llama-swap ★ 5990 503 APPLICATION

llama-swap is a production-grade reverse proxy and lifecycle manager for large language model (LLM) inference backends, supporting hot-swappable model changes without client disconnection. It accepts OpenAI- and Anthropic-compatible API requests and routes them to local or remote inference engines such as llama.cpp, vLLM, stable-diffusion.cpp, and audio.cpp. The system manages model processes on-demand: starting, health-checking, TTL-based unloading, and graceful swapping based on request routing rules. Configuration is YAML-driven with advanced features like macro expansion, a matrix DSL for model set selection, and profile-based request rewriting. A Svelte 5 web UI provides real-time monitoring, a playground, activity logging, and hardware performance dashboards. Kubernetes integration (kubeswap) allows per-model pod management via Deployments and Services. The architecture is a single Go binary (with optional embedded UI) that orchestrates subprocesses, uses SQLite for persistent activity and capability caches, and exposes Prometheus metrics. Cross-platform hardware detection (NVIDIA, AMD, Intel, Apple Metal) and GPU performance monitoring are built-in. The codebase is well-structured with clear separation of concerns, comprehensive testing, and CI/CD pipelines. While the primary purpose is application serving, it includes data-oriented features like request/response capture (CBOR+zstd), capability auto-discovery, and a documentation agent with an evaluation harness, giving it a hybrid character.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 8 reusable components found
alecthomas/chroma ★ 5050 534 APPLICATION

Chroma is a pure-Go syntax highlighting library and toolchain, inspired by Pygments. It provides a comprehensive framework for tokenizing source code across hundreds of languages using declarative XML-based lexers or custom Go lexers, and rendering the highlighted output in multiple formats including HTML, SVG, terminal ANSI (8/16/256 colour and true-colour), JSON, and mIRC. The library is used by a CLI tool (`chroma`) for highlighting files or standard input, a web server (`chromad`) that serves an interactive playground with WASM-based client-side highlighting, and can be embedded as a library in other Go applications. Architecturally, Chroma employs a registry pattern for lexers, formatters, and styles, allowing dynamic discovery and selection. Lexers are defined as state machines with regex-based rules, supporting nested states, push/pop transitions, and inclusion of other lexers for embedded languages (e.g., PHP in HTML). The token stream can be processed through mutators (coalescing, type remapping) before formatting. Styles are defined in XML and support light/dark mode pairs with automatic counterpart selection. Key entry points include the `quick.Quick.Highlight()` convenience function, the CLI in `cmd/chroma/main.go`, the web server in `cmd/chromad/main.go`, and the WASM module in `cmd/libchromawasm/main.go`. The library depends on minimal external packages: `kong` for CLI argument parsing, `gorilla/mux` and `gorilla/handlers` for the web server, and `go-colorable`/`go-isatty` for terminal support. The build system uses Hermit for tool management and `just`/`bit` for task automation. The repository includes over 200 lexers covering a wide range of programming, markup, and configuration languages, along with extensive test data (input/output pairs) for regression testing. The XML-based lexer definitions can be generated from Pygments lexers using provided Python scripts, facilitating easy addition of new languages. The project is actively maintained with CI/CD, automated dependency updates via Renovate, and a clear release pipeline using goreleaser.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
uptrace/bun ★ 4994 314 APPLICATION

Bun is a SQL-first Go ORM library that provides a fluent query builder, schema introspection, and migration tooling for PostgreSQL, MySQL, MariaDB, SQLite, MSSQL, and Oracle. It wraps the standard database/sql interface and offers a rich set of features including model-based CRUD with struct tags, relation loading (belongs-to, has-one, has-many, many-to-many), soft deletes, CTEs, upserts, and bulk operations. The library is designed for production use with built-in support for OpenTelemetry, structured logging, and New Relic instrumentation via optional extension packages. Architecturally, Bun separates SQL generation into dialect-specific packages (pgdialect, mysqldialect, etc.) and provides its own PostgreSQL wire protocol driver (pgdriver) for low-latency connections. The core query builders (SelectQuery, InsertQuery, etc.) compose reusable query parts (WHERE, ORDER, RETURNING) and use a feature flag bitmask to conditionally emit dialect-specific SQL. The migration system supports both SQL-file migrations and automatic schema diffing, comparing model definitions against live database catalogs to generate ALTER TABLE statements. Key entry points include the DB type (NewDB, NewSelect, etc.), the schema package for table/field metadata, and the migrate package for versioned migrations. The library is extensively tested across multiple database backends using Docker containers and snapshot-based golden file testing. While the codebase is large and dialect-specific branches add complexity, the overall architecture is clean, well-factored, and follows Go idioms consistently.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
tidwall/buntdb ★ 4871 316 APPLICATION

BuntDB is a low-level, in-memory, key/value store library in Go. It supports custom indexing (B-tree and R-tree), geospatial queries, JSON indexing, TTL expiration, and ACID transactions with multiple readers / single writer. Persistence is via an append-only file (AOF) with automatic background shrinking. The library is designed for high performance and embeddability, and is used by projects requiring a fast, reliable embedded database. The codebase is a single package with a well-structured API, comprehensive tests, and minimal dependencies.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 1 reusable components found
graph-gophers/graphql-go ★ 4754 500 APPLICATION

A production-grade GraphQL server library for Go that implements the September 2025 GraphQL specification. The library parses GraphQL Schema Definition Language (SDL), validates queries against the schema, and executes them using Go struct methods or field resolvers bound via reflection. It supports queries, mutations, subscriptions, Apollo Federation, introspection, and pluggable tracing (OpenTelemetry, OpenTracing). The codebase is well-tested with a novel validation parity harness that exports test cases from `graphql-js` to drive Go validation tests. It provides extensive configuration options including max query depth, parallel resolver limits, memory pool control, and deprecated usage validation. The library is not a standalone application but is designed as an importable package with example servers (Star Wars, social, caching, federation) demonstrating usage. Architecture follows a layered pattern: public API (`graphql.go`), schema parsing (`internal/schema`), query parsing (`internal/query`), validation (`internal/validation`), and execution (`internal/exec`). The resolver binding engine uses Go reflection to automatically map GraphQL fields to Go struct methods, enabling type-safe resolver definitions.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
magefile/mage ★ 4690 279 APPLICATION

Mage is a build tool written in Go that replaces Makefiles with plain Go functions. Users define targets as exported functions in Go source files tagged with `//go:build mage`, and Mage compiles them into a standalone CLI binary. The architecture is a library-plus-CLI: the `mage` package handles parsing, compilation, and execution; the `mg` package provides dependency injection (`Deps`, `SerialDeps`, `CtxDeps`) and namespace grouping; the `sh` package offers shell command execution with environment expansion; the `parse` package uses Go's AST to extract targets and imports; and the `target` package implements file-based dependency checking. The tool supports zero-install via `go run`, static compilation, shell completion, and importing targets from other packages. It is a mature, well-tested project with no external dependencies beyond the Go standard library, making it highly portable and maintainable.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
stacklok/toolhive ★ 2291 319 APPLICATION

ToolHive is a production-grade MCP (Model Context Protocol) server management platform developed by Stacklok. It provides a comprehensive CLI (`thv`), a Kubernetes operator (`thv-operator`), a proxy runner, and a virtual MCP server (vMCP) for aggregating multiple backend MCP servers. The system manages the full lifecycle of MCP workloads—running, stopping, building, exporting, and monitoring—while enforcing authentication (OAuth, OIDC, SPIFFE, AWS STS), authorization (Cedar, HTTP PDP, annotation-based), rate limiting, telemetry (OpenTelemetry/Prometheus), and secrets management (1Password, keychain, environment). It supports multiple transport protocols (SSE, streamable HTTP, stdio) and container runtimes (Docker, Podman, Kubernetes). The architecture is modular: a CLI layer built with Cobra, an API layer (RESTful registry and health endpoints), a Kubernetes operator layer with CRD reconcilers, a transport proxy layer with session management, and a plugin/skill system for installing and verifying OCI artifacts with Sigstore signing. The vMCP subsystem provides tool aggregation, conflict resolution, capability caching, and health monitoring with circuit breakers. External dependencies include Kubernetes client-go, Docker engine, Redis/Valkey, OpenTelemetry SDK, Sigstore, Ory/Fosite (OAuth), and various Go libraries for YAML, JSON Schema, and HTTP networking. Key data flows: CLI commands trigger workload creation via the runner, which builds a RunConfig from user flags and environment, then deploys the MCP server in a container (Docker/Kubernetes). The proxy layer intercepts MCP JSON-RPC messages, applies middleware (auth, rate limiting, telemetry, body limits), and forwards to the backend server. The vMCP server aggregates tools from multiple backends, resolves naming conflicts, and presents a unified MCP interface to clients. Telemetry spans are created at each layer and exported via OTLP. Skills and plugins are installed from OCI registries, verified with Sigstore, and managed via lock files with content digest validation.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
sazardev/goca ★ 295 11 APPLICATION

Goca is a CLI tool for generating Go applications following Clean Architecture principles. It scaffolds complete projects with domain, usecase, repository, and handler layers, supporting multiple databases (PostgreSQL, MySQL, MongoDB, etc.) and protocols (HTTP, gRPC, CLI, worker). The tool includes safety mechanisms (dry-run, backup, force), dependency injection generation, middleware creation, and Model Context Protocol (MCP) integration for AI-assisted development. Its architecture emphasizes layer separation and dependency management, generating production-ready code with built-in validation, testing scaffolding, and CI/CD pipeline generation.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
traefik/traefik ★ 65052 6221 APPLICATION

Traefik is a cloud-native reverse proxy and API gateway that dynamically configures itself from various service discovery backends (Docker, Kubernetes, Consul, etc.). It provides HTTP, TCP, and UDP routing, load balancing, TLS termination, ACME certificate management, a rich middleware chain (auth, rate limiting, compression, headers, etc.), observability (metrics, tracing, access logs), and a plugin system (Yaegi and Wasm). The project is written in Go with a React-based web UI. It supports Kubernetes CRDs (IngressRoute, Middleware, etc.) and the Gateway API. It has extensive integration tests and is actively maintained. The architecture is modular with clear provider interfaces, a configuration watcher that merges dynamic configs from multiple sources, and a hot-swappable handler for live updates.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
milvus-io/milvus ★ 46257 4271 APPLICATION

Milvus is a high-performance, distributed vector database designed for AI applications such as vector similarity search, RAG pipelines, and hybrid search (dense + sparse). It follows a microservices architecture with components like proxy, rootcoord, datacoord, querycoord, datanode, querynode, indexnode, and streamingnode. The system uses a Write-Ahead Log (WAL) with multiple backends (RocksMQ, Kafka, Pulsar, Woodpecker) for real-time ingestion, and a C++ execution engine (segcore) for vector indexing and query processing. It supports a wide range of index types (IVF, HNSW, DiskANN, SCANN, etc.), scalar indices, full-text search via Tantivy (Rust), and advanced features like CDC replication, RBAC, and multi-tenancy. The codebase is primarily Go and C++, with Python test suites and Rust bindings. It is actively maintained with frequent commits, extensive tests, and a robust client SDK.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
$ loading more...
$ submit: