Skip to content

dadishimwe/InventorySync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Management System

Node.js SQLite MIT License

Table of Contents

Project Overview

A robust web-based inventory management solution designed for networking equipment resellers. The system provides real-time tracking of Starlink kits, routers, and switches across multiple locations with comprehensive status monitoring.

Features

Core Functionality

  • Multi-location Inventory Tracking

    • Warehouse, office, and client site management
    • Status categorization (In Stock/Out of Stock/Damaged)
  • Role-Based Access Control

    • Hierarchical user permissions (Admin/Staff/Client)
    • Fine-grained access control

Technical Features

  • Offline-First Architecture

    • Dexie.js-powered IndexedDB storage
    • Automatic conflict resolution
    • Background sync capability
  • Reporting Engine

    • CSV export functionality
    • Custom report generation

Technology Stack

Frontend

Technology Purpose Version
HTML5 Structure -
CSS3 Styling -
JavaScript (ES6+) Client Logic ES2020
Dexie.js IndexedDB Wrapper 3.2.2

Backend

Technology Purpose Version
Node.js Runtime 14+
Express.js Web Framework 4.17+
SQLite Database 3.35+
bcrypt Password Hashing 5.0+
express-session Session Management 1.17+

Deployment

  • Raspberry Pi 3B+/4 (ARMv8)
  • SSD Storage Recommended
  • Nginx Reverse Proxy (Optional)

Installation

Prerequisites

  • Node.js 14+
  • npm 6+
  • Raspberry Pi OS (64-bit recommended)

Setup Process

# Clone repository
git clone https://github.com/yourrepo/inventory-management.git
cd inventory-management

# Install dependencies
npm install

# Environment configuration
cp .env.example .env

Configuration

Environment Variables

PORT=3000
SESSION_SECRET=your_secret_key
DB_PATH=./data/inventory.db
BCRYPT_SALT_ROUNDS=10

Database Initialization

The system automatically creates:

  • users table with admin credentials (admin/admin123)
  • inventory table with schema validation
  • clients table for customer management

Usage

Startup

node server/server.js

Access Points

  • Web Interface: http://localhost:3000
  • API Base URL: http://localhost:3000/api/v1

API Documentation

Endpoints

Method Endpoint Description
POST /api/v1/auth/login User authentication
GET /api/v1/inventory Retrieve inventory
POST /api/v1/inventory Create new item
PUT /api/v1/inventory/:id Update item

View Full API Documentation

Deployment

Raspberry Pi Setup

  1. Flash Raspberry Pi OS to SSD
  2. Install Node.js:
    curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
    sudo apt-get install -y nodejs
  3. Configure as system service:
    sudo cp systemd/inventory.service /etc/systemd/system/
    sudo systemctl enable inventory.service

Testing

Test Suite

npm test

Coverage

  • Unit Tests: 85%
  • Integration Tests: 70%
  • UI Tests: 60%

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors