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 🙏

© 2024 – Pkg Stats / Ryan Hefner

affinidi-uaf-client-lib

v1.0.0

Published

UAF Banner integration package for third party vendors [Frontend integration]

Downloads

2

Readme

Affinidi Uaf Client Lib

This is a repository that contains all the necessary configuration you need to successfully start development of a new service according to the standards defined by our group.

Run the application

Add line to ~/.npmrc where TOKEN is your Github personal access token: to include affinityProject relative common libs //npm.pkg.github.com/:_authToken=TOKEN Howto create your Github personal access token.

$ npm install
$ npm run dev

How to use this

  1. Clone the project to a new folder
  2. Edit package.json to indicate the correct package name, description and author, and make sure you are using the correct or most current stable versions of the Affinity packages
  3. Remove .git folder if you need a clean history, otherwise it's going to contain an initial commit reference
  4. Initialize a new git repository if you deleted the .git folder
  5. Delete example folder, it's there just so you can see the simplest setup
  6. Update the file ./config/app.yaml to config your service:
    • Protect custom routes with API Key Check Middleware apikeyMiddlewareEnabled: true
    • Add publicPaths to array to overpass API Key check
  7. Update the file ./config/errors.yaml to have custom errors for your service

CD and Infra Settings

Terrafrom/Terragrunt

Info

Terraform/Terragrunt is our tool of choice to manage the entire lifecycle of infrastructure using infrastructure as code. That means declaring infrastructure components in configuration files that are then used by Terraform to provision, adjust and tear down infrastructure in cloud provider. Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, working with multiple Terraform modules, and managing remote state.

How to

For launching infra using Terragrant, please see manual. Current project provides predefined infrastructure under the folder terraform. Please, delete terraform folder if current infra part not needed.

AWS-CLI/AWS-Vault

Info

AWS Vault is a tool to securely store and access AWS credentials in a development environment. Firstly AWS CLI needed to be installed.

How to

To set up and configure AWS CLI and AWS-Vault on local machine, please see manual.

API Gateway

KrakenD

Info

KrakenD is a high-performance open source API Gateway.

KrakenD supports flexible configuration that lets us use templating to create a final krakend.json.

We use this feature to separate endpoint definitions of team APIs to have better maintainability.

How to

Each API of the team should have its own configuration file stored under config/settings folder. If your new backend service need to be connected to the API gateway, please create JSON file with settings at api-gateway repo using following the naming standard of config/settings/api_$name.json where $name is a short name describing the API. Example: config/settings/api_.json

Settings have to match the following structure:

{
  "default_backend_host": "http://affinidi-uaf-client-lib",
  "endpoint_prefix": "/affinidi-uaf-client-lib/",
  "endpoints": [
    {
      "endpoint": "/v1/somepath/{id}",
      "backend": [
        {
          "url_pattern": "/api/v1/somepath/{id}"
        }
      ]
    }
  ]
}

Frameworks and tools

  1. Typescript
  2. Express for REST APIs
  3. tsoa for OpenAPI spec generation
  4. dotenv for .env file configuration
  5. pino for logging
  6. ESLint for code analysis
  7. husky for git hooks
  8. jest for testing