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

acquirer-backend

v0.1.1

Published

Merchant Acquirer Backend

Downloads

4

Readme

Prerequisites

  • MySQL/MariaDB
    • Database name should exists/create as defined inside .env file.
    • Database username/password should exists/create as defined inside .env file.
  • MinIO (S3 Compatible Object Storage Server) (For Local Development and Testing PDF uploads)
    • Default values are already configured inside .env.
      • Should use AWS S3 configration when in Production.
    • Running Local S3 Object Storage Server with minio server s3-storage
      • s3-storage is the name of the directory.

Run with

  1. npm install
  2. npm run start when you are inside <rootProject>/packages/acquirer-backed or npm run acquirer-backend:start when you are at rootProject directory.

Integration Testings

  • Make sure MySQL/MaridaDB database name, username, password are configured according to the .env.test file.

  • Make sure S3 Minio Server is running... either

  • npm run test when you are inside <rootProject>/packages/acquirer-backed

  • npm run test -w acquirer-backend when you are at rootProject directory.

Configuration

| Environment Variables | Default Values | Description | | ---------------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------- | | NODE_ENV | development | Sets the environment for Node.js. Common values: development, production, test. | | APP_URL | http://localhost:5555 | URL of the app, used for features like email verification. | | HOST | 0.0.0.0 | Host IP address for the server. | | PORT | 5555 | Port number for the server. | | FRONTEND_SET_PASSWORD_URL | http://localhost:5173/set-password | URL for redirecting to set password in frontend, typically used in email verification. | | JWT_SECRET | merchant-acquirer-jwt_secret | Secret key for JWT. (Change in production) | | JWT_EXPIRES_IN | 1d | Expiration time for JWT. Common formats: 1d for 1 day, 2h for 2 hours, etc. | | RECAPTCHA_SECRET_KEY | recaptcha-secret-key | Backend Secret key for Google reCAPTCHA. (Change in production) | | RECAPTCHA_ENABLED | false | Enable or disable Google reCAPTCHA. | | API Key Generation Configuration | | | | API_KEY_LENGTH | 64 | Length of the generated API key. | | API_KEY_PREFIX | MR | Prefix for the API key. | | MySQL Database Configuration | | | | DB_HOST | localhost | MySQL database server host. | | DB_PORT | 3306 | Port for the MySQL database. | | DB_USERNAME | merchant_acquirer_user | Username for MySQL database. | | DB_PASSWORD | password | Password for MySQL database. | | DB_DATABASE | merchant_acquirer_db | Name of the MySQL database. | | RabbitMQ Configuration | | | | RABBITMQ_HOST | 127.0.0.1 | RabbitMQ server host. | | RABBITMQ_PORT | 5672 | Port for RabbitMQ server. | | RABBITMQ_USERNAME | guest | Username for RabbitMQ server. (Change in production) | | RABBITMQ_PASSWORD | guest | Password for RabbitMQ server. (Change in production) | | RABBITMQ_QUEUE | acquirer_to_registry | Name of the RabbitMQ queue. | | RABBITMQ_REPLY_QUEUE | registry_reply_acquirer | Name of the RabbitMQ reply queue. | | S3/Minio Configuration | | | | S3_ENDPOINT | localhost | S3 or Minio server endpoint. | | S3_PORT | 9000 | Port for S3 or Minio server. 443 for AWS S3 with HTTPS. | | S3_ACCESS_KEY | minioadmin | Access key for S3 or Minio. | | S3_SECRET_KEY | minioadmin | Secret key for S3 or Minio. | | S3_REGION | us-east-1 | Region for S3. Ignored by Minio. | | S3_USE_SSL | false | Set to true for HTTPS with AWS S3. | | S3_MERCHANT_BUCKET_NAME | merchant-documents | Name of the S3 bucket for merchant documents. | | SendGrid Configuration | | | | SENDGRID_API_KEY | add-api-key-here | API key for SendGrid. Used for services like email verification. | | Log Configuration | | | | LOG_PATH | ./logs | Path for storing logs. | | LOG_LEVEL | debug | Logging level. Values: trace, debug, info, warn, error, etc. | | LOG_DISABLED | false | Enable or disable logging. | | General API Rate Limit Configuration | | | | GENERAL_RATE_LIMIT_WINDOW | 15m | The time window for general API rate limiting, in minutes. | | GENERAL_RATE_LIMIT_MAX | 100 | The maximum number of requests allowed in the time window. | | Login API Rate Limit Configuration | | | | AUTH_RATE_LIMIT_WINDOW | 1h | The time window for login API rate limiting, in minutes. | | AUTH_RATE_LIMIT_MAX | 10 | The maximum number of requests allowed in the time window. |