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

nodebb-plugin-brf-energi

v0.9.0

Published

Modifications to nodeBB for BRF Energi

Readme

BRF Energi plugin

Specialized plugin for BRF Energi forum, supposed to make everything run right the way we want it.

API extensions

/admin/plugins/brf-energi

Not really API, but shows admin interface and some options. Probably pretty ugly and full of test options

/authmetryifneeded

Redirects to /auth/metry if you're not logged in yet, otherwise just goes to homepage (For /auth/metry, see sso-metry plugin).

/api/whoami

Performs BRF authentication, and if successful returns the userid

POST /api/brftouch (Mirror a brfapp user, create if needed)

Wants an already-authenticated BRF token, and if it checks out it either authenticates the corresponding user or creates a new one in case it doesn't exist on the forum yet. Used for the linking between forum and main website.

POST /api/brfauth/uid (Get user's uid and matryid)

Authenticates by username/email and password like normal, returns uid and metryid if exists. You can use an email as the username, it willbe resolved. In case of incorrect password, you'll get something like this:

{
    "path": "/forum/api/brfauth/uid",
    "error": "[[error:invalid-login-credentials]]"
}

POST brfenergi.se/forum/api/v2/users/ (Register a new user)

Register a new user thru nodebb. This is a nodebb-official endpoint, but I include some docs on it here because it's useful, while risking that it becomes outdated.

Body:

token=(Token)

(Token) :=

{

  "username": "JohnDoe",

  "email": "[email protected]",

  "password": "djd982j3dj8ffa2ca02",

  "_uid": "1" // Admin, dont change.

}

Token shall be signed with the key that is set in the plugin settings.

See: https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkpvaG5Eb2UzIiwiZW1haWwiOiJqb2huZG9lMDAzQGV4YW1wbGUuY29tIiwicGFzc3dvcmQiOiJkamQ5ODJqM2RqOGZmYTJjYTAyIiwiX3VpZCI6IjEifQ.Y6NEq1e3mPClB3X6aNuWIS-BaEasDPe63MVfnQAnPBc

Good response:

{"code":"ok","payload":{"uid":33}}

Bad responses:

{"code":"internal-server-error","message":"email-taken","params":{}}

{"code":"params-missing","message":"Required parameters were missing from this API call, please see the \"params\" property","params":["_uid"]}

(Rest is NodeBB defualt stuff) brf-energi Plugin for NodeBB

A starter kit for quickly creating NodeBB plugins. Comes with a pre-setup LESS file, server side JS script with an action:app.load hook, and a client-side script. Most plugins need at least one of the above, so this ought to save you some time. For a full list of hooks have a look at our wiki page, and for more information about creating plugins please visit our documentation portal.

Fork this or copy it, and using your favourite text editor find and replace all instances of nodebb-plugin-brf-energi with nodebb-plugin-your-plugins-name. Change the author's name in the LICENSE and package.json files.

Once you're done don't forget to publish it on NPM, and make a thread about it here.

Hello World

Really simple, just edit static/lib/main.js and paste in console.log('hello world');, and that's it!

Installation

npm install nodebb-plugin-brf-energi

Screenshots

Don't forget to add screenshots!