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

@kevin_jivani/agriculture-portal

v1.0.1

Published

Agriculture Portal for precision farming and crop monitoring

Downloads

11

Readme

Agriculture Portal

Project Description

The Agriculture Portal is a TypeScript project designed to monitor and manage crop health, irrigation systems, and other aspects of precision farming using IoT-driven sensors and automation. It consists of several modules, including Sensor Management, Crop Monitoring, and Precision Irrigation, with test cases provided for each module.

Prerequisites

Make sure you have the following installed:

  • Node.js: Download and install Node.js.
  • TypeScript: Install TypeScript globally using npm:
    npm install -g typescript
    

Project Setup

  1. Clone the Repository First, clone the repository to your local machine:
git clone https://github.com/kevinjivani/agriculture-portal.git
cd agriculture-portal
  1. Install Dependencies If the project has any external dependencies (listed in package.json), install them:
npm install
  1. Initialize TypeScript Configuration If there's no tsconfig.json file, create it by running the following command:
tsc --init

This will generate a basic tsconfig.json file for TypeScript compilation settings.

Compiling TypeScript Files

To compile the TypeScript files into JavaScript, run the following command:

tsc

This will generate JavaScript files from your TypeScript source files into a specified directory (e.g., dist/).

Running the Application

After compiling the TypeScript files, you can run the JavaScript output using Node.js:

node main.js

Alternatively, you can run the TypeScript files directly using ts-node without having to compile:

ts-node src/main.ts

Running Test Cases The project includes test cases for each module, located in the tests/ directory. Compile the tests:

tsc

Run the test cases: After compiling, run the test cases for individual modules:

node tests/sensor.test.js
node tests/cropMonitor.test.js
node tests/precisionIrrigation.test.js

Or, if using ts-node, directly run the TypeScript test files:

ts-node tests/sensor.test.ts
ts-node tests/cropMonitor.test.ts
ts-node tests/precisionIrrigation.test.ts

Expected Output

Sensor Moisture: 50
Crop health is good!
Irrigation ON: Soil moisture is low.

To run all the tests:

npm test

GitHub CLI Setup

To use GitHub CLI, after installation, run the following command to authenticate with your GitHub account:

gh auth login

GitHub Actions Setup

  1. Create the Workflow Directory: In your repository, create a .github/workflows directory in the root of your project.

  2. Create a Workflow File: Inside the .github/workflows directory, create a workflow YAML file

git add .github/workflows/ci.yml
git commit -m "Add GitHub Actions workflow for CI"
git push origin main

I have three yml files:

1). ci.yml 2). newci.yml 3). test.yml

Screenshots of Workflow Logs and Console Output

GitHub Actions Workflow Logs Jest Test Running

License

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