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

smart_city_waste_management_app

v1.0.2

Published

Smart City Waste Management Application

Downloads

9

Readme

Smart City Waste Management - CI/CD Pipeline

Project Overview

This project implements a CI/CD pipeline for a TypeScript application related to the Smart City Waste Management System. The pipeline is designed to automate the processes of building, testing, linting, and deploying the application using GitHub Actions, Docker, and Jest.

The main goal of the project is to automate the software development lifecycle (SDLC) to ensure continuous integration and delivery, maintain high code quality, and streamline deployment.

Prerequisites

Before you begin, ensure you have the following tools installed on your machine:

  • Git: For version control.
  • Node.js: For running the application and testing.
  • npm: Node package manager (comes with Node.js).
  • Docker: For containerizing the application.
  • Jest: JavaScript testing framework used for unit testing.
  • GitHub Account: For accessing the repository and managing CI/CD workflows.
  • Docker Hub Account (Optional): For publishing Docker images if needed.

Installation Instructions

  1. Clone the repository: Clone this repository to your local machine using the following command:

    bash git clone https://github.com/your-username/your-repository-name.git cd your-repository-name

Install dependencies: Run the following command to install the project dependencies:

bash npm install

Set up environment variables (if necessary): If your application requires specific environment variables, create a .env file in the root directory and add the necessary variables. For example:

env bash

NODE_ENV=development DATABASE_URL=your-database-url CI/CD Pipeline Configuration The CI/CD pipeline is managed through GitHub Actions. The main workflow file is located at .github/workflows/ci.yml. It automates the following tasks:

Linting: Checks for code style issues using ESLint. TypeScript Compilation: Ensures that the TypeScript code is correctly compiled. Jest Testing: Runs unit tests to validate the functionality of the code. Docker Image Creation: Builds a Docker image for the application. Deployment (Optional): Configured to deploy the containerized application. Pipeline Trigger The pipeline is triggered automatically under the following conditions:

On push to the main branch. On pull request to the main branch. Pipeline Steps The pipeline file (ci.yml) contains the following steps:

Checkout code from the GitHub repository. Install dependencies: Runs npm install to install project dependencies. Linting: Executes eslint to ensure the code follows the defined style guide. TypeScript Compilation: Executes tsc to compile the TypeScript code. Jest Testing: Runs the Jest test suite to ensure the correctness of the application. Docker Image Creation: Builds a Docker image for the application. Docker Integration This project is containerized using Docker. The Docker setup ensures that the application can run in any environment with consistent results.

Dockerfile The Dockerfile in the root of the project contains the instructions to build a Docker image for the application. The steps include:

Using an official Node.js image as the base. Installing dependencies. Copying the source code into the container. Running the application on port 3000. Running the Application with Docker Build the Docker image: To build the Docker image, run the following command:

bash

docker build -t smart-city-waste-management . Run the Docker container: Once the image is built, run the application in a container with:

bash

docker run -p 3000:3000 smart-city-waste-management Access the application: Open your browser and navigate to http://localhost:3000 to access the application.

Jest Testing Jest is used for unit testing the application to ensure that it functions as expected.

Writing Tests Tests are located in the tests/ folder. Each file contains unit tests for specific parts of the application.

Running Tests Locally To run the tests locally, use the following command:

bash

npm test This will execute the Jest test suite and display the results in the terminal.

Git Issues and Code Reviews Git Issues Management Issues are tracked using GitHub Issues. Each issue is linked to a specific commit to ensure traceability. The following steps are followed to manage issues:

Creating Issues: Git Issues are created for bugs, enhancements, or feature requests. Assigning Issues: Issues are assigned to team members for resolution. Linking Commits: Commits related to resolving an issue are linked back to the respective issue using keywords (e.g., "Fixes #123"). Code Reviews Code reviews are performed regularly, and feedback is incorporated into the project. The following process is followed:

Pull Requests (PR): Developers submit pull requests for code review. Review Process: The reviewer checks for code quality, adherence to standards, and test coverage. Feedback Implementation: The developer addresses the feedback, and the code is merged once approved. Troubleshooting Issue: Docker build fails Solution: Ensure that Docker is installed and running. Check the Dockerfile for syntax errors, and ensure that the required dependencies are included in the package.json file.

Issue: Jest tests are failing Solution: Review the test logs for the specific test failures. Make sure all necessary dependencies are installed and up to date. Check for any syntax errors or issues in the code being tested.

Final Report and Analytics The project includes a final report documenting the pipeline setup, issue management, and lessons learned. Additionally, Power BI dashboard analytics are provided to visualize key metrics such as build success rates, test coverage, and deployment frequency.

License This project is licensed under the MIT License.

markdown

Key Sections Explained:

  1. Project Overview: Briefly describes the purpose of the project and the CI/CD process.
  2. Prerequisites: Lists tools required for setup.
  3. Installation Instructions: Step-by-step guide to set up and run the project locally.
  4. CI/CD Pipeline Configuration: Describes the pipeline steps and triggers for automated builds, testing, and deployments.
  5. Docker Integration: Explains how the project is containerized using Docker and how to build and run the Docker container.
  6. Jest Testing: Provides information on running Jest tests locally and writing new tests.
  7. Git Issues and Code Reviews: Outlines how issues are managed and how code reviews are conducted.
  8. Troubleshooting: Provides solutions to common issues related to Docker and Jest.
  9. Final Report and Analytics: Mentions the availability of the final report and Power BI analytics.
  10. License: License information (MIT License is just an example).

This README file provides comprehensive documentation for your project. You can modify any section as per your specific implementation details.