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

@mingsterism/trpc-process

v2.7.11

Published

new > process trpc service to manage api and events

Readme

@mingsterism/trpc-process

new

process trpc service to manage api and events

required

  • create .env file with variables:
NPM_TOKEN=<npm-token>
PORT=<port>
APP_ENV=<environment> (local / development / production)
APP_BASE_URL=<app-base-url>
NATS_URL=<nats-url>
REDIS_HOST=<redis-host>
REDIS_PORT=<redis-port>
REDIS_USERNAME=<redis-username>
REDIS_PASSWORD=<redis-password>
DATABASE_URL=<database-url>
SUPABASE_JWT_SECRET=<supabase-jwt-secret>
GOOGLE_CLIENT_ID=<google-client-id>
GOOGLE_CLIENT_SECRET=<google-client-secret>
GOOGLE_DRIVE_CALLBACK_URL=<google-drive-callback-url>
GOOGLE_DRIVE_ROOT_FOLDER_NAME=<google-drive-root-folder-name>
GMAIL_CALLBACK_URL=<gmail-callback-url>
ACL_MICROSERVICE_URL=<acl-microservice-url>
GRAFANA_CLOUD_USER_ID=<grafana-cloud-user-id> (not required for local environment)
GRAFANA_CLOUD_API_KEY=<grafana-cloud-api-key> (not required for local environment)
TEMPORAL_URL=<temporal_url>
STRIPE_SECRET_KEY=<stripe-secret-key>

setup

# install dependencies
$ npm install

# run development app
$ npm run dev

# build production app
$ npm run build

# start production app
$ npm run start

How to run locally

1. Avianflow-npm-package

  • clone and open https://github.com/theaviantech/avianflow-npm-packages.git latest branch
  • cd into each subfolder under docker compose folder
  • docker-compose up -d for each subfolder
  • cd into prisma folder
  • npm i
  • paste app_env and postgres_url in .env in prisma
  • npm run prisma:push

2. Trpc service repo

  • comment out .npmrc
  • npm i
  • create .env file (Variables are stated above. Follow the ports according to the services stated below to avoid issues when running all the services together locally)
  • clone and run https://github.com/theaviantech/acl-backend.git latest branch first
  • then, npm run dev to run the trpc services

To run playground.ts

  • Make sure https://github.com/theaviantech/acl-backend.git latest branch is running
  • Clone and run https://github.com/theaviantech/avianflow-web-auth-sveltekit.git latest branch locally
  • Get the access token after login and paste it into playground.ts
  • npm run dev
  • tsx playground.ts
  • See logs in terminal

To run jest test

  • Make sure https://github.com/theaviantech/acl-backend.git latest branch is running
  • Clone and run https://github.com/theaviantech/avianflow-web-auth-sveltekit.git latest branch locally
  • Get the access token after login and update the details in test/config.ts
  • npm run dev
  • npm run test:1 (refer cmd in package.json)
  • See logs in terminal

Note: Make sure @mingsterism/prisma and @mingsterism/events is updated to latest version in all trpc services

How to publish trpc services updates to npm

  1. npm login
  2. delete dist folder
  3. increase package version in package.json
  4. npm i
  5. git push
  6. npm publish

Recommended local ports for trpc services

  • trpc-process: http://127.0.0.1:3000
  • trpc-form: http://127.0.0.1:3002
  • trpc-autodoc: http://127.0.0.1:3003
  • trpc-trigger: http://127.0.0.1:3004

Recommended local ports for microservices

  • acl-microservice: http://localhost:3005
  • custom-tables-miscroservice: http://localhost:3006 Note: Make sure the db container is on a different port too. Follow the instructions in the readme of the respective repos.

Running Grafana Loki locally

(Loki stores the logs coming from Winston Logger)

  1. change LokiTransport config in ./src/logger.ts:
new LokiTransport({
    host: 'http://127.0.0.1:3100',
    labels: { service: 'trpc-process' },
    format: lokiFormat,
    onConnectionError: (err) => {
        console.error('Error connecting to Loki', err)
    }
})
  1. cd ./grafana_loki
  2. docker-compose pull
  3. docker-compose up
  4. go to http://localhost:3200 (view logs here)
  5. npm run dev
  6. npx tsx playground.ts (to test the logs)

Note: We don't need the docker-compose.yaml when Loki is deployed to Grafana Cloud Note: We are monitoring the deployed logs in our Grafana account