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

@cloudwarriors-ai/studio-frontend

v0.1.2

Published

Embeddable React component library for Studio AI code generation service

Readme

@cloudwarriors-ai/studio-frontend

Embeddable React component library for Studio AI code generation service.

Overview

This package provides React components and hooks that allow any React application to integrate with the Studio API for AI-powered code generation. The components are framework-agnostic and work with any React setup (Vite, Next.js, Create React App, etc.).

Features

  • Zero Framework Coupling: No Redux, no assumptions about your backend
  • Standalone Service Model: Components talk to Studio's API, not your backend
  • Type-Safe: Full TypeScript support with exported types
  • SSE Streaming: Real-time progress updates during code generation
  • Voice Input: Optional speech-to-text integration
  • Customizable: Use the full StudioPage or build your own UI with our hooks

Installation

npm install @cloudwarriors-ai/studio-frontend

Quick Start

import { StudioProvider, StudioPage } from "@cloudwarriors-ai/studio-frontend";

function App() {
  return (
    <StudioProvider
      config={{
        studioApiUrl: "http://localhost:8100/api",
        projectId: "proj_abc123",
        apiKey: "sk_studio_xyz789",
        user: {
          email: "[email protected]",
          name: "User Name",
        },
      }}
    >
      <StudioPage />
    </StudioProvider>
  );
}

API

StudioProvider

The root component that provides Studio configuration to all child components.

Props:

  • config: StudioConfig - Configuration object with Studio connection details

StudioConfig

interface StudioConfig {
  studioApiUrl: string; // e.g. 'http://localhost:8100/api'
  projectId: string; // Studio project ID
  apiKey: string; // Studio API key
  user: {
    email: string;
    name: string;
  };
  theme?: {
    // Optional theme customization
    primary?: string;
    background?: string;
    card?: string;
  };
}

Hooks

useStudioClient()

Returns the Studio API client instance for making requests.

const client = useStudioClient();

// Submit a change request
const request = await client.submitRequest({
  mode: "designer",
  request_text: "Add a dark mode toggle",
});

// Get all requests
const requests = await client.getRequests();

useSSE(url, options)

Connect to Server-Sent Events stream for real-time updates.

const { disconnect, reconnect } = useSSE(
  client.getRequestStreamUrl(requestId),
  {
    onMessage: (event) => console.log("SSE event:", event),
    onError: (error) => console.error("SSE error:", error),
    onOpen: () => console.log("SSE connected"),
  },
);

useVoiceRecognition(options)

Web Speech API hook for voice input.

const {
  isListening,
  transcript,
  interimTranscript,
  startListening,
  stopListening,
} = useVoiceRecognition({
  language: "en-US",
  onTranscript: (text, isFinal) => {
    if (isFinal) console.log("Final:", text);
  },
});

Components

StudioPage

Complete UI for Studio - mode selector, request form, and request list.

<StudioPage />

ThinkingIndicator

Animated "thinking" indicator with random messages.

<ThinkingIndicator variant="default" />

VoiceInput

Microphone button with live transcription.

<VoiceInput
  onTranscriptAppend={(text) => setMessage(prev => prev + ' ' + text)}
  disabled={isSubmitting}
/>

Building Custom UIs

You can build your own UI using our hooks:

import { useStudioClient } from '@cloudwarriors-ai/studio-frontend';

function CustomStudioUI() {
  const client = useStudioClient();

  const handleSubmit = async (text: string) => {
    const request = await client.submitRequest({
      mode: 'developer',
      request_text: text
    });
    // Handle request...
  };

  return (
    // Your custom UI...
  );
}

Architecture

Studio Frontend follows these principles:

  1. No Backend Assumptions: Components only talk to Studio's API
  2. Provider Pattern: Single StudioProvider for configuration
  3. Composable: Use full StudioPage or individual components
  4. Type-Safe: All API calls and data structures are typed

License

MIT