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

@sudobility/mixr_client

v0.1.41

Published

TypeScript client library for MIXR API

Readme

@sudobility/mixr_client

React client library for the MIXR cocktail recipe API with TanStack Query hooks and Zustand state management.

Installation

bun add @sudobility/mixr_client

Peer Dependencies

bun add @sudobility/di @sudobility/mixr_types @sudobility/types @tanstack/react-query react zustand

Usage

API Client

import { MixrClient } from '@sudobility/mixr_client';

const client = new MixrClient(baseUrl, networkClient, authToken?);

// Equipment, ingredients, moods
const equipment = await client.getEquipment({ subcategory: 'essential' });
const ingredients = await client.getIngredients();
const moods = await client.getMoods();

// Recipes
const recipe = await client.generateRecipe({ equipment_ids: [1, 2], ingredient_ids: [3, 4], mood_id: 1 });
const recipes = await client.getRecipes({ limit: 10, offset: 0 });

// Ratings
await client.submitRecipeRating(recipeId, { stars: 5, review: 'Great!' });
const aggregate = await client.getRecipeRatingAggregate(recipeId);

// User (auth required)
const user = await client.getCurrentUser();
const favorites = await client.getUserFavorites();

React Hooks

All hooks accept client: MixrClient as the first parameter.

import { useEquipments, useRecipes, useCreateRecipe } from '@sudobility/mixr_client';

function RecipeList() {
  const { data, fetchNextPage, hasNextPage } = useRecipes(client, 10);
  const createRecipe = useCreateRecipe(client, useRecipeStore);
  // ...
}

| Hook | Type | Cache | |------|------|-------| | useEquipments | Query | 30min | | useEquipmentSubcategories | Query | 1hr | | useIngredients | Query | 30min | | useIngredientSubcategories | Query | 1hr | | useMoods | Query | 1hr | | useRecipes | InfiniteQuery | 5min | | useRecipe | Query | 10min | | useCreateRecipe | Mutation | -- |

Zustand Store

import { createRecipeStore } from '@sudobility/mixr_client';

const useRecipeStore = createRecipeStore(localStorage);

API Methods

| Category | Methods | |----------|---------| | Health | healthCheck(), getVersion() | | Equipment | getEquipment(), getEquipmentById(), getEquipmentSubcategories() | | Ingredients | getIngredients(), getIngredientById(), getIngredientSubcategories() | | Moods | getMoods(), getMoodById() | | Recipes | generateRecipe(), getRecipes(), getRecipeById() | | Ratings | submitRecipeRating(), getRecipeRatings(), getRecipeRatingAggregate(), deleteRecipeRating() | | User | getCurrentUser(), updateCurrentUser(), getUserPreferences(), updateUserPreferences(), getUserRecipes(), getUserFavorites() | | Favorites | addFavorite(), removeFavorite() |

Development

bun run build        # Build to dist/
bun run build:watch  # Watch mode
bun run test         # Run Vitest
bun run lint         # ESLint check
bun run typecheck    # TypeScript check

Related Packages

  • @sudobility/mixr_types -- shared type definitions
  • @sudobility/mixr_lib -- business logic and utilities
  • mixr -- frontend web app

License

MIT