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

@johhann/vendors-for-suppliers-engine

v0.0.3

Published

vendor records management for suppliers interacting with logistics facilities

Readme

Fleetbase Vendor Management Extension

A comprehensive vendor management extension for the Fleetbase platform that provides CRUD functionality and QR code integration for managing suppliers and logistics partners.

Features

  • Vendor CRUD Operations: Create, read, update, and delete vendor records
  • QR Code Generation: Automatic QR code generation for each vendor
  • QR Code Scanning: Mobile-friendly QR code scanner for quick vendor verification
  • Responsive UI: Built with Tailwind CSS for optimal mobile and desktop experience
  • Integration: Seamlessly integrates with existing Fleetbase architecture

Installation

Prerequisites

  • Fleetbase platform installed and running
  • PHP 8.1+ with Laravel
  • Node.js 16+ for Ember.js frontend
  • MySQL or PostgreSQL database

Backend Setup

  1. Copy the extension files to your Fleetbase installation:
cp -r server/src/* /path/to/fleetbase/api/src/
  1. Run the database migration:
php artisan migrate --path=database/migrations/vendor-for-suppliers
  1. Install QR code generation package:
composer require simplesoftwareio/simple-qrcode
  1. Add the extension routes to your API routes file:
// In routes/api.php
Route::prefix('vendors')->group(function () {
    Route::get('/', [VendorController::class, 'index']);
    Route::post('/', [VendorController::class, 'store']);
    Route::get('/{id}', [VendorController::class, 'show']);
    Route::put('/{id}', [VendorController::class, 'update']);
    Route::delete('/{id}', [VendorController::class, 'destroy']);
    Route::post('/scan', [VendorController::class, 'scanQrCode']);
});

Frontend Setup

  1. Copy the Ember.js components to your console application:
cp -r console/app/* /path/to/fleetbase/console/app/
  1. Install QR code scanning dependencies:
npm install jsqr
  1. Add the vendor routes to your Ember router:
// In app/router.js
this.route('vendors', function() {
  this.route('new');
  this.route('view', { path: '/:vendor_id' });
  this.route('edit', { path: '/:vendor_id/edit' });
});

Usage

Creating a Vendor

  1. Navigate to the Vendors section in your Fleetbase dashboard
  2. Click "Add Vendor"
  3. Fill in the vendor details (name, email, phone, address)
  4. Save the vendor - a QR code will be automatically generated

Managing Vendors

  • View: Click on any vendor to see detailed information and QR code
  • Edit: Use the edit button to modify vendor information
  • Delete: Remove vendors with confirmation dialog
  • Search: Use the search bar to find specific vendors
  • Filter: Filter vendors by status (active/inactive)

QR Code Features

  • Download: Download QR codes as PNG files
  • Scan: Use the built-in scanner to verify vendors at entry points
  • Mobile Access: QR codes link to mobile-friendly vendor detail pages

API Endpoints

  • GET /api/vendors - List all vendors
  • POST /api/vendors - Create new vendor
  • GET /api/vendors/{id} - Get vendor details
  • PUT /api/vendors/{id} - Update vendor
  • DELETE /api/vendors/{id} - Delete vendor
  • POST /api/vendors/scan - Scan QR code

Configuration

Environment Variables

Add these to your .env file:

# QR Code Storage
FILESYSTEM_DISK=public
QR_CODE_SIZE=300
QR_CODE_MARGIN=2

Permissions

Ensure your web server has write permissions to the storage directory for QR code generation:

chmod -R 775 storage/app/public/qr-codes

Security Considerations

  • All vendor data is scoped to the authenticated company
  • QR codes contain encrypted vendor information
  • Input validation on all CRUD operations
  • CSRF protection on all forms
  • Rate limiting on API endpoints

Customization

Adding Custom Fields

To add custom fields to vendors:

  1. Create a new migration:
php artisan make:migration add_custom_fields_to_vendors_table
  1. Update the Vendor model's $fillable array
  2. Update the frontend forms and display templates

Styling

The extension uses Tailwind CSS classes that match Fleetbase's design system. Customize by modifying the Handlebars templates in the console/app/templates directory.

Troubleshooting

QR Code Generation Issues

  • Ensure the simplesoftwareio/simple-qrcode package is installed
  • Check storage permissions
  • Verify the FILESYSTEM_DISK configuration

Scanner Not Working

  • Ensure HTTPS is enabled (required for camera access)
  • Check browser camera permissions
  • Verify the jsQR library is properly installed

Database Issues

  • Run php artisan migrate:status to check migration status
  • Ensure database connection is properly configured
  • Check that the vendors table was created successfully

Support

For issues and support:

  1. Check the Fleetbase documentation
  2. Review the error logs in storage/logs/laravel.log
  3. Open an issue in the Fleetbase repository

License

This extension follows the same license as the Fleetbase platform (AGPL-3.0).