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

@umituz/react-native-ai-generation-content

v1.61.58

Published

Provider-agnostic AI generation orchestration for React Native with result preview components

Readme

@umituz/react-native-ai-generation-content

Provider-agnostic AI generation orchestration for React Native

Comprehensive React Native library for AI-powered content generation. Support multiple providers with 25+ AI features including image generation, video creation, text-to-speech, face swap, and more.

🎯 Library Purpose

Provider-agnostic AI generation orchestration layer. Focus on business logic and user experience while handling multiple AI providers seamlessly. Clean architecture with domain-driven design for maintainable, scalable AI features.


📋 Feature Overview

Image Generation

  • Text to Image: Generate images from descriptions
  • Image to Image: Transform images with prompts
  • Style Transfer: Apply artistic styles
  • Photo Restoration: Restore old photos
  • Upscaling: Increase resolution
  • HD Touch Up: Enhance quality

Face & Person Features

  • Face Swap: Swap faces between images
  • Future Prediction: Individual future scenarios

Video & Animation

  • Text to Video: Generate videos from text
  • Image to Video: Convert images to video

Background & Editing

  • Remove Background: Remove image backgrounds
  • Replace Background: Replace with new background
  • Inpainting: Fill masked areas
  • Remove Object: Remove unwanted objects
  • Colorization: Add color to B&W photos

Creative & Audio

  • Meme Generator: Create memes with text
  • Sketch to Image: Convert sketches to images
  • Anime Selfie: Anime style conversion
  • Audio Generation: Generate audio content
  • Text to Voice: Text-to-speech synthesis
  • Script Generator: Generate content scripts

Analysis

  • Image Captioning: Generate image descriptions

📦 Installation

npm install @umituz/react-native-ai-generation-content

🚀 Quick Start

Configuration

import { configureAppServices } from '@umituz/react-native-ai-generation-content';

configureAppServices({
  networkService: {
    baseUrl: 'https://your-api.com',
    apiKey: 'your-api-key',
  },
  creditService: {
    checkCredits: async (userId, cost) => true,
    deductCredits: async (userId, cost) => {},
  },
  paywallService: {
    showPaywall: async () => true,
  },
});

Basic Usage

import { useTextToImageFeature } from '@umituz/react-native-ai-generation-content';

const feature = useTextToImageFeature({
  config: {
    model: 'imagen-3',
    onProcessingComplete: (result) => {
      console.log('Generated:', result.imageUrl);
    },
  },
  userId: 'user-123',
});

// Use feature.state, feature.generate(), etc.

⚠️ Critical Rules

MUST FOLLOW

  1. Configuration

    • MUST configure app services before using features
    • MUST provide valid userId for tracking
    • MUST implement credit checking
    • MUST handle errors properly
  2. State Management

    • MUST check isReady before enabling actions
    • MUST handle isProcessing state
    • MUST display progress to users
    • MUST implement error handling
  3. Performance

    • MUST implement debouncing (300ms)
    • MUST cache results locally
    • MUST handle large files properly
    • MUST NOT block main thread
  4. Privacy & Ethics

    • MUST obtain consent for person-based features
    • MUST implement content moderation
    • MUST comply with regulations
    • MUST provide clear usage terms

🚫 Prohibitions

MUST AVOID

NEVER:

  • Skip configuration
  • Use without userId
  • Ignore error handling
  • Process without user action
  • Violate privacy/consent
  • Block main thread
  • Hardcode API keys

🤖 AI Agent Directions

When implementing with AI code generation:

REQUIREMENTS:
1. Import from @umituz/react-native-ai-generation-content
2. Configure app services first
3. Use feature-specific hooks
4. Implement proper state management
5. Handle errors gracefully
6. Show progress to users
7. Implement cleanup on unmount

CRITICAL RULES:
- MUST configure before using features
- MUST provide valid userId
- MUST check isReady before actions
- MUST handle isProcessing state
- MUST implement error handling
- MUST respect user privacy

FEATURE HOOKS:
- useTextToImageFeature: Image generation
- useFaceSwapFeature: Face swapping
- useTextToVoiceFeature: Text-to-speech
- And 20+ more features

STRICTLY FORBIDDEN:
- No skipping configuration
- No missing userId
- No ignoring errors
- No auto-processing
- No privacy violations
- No blocked UI
- No hardcoded credentials

📚 Documentation Structure

@umituz/react-native-ai-generation-content/
├── src/
│   ├── features/           # 23 AI features (each with README)
│   │   ├── text-to-image/
│   │   ├── face-swap/
│   │   └── ...
│   ├── domains/           # Shared domains
│   │   ├── content-moderation/
│   │   ├── prompts/
│   │   ├── creations/
│   │   └── face-detection/
│   └── features/shared/   # Shared functionality
├── docs/                  # Additional documentation
├── ARCHITECTURE.md        # Architecture details
├── FAQ.md                # Common questions
└── MIGRATION_GUIDE.md    # Migration guide

Feature Documentation

Each feature has comprehensive documentation:

  • Import paths (only code in README)
  • Usage strategy (when to use/not use)
  • Critical rules (MUST follow)
  • Prohibitions (MUST avoid)
  • AI agent directions (prompt templates)
  • Configuration strategy
  • State management
  • Best practices
  • Common pitfalls

Example: See src/features/text-to-image/README.md


🎨 Architecture

Clean Architecture

┌─────────────────────────────┐
│   Presentation Layer        │
│   (Components, Hooks)        │
└─────────────────────────────┘
              ↓
┌─────────────────────────────┐
│      Domain Layer           │
│   (Types, Interfaces)       │
└─────────────────────────────┘
              ↓
┌─────────────────────────────┐
│   Infrastructure Layer      │
│  (Services, Repositories)    │
└─────────────────────────────┘

Key Principles

  • Separation of Concerns: Each layer has specific responsibility
  • Dependency Inversion: Depend on abstractions, not implementations
  • Provider Agnostic: Support multiple AI providers
  • Type Safety: Comprehensive TypeScript types
  • Testability: Clean, testable code

🔐 Security & Privacy

API Keys

  • Never store in code
  • Use environment variables
  • Implement rotation

Content Moderation

  • Enable for user-generated content
  • Configure rules appropriately
  • Monitor for violations

User Data

  • Anonymize analytics
  • Secure storage
  • GDPR/CCPA compliance

📈 Performance

Optimization

  • Lazy load features
  • Cache results
  • Optimize images
  • Background processing

Best Practices

  • Implement debouncing
  • Use pagination
  • Compress uploads
  • Monitor performance

🤝 Contributing

Contributions welcome! Please:

  • Follow code style
  • Add tests
  • Update docs
  • Submit PR

See CONTRIBUTING.md


📄 License

MIT


📞 Support


Version: 2.0.0 (Strategy-based Documentation) Last Updated: 2025-01-08