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

@ortha/admin-identity

v0.0.4

Published

Authentication UI plugin for the Ortha admin application — provides login, signup, and invite code verification pages. All auth routes are public (guest-only) and redirect authenticated users to the home page.

Readme

@ortha/admin-identity

Authentication UI plugin for the Ortha admin application — provides login, signup, and invite code verification pages. All auth routes are public (guest-only) and redirect authenticated users to the home page.

Installation

Internal monorepo dependency — import directly:

import { identityPlugin } from '@ortha/admin-identity';
import type { CurrentUser, Role, Permission } from '@ortha/admin-identity';

Usage

Registering the plugin

import { bootstrap } from '@ortha/admin-platform-bootstrap';
import { identityPlugin } from '@ortha/admin-identity';

bootstrap(document.getElementById('root')!, [
    identityPlugin()
    // ...other plugins
]);

Using API hooks

import { useLogin, useCurrentUser, useRoles } from '@ortha/admin-identity';

const LoginComponent = () => {
    const login = useLogin();

    const handleSubmit = (data: { email: string; password: string }) => {
        login.mutate(data);
    };
};

const ProfileComponent = () => {
    const { data: user } = useCurrentUser();
    const { data: roles } = useRoles();
};

Routes

| Path | Page | Auth Required | | -------------- | -------------------------- | ------------- | | /auth | Auth layout wrapper | No | | /auth/login | Login form | No | | /auth/signup | Signup form (invite-gated) | No | | /auth/invite | Invite code verification | No |

API Reference

Plugin

| Export | Kind | Description | | ------------------ | ------- | ------------------------------------ | | identityPlugin() | factory | Admin plugin — registers auth routes |

Hooks

| Export | Kind | Description | | ----------------- | ---- | --------------------------------------------- | | useLogin | hook | Login mutation (POST /api/identity/login) | | useSignup | hook | Signup mutation (POST /api/identity/signup) | | useInviteVerify | hook | Invite verify mutation | | useInviteCreate | hook | Invite create mutation | | useRefresh | hook | Token refresh mutation | | useCurrentUser | hook | Current user query (GET /api/identity/me) | | useRoles | hook | Roles query (GET /api/identity/roles) | | currentUserKey | fn | Query key factory for current user cache | | rolesKey | fn | Query key factory for roles cache |

Types

| Export | Kind | Description | | ----------------- | ---- | ------------------------------------ | | CurrentUser | type | Current user entity | | CurrentUserRole | type | Current user's role with permissions | | Permission | type | Permission (action + resource) | | Role | type | Role entity |

Internal Structure

src/lib/
├── identityPlugin/index.ts         # Plugin factory with route registration
├── types/index.ts                  # Shared entity types (CurrentUser, Role, etc.)
├── api/
│   ├── useLogin/index.ts           # LoginBody + login() + useLogin mutation
│   ├── useSignup/index.ts          # SignupBody + signup() + useSignup mutation
│   ├── useInviteVerify/index.ts    # InviteVerifyBody + useInviteVerify mutation
│   ├── useInviteCreate/index.ts    # InviteCreateBody + useInviteCreate mutation
│   ├── useRefresh/index.ts         # refresh() + useRefresh mutation
│   ├── useCurrentUser/index.ts     # currentUserKey + useCurrentUser query
│   └── useRoles/index.ts          # rolesKey + useRoles query
└── pages/
    ├── LoginPage/index.tsx
    ├── SignUpPage/index.tsx
    └── InviteCodePage/index.tsx

Key Patterns

  • Auth pages use react-hook-form with ajvResolver from @ortha/admin-utils.
  • API hooks use TanStack React Query and httpClient from @ortha/admin-platform-core.
  • Request/response types specific to one hook are co-located inside that hook's file.
  • Shared entity types live in types/index.ts.
  • Error handling uses handleMutationError from @ortha/admin-utils.
  • This plugin has no dependencies on other feature plugins — it is foundational.

Dependencies

  • @ortha/admin-platform-corehttpClient, auth store
  • @ortha/admin-platform-plugin-registry — plugin types
  • @ortha/admin-utilsajvResolver, handleMutationError
  • @ortha/design-system — theme and UI components

Building

nx build admin-identity