npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@acuris-geo/commercetools-checkout

v0.1.1

Published

React components for integrating Acuris Address Validation & Geocoding into commercetools storefronts.

Readme

@acuris-geo/commercetools-checkout

React components + hooks for integrating Acuris Address Validation & Geocoding into commercetools storefronts. SSR-safe, unstyled by default, no monkey-patching of @commercetools/platform-sdk.

Status: beta (0.1.0).

Install

npm install @acuris-geo/commercetools-checkout

react and react-dom are peer dependencies (^18 or ^19).

Why this package

commercetools speaks ISO-2 country codes, split streetName/streetNumber fields, and postalCode (lowercase p). Acuris's address-validation API speaks ISO-3 lowercase, single-field street, and postcode. The mapping is the work this package exists to do — your storefront stays in commercetools-native vocabulary throughout.

Security model

Do not embed an Acuris API key in the browser. Components call your proxy endpoints, which forward to api.acuris-geo.com with the API key attached server-side. A working pair of Next.js API routes lives in examples/commercetools-storefront/.

Browser ──► /api/acuris/validate  ──►  acuris-av-sdk  ──►  api.acuris-geo.com
            (your backend; converts                       (lives server-side)
             ISO-2 → ISO-3 via iso2ToIso3)

Components

<AcurisAddressInput>

Controlled input with debounced typeahead. Country is ISO-2 ("DE", "US", …).

import { AcurisAddressInput, suggestionToBaseAddress } from "@acuris-geo/commercetools-checkout";
import { useState } from "react";

const ENDPOINTS = { validate: "/api/acuris/validate", suggest: "/api/acuris/suggest" };

const [value, setValue] = useState("");
const [picked, setPicked] = useState<SuggestionHit | null>(null);

<AcurisAddressInput
  endpoints={ENDPOINTS}
  country="DE"
  value={value}
  onChange={setValue}
  onSelect={(hit) => setPicked(hit)}
/>

// Hand the picked hit to your cart mutation as a BaseAddress.
const baseAddress = picked ? suggestionToBaseAddress(picked, { country: "DE" }) : null;

<AcurisAddressValidator>

Render-prop wrapper that validates an address on blur, submit, or manually. The address prop accepts a BaseAddress (preferred — gives Acuris the structured form) or a fallback free-text string.

<AcurisAddressValidator
  endpoints={ENDPOINTS}
  country="DE"
  address={pickedBaseAddress}
  trigger="submit"
>
  {({ status, result, error, formProps }) => (
    <form {...formProps}>
      {/* your fields */}
      {status === "ok" && (
        <p>✓ {result?.standardized?.formatted_address}</p>
      )}
    </form>
  )}
</AcurisAddressValidator>

Boundary mappers

| Function | Direction | |---|---| | toAcurisInput(addr: BaseAddress) | commercetools → Acuris fielded input | | toBaseAddress(result, base?) | Acuris validate result → commercetools BaseAddress | | suggestionToBaseAddress(hit, base?) | Acuris suggestion → commercetools BaseAddress | | iso2ToIso3("DE")"deu" | Country mapping | | iso3ToIso2("deu")"DE" | Country mapping | | adaptWireToSdk({country, input}) | Proxy-side helper: ISO-2 → ISO-3 + pass through Acuris fielded input |

Identity fields (firstName, lastName, company, phone, …) are preserved verbatim by toBaseAddress and suggestionToBaseAddress — Acuris doesn't see them, and we don't lose them.

Hooks

import { useAcurisValidation, useAcurisSuggest } from "@acuris-geo/commercetools-checkout";

const { status, result, validate } = useAcurisValidation({ endpoints, country: "DE" });
const { suggestions } = useAcurisSuggest({ endpoint: "/api/acuris/suggest", country: "DE", q, debounceMs: 200 });

Both hooks abort inflight requests automatically so the latest user interaction always wins.

Use with the API Extension

For enterprise hardening, pair this package with @acuris-geo/commercetools-extension to gate Cart updates server-side. The React component guides the buyer; the extension closes the bypass.

License

MIT © Acuris GmbH