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

nexus-react-core

v1.0.10

Published

A comprehensive React toolkit with services, hooks, and Redux store management

Readme

nexus-react-core

A comprehensive React toolkit with services, hooks, and Redux store management for modern applications.

Features

  • 🔧 Services: API calls, image processing, DALL-E integration, trading, face detection
  • 🎣 Hooks: Mobile detection, notifications, face detection
  • 🏪 Redux Store: User state, notifications, and more
  • 📱 Next.js Ready: Built specifically for Next.js applications
  • 🔒 Type Safe: Full TypeScript support
  • Tree Shakeable: Import only what you need

Installation

npm install nexus-react-core

Peer Dependencies

Make sure you have the following peer dependencies installed:

npm install @reduxjs/toolkit react react-redux axios

Optional Dependencies

For full functionality, you may also want:

# For DALL-E image generation
npm install openai

# For face detection
npm install @tensorflow/tfjs @tensorflow-models/blazeface

# For blockchain trading
npm install @solana/web3.js @solana/spl-token

# For WebSocket connections
npm install socket.io-client

Quick Start

1. Initialize Configuration

import { initializeDGN } from "nexus-react-core";

initializeDGN({
  apiBaseUrl: process.env.NEXT_PUBLIC_API_URL!,
  wsUrl: process.env.NEXT_PUBLIC_WS_URL,
  csrfEnabled: false,
});

2. Set up Redux Provider

import { Provider } from "react-redux";
import { store } from "nexus-react-core";

function App() {
  return (
    <Provider store={store}>
      <YourApp />
    </Provider>
  );
}

3. Use Services and Hooks

import { apiCall, useIsMobile, useAppSelector } from "nexus-react-core";

function MyComponent() {
  const isMobile = useIsMobile();
  const user = useAppSelector((state) => state.user);

  const fetchData = async () => {
    const data = await apiCall("/api/data", "GET");
    console.log(data);
  };

  return (
    <div>
      <h1>Welcome, {user.name}</h1>
      <p>Device: {isMobile ? "Mobile" : "Desktop"}</p>
    </div>
  );
}

Services

  • apiCall: HTTP client with automatic token refresh
  • Image Service: Save images from URLs, convert base64 to blob
  • DALL-E Service: Generate images using OpenAI's DALL-E
  • Trading Service: Crypto price fetching and trading operations
  • Face Detection: Real-time face detection using TensorFlow

Hooks

  • useIsMobile: Responsive design hook
  • useNotifications: Notification management
  • useFaceDetection: Face detection hook

Redux Store

  • User Slice: User profile, missions, achievements
  • Notifications Slice: App-wide notifications

Documentation

Migration from Existing Project

If you're migrating from an existing DGN Platform project:

  1. Install the package: npm install nexus-react-core

  2. Replace imports:

    // Before
    import { apiCall } from "@/hooks/apiCall";
    import { useAppSelector } from "@/contexts/rootStore";
    
    // After
    import { apiCall, useAppSelector } from "nexus-react-core";
  3. Initialize configuration as shown above

  4. Remove local copies of services, hooks, and store files

Development

# Install dependencies
npm install

# Build the package
npm run build

# Run linting
npm run lint

# Run tests
npm test

Publishing

# Build and publish
npm run prepublishOnly
npm publish

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details.

Support