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

productledger

v0.1.0

Published

<div align="center"> <h1> 🏒 Product Ledger Management System </h1>

Downloads

5

Readme

Product Ledger

Product Ledger Next.js TypeScript MongoDB Tailwind CSS

A comprehensive business ledger management system for product-selling companies with real-time data synchronization, overdue management, and intelligent credit limit handling.

πŸš€ Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature


🌟 Overview

The Product Ledger Management System is a full-stack web application designed for product-selling companies to efficiently manage their financial transactions, customer relationships, and inventory. Built with modern technologies, it provides real-time data synchronization, intelligent overdue management, and automated credit limit adjustments.

✨ Key Highlights

  • πŸ”„ Real-time Data Sync - IndexedDB + MongoDB integration
  • πŸ’° Smart Credit Management - Dynamic credit limit adjustments
  • πŸ“Š Comprehensive Reporting - Revenue, product, and overdue analytics
  • πŸ”” Automated Overdue Tracking - Intelligent interest and fine calculations
  • πŸ“± Responsive Design - Works seamlessly across all devices
  • πŸ” Secure Authentication - NextAuth.js with multiple providers
  • πŸ“§ Email Integration - Automated notifications and password reset

πŸ—οΈ System Architecture

graph TB
    subgraph "Frontend Layer"
        A["Next.js 14 App Router"]
        B["React Components"]
        C["Tailwind CSS"]
        D["shadcn/ui"]
    end
    
    subgraph "Authentication"
        E["NextAuth.js"]
        F["Google OAuth"]
        G["Email Provider"]
    end
    
    subgraph "API Layer"
        H["REST API Routes"]
        I["Server Actions"]
        J["Middleware"]
    end
    
    subgraph "Data Layer"
        K["MongoDB Atlas"]
        L["IndexedDB"]
        M["Real-time Sync"]
    end
    
    subgraph "External Services"
        N["Email Service"]
        O["Cron Jobs"]
        P["PDF Generation"]
    end
    
    A --> B
    B --> C
    B --> D
    A --> E
    E --> F
    E --> G
    A --> H
    H --> I
    H --> J
    H --> K
    K --> L
    L --> M
    H --> N
    O --> K
    H --> P

πŸ“‹ Features

  • Customer Management: Add, update, and track customer details with credit limits and transaction history.
  • Transaction Ledger: Record sales, payments, and adjustments with real-time updates.
  • Overdue Alerts: Automated notifications for overdue payments with customizable interest rates.
  • Inventory Tracking: Monitor stock levels and integrate with sales data.
  • Analytics Dashboard: Visualize revenue trends, product performance, and overdue accounts.
  • PDF Reports: Generate professional invoices and account statements.
  • Multi-user Support: Role-based access control for team collaboration.

πŸ› οΈ Installation

Prerequisites

  • Node.js 18.x or higher
  • MongoDB Atlas account
  • Google OAuth credentials (for authentication)
  • Email service provider (e.g., SendGrid, Nodemailer)

Steps

  1. Clone the Repository

    git clone https://github.com/your-repo/product-ledger.git
    cd product-ledger
  2. Install Dependencies

    npm install
  3. Set Up Environment Variables Create a .env.local file in the root directory and add the following:

    MONGODB_URI=MONGODB CONNECTION URI
    MONGODB_DB=Database name
    NEXTAUTH_SECRET=secret key
    NEXTAUTH_URL=https://product-ledger.vercel.app/
    EMAIL_SERVER_HOST=smtp.gmail.com
    EMAIL_SERVER_PORT=587
    EMAIL_SERVER_USER=user mail-id
    EMAIL_SERVER_PASSWORD=google generated password 
    EMAIL_FROM=From mail-id
  4. Run the Application

    npm run dev

    Open http://localhost:3000 in your browser.


πŸ–₯️ Usage

  1. Sign Up/Login: Use Google OAuth or email-based authentication to access the system.
  2. Dashboard: View key metrics like total revenue, overdue accounts, and inventory status.
  3. Add Customers: Input customer details and set credit limits.
  4. Record Transactions: Log sales, payments, or adjustments in the ledger.
  5. Generate Reports: Export invoices or account statements as PDFs.
  6. Monitor Overdues: Receive automated alerts for overdue payments and apply interest/fines.

πŸ§ͺ Development

Tech Stack

  • Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS, shadcn/ui
  • Backend: Next.js API Routes, Server Actions, MongoDB Atlas
  • Authentication: NextAuth.js (Google OAuth, Email)
  • Database: MongoDB with IndexedDB for offline sync
  • External Services: Email notifications, PDF generation, cron jobs for scheduled tasks

Project Structure

product-ledger/
β”œβ”€β”€ app/                    # Next.js App Router
β”œβ”€β”€ components/             # React components
β”œβ”€β”€ lib/                    # Utility functions and configurations
β”œβ”€β”€ models/                 # MongoDB schemas
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ styles/                 # Tailwind CSS and global styles
β”œβ”€β”€ .env.local              # Environment variables
β”œβ”€β”€ next.config.js          # Next.js configuration
β”œβ”€β”€ tsconfig.json           # TypeScript configuration

🐳 Deployment

Deploy to Vercel

  1. Push your repository to GitHub.
  2. Connect your repository to Vercel.
  3. Configure environment variables in Vercel’s dashboard.
  4. Deploy the application with a single click.

Deploy to Other Platforms

  • Use Docker for containerized deployment.
  • Configure MongoDB Atlas for production-grade database hosting.
  • Set up cron jobs for scheduled tasks (e.g., overdue notifications).

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ“ž Contact

For questions or support, reach out to:


πŸ™ Acknowledgments