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

@devdenvino/rts-common

v0.1.2

Published

Shared component library and utilities for micro-frontend applications

Downloads

296

Readme

@devdenvino/rts-common

Shared component library and utilities for micro-frontend applications.

Overview

rts-common is a comprehensive shared library that provides:

  • UI components (shadcn/ui, MagicUI)
  • Layout components (Sidebar, TopNav)
  • Authentication utilities (react-oidc-context)
  • Hooks and utilities
  • Theme management
  • Type definitions

Installation

pnpm add @devdenvino/rts-common

Quick Start

import { AppBase, useAuth } from '@devdenvino/rts-common';
import '@devdenvino/rts-common/style.css';

function App() {
  return (
    <AppBase
      mfeId="my-app"
      oidcConfig={{
        authority: 'https://auth.example.com',
        client_id: 'my-client-id',
        redirect_uri: window.location.origin,
      }}
      sidebarProps={{ /* ... */ }}
    >
      <YourAppContent />
    </AppBase>
  );
}

Available Exports

Main Export (@devdenvino/rts-common)

  • Components: AppBase, ErrorBoundary, NotFound, Loading, etc.
  • Hooks: useAuth, useApiClient, useIsMobile
  • Utilities: cn, helper functions
  • Context providers: AppNavProvider, SearchProvider
  • Types: AppConfig, NavMenu, etc.

Component Exports

  • @devdenvino/rts-common/components/ui - shadcn/ui components
  • @devdenvino/rts-common/components/ui/custom - Custom components (DataTable, etc.)
  • @devdenvino/rts-common/components/magicui - MagicUI components

Auth Exports

  • @devdenvino/rts-common/hooks/use-auth - Authentication utilities

See AUTH_EXPORTS.md for detailed authentication documentation.

Icon Exports

  • @devdenvino/rts-common/lucide-react - Lucide icons
  • @devdenvino/rts-common/tabler-icons-react - Tabler icons

Other Exports

  • @devdenvino/rts-common/tanstack-react-table - TanStack Table
  • @devdenvino/rts-common/motion - Motion animations
  • @devdenvino/rts-common/style.css - Compiled styles
  • @devdenvino/rts-common/styles/source - Source CSS (for Tailwind config)
  • @devdenvino/rts-common/tailwind.config - Tailwind configuration

Documentation

Development

# Install dependencies
pnpm install

# Build the library
pnpm build

# Build JavaScript only
pnpm build:js

# Build CSS only
pnpm build:css

# Development mode
pnpm dev

Usage Examples

Using Authentication

import { useAuth } from '@devdenvino/rts-common';

function MyComponent() {
  const auth = useAuth();
  
  if (auth.isLoading) return <div>Loading...</div>;
  if (!auth.isAuthenticated) return <button onClick={() => auth.signinRedirect()}>Login</button>;
  
  return <div>Welcome, {auth.user?.profile.name}</div>;
}

Using API Client

import { useApiClient } from '@devdenvino/rts-common';

function DataComponent() {
  const apiClient = useApiClient();
  
  const fetchData = async () => {
    // Automatically includes auth token
    const response = await apiClient.get('/api/data');
    return response.data;
  };
  
  // ...
}

Using UI Components

import { Button } from '@devdenvino/rts-common/components/ui';

function MyComponent() {
  return <Button variant="default">Click me</Button>;
}

Best Practices

  1. Always import styles: import '@devdenvino/rts-common/style.css'
  2. Use tree-shakeable exports: Import from specific paths when possible
  3. Leverage AppBase: Use it to set up authentication and layout automatically
  4. Use useApiClient: For authenticated API calls
  5. Check documentation: Refer to docs/ folder for detailed guides

Peer Dependencies

This package requires the following peer dependencies to be installed in your project:

{
  "react": "^18.0.0 || ^19.0.0",
  "react-dom": "^18.0.0 || ^19.0.0"
}

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Submit a pull request

Support

For issues and questions:

  • GitHub Issues: https://github.com/devdenvino/rts-common/issues
  • Documentation: See the docs/ folder

License

MIT License - see LICENSE file for details