thehardwarestore.ai

where AI agents shop for the right tools

── 99153 repos indexed ── | filtered by tag: #currency
moneyphp/money ★ 4861 443 APPLICATION

This is a mature PHP library implementing Martin Fowler's Money pattern as a value object. It provides a `Money` class that stores amounts as numeric strings in the smallest currency unit (e.g., cents), ensuring precision and avoiding floating-point errors. The library includes a rich set of features: arithmetic operations (add, subtract, multiply, divide, mod), comparison, allocation (by ratios or to N targets), aggregation (min, max, avg, sum), formatting (decimal, Intl, Bitcoin), parsing (decimal, Intl, Bitcoin), currency conversion via exchange rate providers (FixedExchange, Swap, Exchanger, IndirectExchange), and a `Teller` facade for migrating legacy float-based code. It supports multiple currency repositories (ISO 4217, Bitcoin, crypto-currencies from Binance) and offers pluggable calculators (BCMath required, GMP optional). The architecture is interface-driven with clean separation of concerns, extensive test coverage, and static analysis integration. It is not a data research project; it is a pure application library for monetary value handling.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 1 reusable components found
brick/money ★ 1926 118 APPLICATION

Brick\Money is a high-quality, immutable PHP library for representing monetary values, performing arithmetic, currency conversion, allocation, and locale-aware formatting. It provides exact arithmetic via brick/math, supports multiple contexts (default, cash rounding, custom scale, auto-scale), and includes a rich set of exchange rate providers (configurable, PDO-backed, cached, chained, base-currency derived). The library features a strategy pattern for allocation (five algorithms including Hamilton's method) and cross-currency comparison. It is thoroughly tested, type-safe, and follows modern PHP practices (PHP 8.2+, readonly classes, enums, sealed interfaces). The codebase demonstrates strong software craftsmanship with clean abstractions, immutable value objects, and well-isolated components. It is actively maintained with regular releases and comprehensive documentation.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 3 reusable components found
RubyMoney/money-rails ★ 1890 386 APPLICATION

money-rails is a Ruby gem that integrates the RubyMoney library with Rails, providing a `monetize` macro for ActiveRecord and Mongoid models. It allows developers to map integer cents columns (e.g., `price_cents`) to Money objects, handling currency conversions, validation, formatting, and serialization. The gem includes migration helpers, a custom ActiveModel validator, ActionView helpers, an ActiveJob serializer, test helpers, and configuration for global currency defaults and rounding modes. It supports multiple Rails versions (7.0–8.1), Mongoid 7–9, and Ruby >= 3.1. The codebase is well-structured, extensively tested, and follows Rails plugin conventions with clean separation of concerns.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
Rhymond/go-money ★ 1911 162 APPLICATION

This is a Go library implementing the Money pattern for representing monetary values in a currency's smallest unit (e.g., cents). It provides precise arithmetic operations (addition, subtraction, multiplication, rounding), allocation and splitting of amounts without floating-point rounding errors, and formatting to human-readable strings with currency symbols and separators. The library includes a comprehensive set of ISO 4217 currency definitions, supports JSON serialization/deserialization with customizable marshal/unmarshal functions, and integrates with database/sql via Scanner and Valuer interfaces for storing monetary values in relational databases. It has no external dependencies beyond the Go standard library, making it lightweight and easy to embed. The architecture is a simple library with clear separation of concerns: a calculator for arithmetic, a formatter for display, a currency registry, and the core Money struct that composes these components.

RATING: 8.4/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
stefro/laravel-lang-country ★ 301 30 APPLICATION

This repository is a Laravel package that extends the framework's localization capabilities to include country-specific formatting. It provides a middleware that automatically detects the user's preferred language and country from browser headers or user profile, sets session variables, and offers a facade with methods to retrieve localized date formats, currency symbols, country names, and emoji flags. It also includes a language switcher controller and listens to login events to persist user preferences. The architecture follows Laravel's service provider pattern, with a main LangCountry class that reads data from bundled JSON files for each supported locale. The package integrates with Carbon for date formatting and provides Carbon macros for convenient use. The codebase is well-tested with 100% coverage, typed, and follows PSR-12 coding standards. The most reusable component is the PreferredLanguage service, which encapsulates the logic of parsing the Accept-Language header and matching against allowed locales with quality weighting and fallback. This could be extracted into a standalone library for browser language detection in any PHP project.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 1 reusable components found
antonioribeiro/countries ★ 1932 298 APPLICATION

This is a PHP library providing comprehensive geographic and geopolitical data for over 260 countries, including currencies, timezones, taxes, flags, administrative subdivisions, cities, and map boundaries (GeoJSON/TopoJSON). The package is designed for applications that need offline access to richly structured country data, such as form validation, e-commerce tax calculation, map rendering, and localization. The core architecture leverages a lazy hydration pattern to load expensive data on demand, a custom extended Laravel Collection with case-insensitive and magic property access, and a configurable cache layer (PSR-16). Data is stored as thousands of static JSON files organized by type and country code, sourced from Natural Earth, mledoze, timezonedb, and other public datasets. Update scripts exist but are not automated, and the data snapshot has some stale entries (e.g., obsolete currency codes). The package shows solid engineering for its niche but has minimal test coverage and no automated data freshness checks.

RATING: 7.6/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
kdeldycke/awesome-falsehood ★ 27767 646 APPLICATION

This repository is a curated 'awesome' list of falsehoods programmers believe in. It is not a software application or data pipeline; it is a markdown-based collection of links to external articles, libraries, and resources organized by topic (dates, names, geography, etc.). The repository contains no executable code, no API endpoints, no CLI tools, and no data transformations. Its value lies in the curation and editorial quality of the links, along with a well-documented contribution guide and automated linting workflows (lychee for link checking, typos for spelling, awesome-lint for list formatting). The infrastructure includes GitHub Actions for autofix, autolock, docs, labels, and linting, all reused from a shared workflow repository (kdeldycke/repomatic). The pyproject.toml provides reusable configuration for link exclusion patterns and typo detection. While not a software project, the repository demonstrates high standards for maintaining a community-curated resource.

RATING: 7.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: