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

@heartfulnessinstitute/react-hfn-profile

v3.2.7

Published

Login and Profile APIs for MySRCM / Heartfulness Profile

Readme

react-hfn-profile

Configuration Variables to be set in .env:

// firebase config for Profile auth
REACT_APP_FIREBASE_AUTH_CONFIG='{"apiKey":"XXXXXXXXXX","authDomain":"XXXXXXXXXXX","projectId":"XXXXX","messagingSenderId":"99999999999999","appId":"XXXXXXXXXXXXXXX"}'

// config for Profile API access
REACT_APP_MYSRCM_CONFIG='{"xClientId":"SSSSSSSSSSSSSS", "profileServer":"http://profile.XXXXXXXXXX"}'

// optional config for secondary firebase instance
REACT_APP_FIREBASE_DFLT_CONFIG='{"apiKey":"XXXXXXXXXX","authDomain":"XXXXXXXXXXX","databaseURL":"https://XXXXXXXXXXXX","projectId":"XXXXXXXXXXX","storageBucket":"XXXXXXXXXXXXX","messagingSenderId":"33333333333333333","appId":"XXXXXXXXXXXXXXXXXXXXXX"}'

// config for Reg Server - optional only if reg server apis are needed
REACT_APP_REG_SERVER="XXXXXXXXXXXXXXXX"

Exports

  1. HfnFirebaseAuth - Wrapper on top of StyledFirebaseAuth with necessary plumbing for Profile APIs

  2. signOut() - method for sign out

  3. fetchProfileAPI(api, method="GET", extraHdrs={}, extraData={}) - Profile Server REST APIs wrapper

  4. fetchProfileMe() - sugar for the api "/me"

  5. getFirebaseApp() - firebase app (secondary) instance if REACT_APP_FIREBASE_DFLT_CONFIG variable is set

  6. HfnAvatar - Component that displays the image/initial of the logged in user, with a dropdown menu for My Profile and Sign Out.

  7. isSignedIn() - true or false based on whether the user is signed in or not

  8. xUserId() - uid of the signed in user

  9. xUserName() - user display name of the signed in user

  10. xAbhyasiId() - abhyasi ID of the signed in user, if exists, or "" (empty string)

  11. xUserPhoto() - photo url of the signed in user

  12. xUserEmail() - email id of the signed in user

  13. xIsPrefect() - is the signed user a prefect?

  14. xMe() - /me info for the signed in user

  15. authenticatedRequest(url, method = "GET", headers = {}, data = {}) - Wrapper on top of fetch request which adds the appropriate authorization headers

  16. authenticatedCall(fn, onSuccessCallback) - calls the passed function fn with the parameters fn(uid, token, onSuccessCallback). The function gets passed the uid and token values. The function is expected to call onSuccessCallback(payload) with result.

  17. EnsureHfnSignedIn - React Component decorator to render children components if signed in, otherwise HfnFirebaseAuth Component

  18. fetchKanhaRegAPI(api, method, paramsDict) - REST API wrapper for Reg Server

Sugars for fetchKanhaRegAPI

getKanhaRegApi(api, payload = {}, extraHdrs = {}, extraData = {}) 
postKanhaRegApi = (api, payload, extraHdrs = {}, extraData = {})
putKanhaRegApi = (api, payload, extraHdrs = {}, extraData = {})
deleteKanhaRegApi = (api, payload, extraHdrs = {}, extraData = {}) 

getKanhaRegApiId = (api, id, payload = {}, extraHdrs = {}, extraData = {})
postKanhaRegApiId = (api, id, payload, extraHdrs = {}, extraData = {})
putKanhaRegApiId = (api, id, payload, extraHdrs = {}, extraData = {}) 
deleteKanhaRegApiId = (api, id, payload = {}, extraHdrs = {}, extraData = {}) 

getKanhaRegApiPk = (api, pk, payload = {}, extraHdrs = {}, extraData = {}) 
postKanhaRegApiPk = (api, pk, payload, extraHdrs = {}, extraData = {}) 
putKanhaRegApiPk = (api, pk, payload, extraHdrs = {}, extraData = {}) 
deleteKanhaRegApiPk = (api, pk, payload = {}, extraHdrs = {}, extraData = {}) 

Setup

# npm i @heartfulnessinstitute/react-hfn-profile -S