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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@me_tech/invitation-email-admin-user

v0.0.2

Published

Invitation Email Admin User

Readme

Invitation Email Admin User Plugin

Automates Strapi admin invitations by seeding a customizable email template and sending registration links whenever a new admin user is created.

Features

  1. Email template bootstrap – On startup the plugin ensures a send_magic_link_invite template exists inside the users-permissions plugin store, pre-populating sender, subject, and HTML body fields.@server/src/bootstrap.js#3-33
  2. Admin user lifecycle hook – Subscribes to admin::user creation events, renders the template with the admin invite link, and dispatches it through Strapi’s email provider.@server/src/bootstrap.js#34-70
  3. Lightweight admin entrypoint – Registers the plugin inside the Strapi admin app, exposing an initializer component and translation loader scaffold for future UI extensions.@admin/src/index.js#1-31
  4. Sample controller & service – Demonstrates how to expose backend endpoints through the plugin’s controller/service pattern.@server/src/controllers/controller.js#1-11 @server/src/services/service.js#1-7

Project layout

invitation-email-admin-user/
├─ admin/              # Strapi admin bundle (React)
│   ├─ src/index.js    # Plugin registration & translation loading
│   ├─ src/components/Initializer.jsx
│   └─ src/utils/getTranslation.js
└─ server/             # Strapi server bundle (Node.js)
    ├─ src/bootstrap.js
    ├─ src/controllers/
    ├─ src/services/
    └─ src/routes/

Requirements

  • Node.js 20+
  • Yarn Classic (1.x)
  • Strapi ^5.31.2
  • A configured Strapi email provider (used to deliver admin invitations)

All runtime, dev, and peer dependencies live in package.json for quick [email protected]#1-63

Installation

  1. Copy or symlink this repository into your Strapi project under ./src/plugins/invitation-email-admin-user.
  2. Install dependencies and build the plugin once:
    yarn install
    yarn build
  3. From your Strapi application, run yarn develop --watch-admin (or yarn develop) so the new plugin is compiled into the admin panel.

Tip: During local development, run yarn watch or yarn watch:link inside the plugin to rebuild assets [email protected]#23-28

Configuration

Email provider & admin URL

  • Configure an email provider through Strapi’s official email plugin; the invitation workflow reads defaultFrom and defaultReplyTo from the provider settings before sending messages.@server/src/bootstrap.js#40-66
  • Ensure admin.url is set in your Strapi configuration because invite links use ${strapi.config.get('admin.url')}/auth/register?....@server/src/bootstrap.js#46-53

Customizing the template

  • The seeded template is stored under the users-permissions plugin store key email.send_magic_link_invite and can be edited either by modifying server/src/bootstrap.js or updating the stored JSON directly.@server/src/bootstrap.js#6-52
  • Template variables available to the renderer:
    • URL – The generated registration link.
    • USER – The admin user entity just created.

Usage

  1. Create an admin user from the Strapi dashboard or through the Admin Users API.
  2. The lifecycle hook renders the template and sends the invitation to the user’s email automatically.
  3. Optionally, hit the sample controller (GET /invitation-email-admin-user) to confirm the plugin is registered; it returns the welcome message defined in the service layer.@server/src/controllers/controller.js#1-11 @server/src/services/service.js#1-7

Development workflow

| Script | Description | | ------ | ----------- | | yarn build | Runs strapi-plugin build to emit production assets into dist/[email protected]#23-28 | | yarn watch | Watches admin + server sources for changes and rebuilds [email protected]#23-28 | | yarn watch:link | Builds and outputs artifacts suitable for linking into another Strapi app during [email protected]#23-28 |

When iterating on the admin UI, keep yarn watch running here and yarn develop --watch-admin in your host Strapi project for hot reloads.

License

MIT © Mendrika [email protected]#58-61