@shotco/sos-data
v0.1.0
Published
Shared SOS Clays API client for the ShotCo website network — state-org sites, gun-club sites, and SOSClays itself. Provides typed client, React Query hooks, multi-layer caching, and shared transformers.
Downloads
22
Readme
@shotco/sos-data
Shared SOS Clays API client for the ShotCo website network — state-org sites (NV, AZ, NJ, MI, …), gun-club sites (Cardinal Center, Stockdale, Tucson Trap & Ski, …), and SOSClays itself.
Provides a single source of truth for:
- Typed SOS API client (shoot list, shoot summary, results, high-gun reports, winners, active ads)
- React Query hooks with sensible per-endpoint cache TTLs
- In-process single-flight memoization (
memo-fetch) - Server-side ISR fetch caching helpers
- Shared transformer types so every consumer projects API responses the same way
Install
npm install @shotco/sos-dataSee CONSUMING.md for example imports, peer deps, and version pinning policy.
Release
See RELEASE.md — npm version, tag push, GitHub Actions publishes to public npm.
Why a shared package
Every site in the ShotCo network speaks to the same SOS Clays API. Without a shared client, each site forks its own copy of the transformers, hooks, and cache config — which means a fix to "how active shoots are filtered" has to land in N repos, and accidental drift between sites silently changes user-facing behavior. The published-package model gives every site the same battle-tested client, with deliberate version bumps when shared logic changes.
