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

mojaloop-reporting-service

v12.4.2

Published

The Reporting Service allows to create HTTP API endpoints using SQL queries and EJS templates and output the result in different formats.

Readme

Mojaloop Reporting Service

The Reporting Service allows to create HTTP API endpoints using SQL queries and EJS templates and output the result in different formats.

  • Create Custom Resource for the report.

    The schema can be found in helm/reporting-service/crds/mojaloopreport-crd.yaml

    Examples in resources/examples directory

  • See architecture diagram in docs here .

  • Make requests as follows:

    curl localhost:3000/ENDPOINT_NAME?PARAM_NAME=VALUE&format=FORMAT

    FORMAT can be xlsx, html, json or csv Example:

    curl localhost:3000/participants?currency=USD&format=html

Build

From the repo root:

docker build -t reporting .

Run

Populate an environment file with the credentials of your Mojaloop instance:

cat <<EOF >./.my.env
DB_HOST="localhost"
DB_USER="central_ledger"
DB_PASSWORD="password"
DB_DATABASE="central_ledger"
KETO_READ_URL=http://keto/
EOF

Where reporting is the image name from the build stage:

docker run -v $PWD/config:/opt/reporting/config -p 3000:3000 --env-file=./.my.env reporting

Audit Issues

This repository uses npm-audit-resolver to check for security vulnerabilities. Basic troubleshooting of a failed security check is as follows:

  1. Run npm run audit:check to show the current issues.
  2. Run npm run audit:resolve to attempt to automatically fix the current issues.

Running Integration test locally

  • Start minikube K8S cluster with the following command
    minikube start --driver=docker --kubernetes-version=v1.21.5
  • Build local docker image which can be accessed from minikube cluster
    sh script-minikube-docker-build.sh
  • Install helm chart for dependencies
    helm dep up ./resources/test-integration/
    helm install test1 ./resources/test-integration/
  • Wait for all the services to be up
  • Port forward the mysql service
    kubectl port-forward -n default service/mysql 3306:3306
  • Insert sample data into database
    mysql -h127.0.0.1 -P3306 -uuser -ppassword default < ./resources/examples/participants_db_dump.sql
  • Run the integration tests
    npm install
    npm run test:integration
  • Adding the custom resource for manual testing
    kubectl apply -f resources/examples/participant_list.yaml
  • Cleanup
    kubectl delete -f resources/examples/participant_list.yaml
    helm uninstall test1
    minikube stop

TODO

  • OpenAPI validation on requests and responses (optionally for reports)
  • Streaming. The DB lib supports streaming, so does koa. This will be especially important for large reports.
  • Streams in the logger.
  • Measure test coverage
  • Logger: enable printing of requests as cURL- perhaps by providing a custom handler thingie
  • Eslint. Side-note: make sure 'no-floating-promises' is enabled.