arnaudleroy-studio/coffeetrove

Access 440K+ cafes, brewing guides, and coffee data from CoffeeTrove.

Maintainers

Package info

github.com/arnaudleroy-studio/coffeetrove-php

Homepage

Documentation

pkg:composer/arnaudleroy-studio/coffeetrove

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.1 2026-03-29 13:19 UTC

This package is auto-updated.

Last update: 2026-03-29 13:22:19 UTC


README

Packagist Version PHP Version License

PHP toolkit for accessing cafe, roaster, and coffee knowledge data from CoffeeTrove. The platform indexes over 440,000 cafes worldwide alongside brewing guides, bean origin profiles, and a scoring system called the Golden Drop that rates establishments on data completeness and quality signals.

Installation

composer require arnaudleroy-studio/coffeetrove

Quick Start

Look up cafes by location

use CoffeeTrove\Client;

$client = new Client();

// Find cafes near a coordinate pair
$cafes = $client->searchCafes(
    latitude: 48.8566,
    longitude: 2.3522,
    radiusKm: 2,
    limit: 10,
);

foreach ($cafes as $cafe) {
    echo "{$cafe['name']} — score: {$cafe['score']}/100\n";
}

Inspect scoring tiers

// Golden Drop tier thresholds
$tiers = Client::SCORE_TIERS;
// ['exceptional' => 90, 'excellent' => 80, 'notable' => 70, 'common' => 0]

$cafe = $client->getCafe(slug: 'blue-bottle-shinjuku');
$tier = $client->getTier(score: $cafe?->score ?? 0);

echo "{$cafe?->name}: {$tier} tier";

Work with brewing methods

// Retrieve all brewing method profiles
$methods = $client->getBrewingMethods();

// Array destructuring for clean iteration
foreach ($methods as ['slug' => $slug, 'name' => $name, 'grind' => $grind]) {
    echo "{$name} requires {$grind} grind\n";
}

// Arrow function to extract just the names
$names = array_map(fn(array $m) => $m['name'], $methods);

Filter by bean origin

$origins = $client->getOrigins(region: 'africa');

// Null-safe chaining on optional tasting notes
foreach ($origins as $origin) {
    $notes = $origin?->getData('tasting_notes') ?? 'no tasting notes available';
    echo "{$origin['name']}: {$notes}\n";
}

Available Data

CoffeeTrove covers the full specialty coffee landscape. The cafe dataset spans 50+ countries with addresses, hours, chain classification (independent, local chain, or global chain), and Golden Drop scores computed from data completeness and review signals. Brewing guides cover 15+ methods from pour-over to espresso with grind size, water temperature, and ratio recommendations. Origin profiles document growing regions, altitude ranges, processing methods, and characteristic flavor notes. The bean encyclopedia catalogs 160+ entries across varietals, blends, and single-origin roasts.

Links

License

MIT License. See LICENSE for details.