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

auto-self-healing-nestjs

v0.0.1

Published

A NestJS package for auto self-healing and GitHub sync

Readme

Auto-Self-Healing-NestJS 🚀

NestJS TypeScript License

A cutting-edge NestJS package designed to make your applications smarter, stronger, and self-sustaining.
Say goodbye to manual debugging and hello to automated error detection, self-fixing, performance optimization, and GitHub synchronization—all in one sleek package!


✨ What is Auto-Self-Healing-NestJS?

This is not just a package—it's your app's personal superhero. Built with NestJS, it empowers your projects with:

  • Error Detection & Prediction: Spots issues before they escalate using AI-powered analysis.
  • Self-Fixing: Automatically resolves common problems without human intervention.
  • Performance Monitoring: Keeps your app running at peak efficiency.
  • Security Patching: Stays ahead of vulnerabilities.
  • GitHub Sync: Seamlessly integrates with your repositories for real-time updates.
  • Health Checks: Monitors module health and alerts you to slowdowns.

Whether you're building a small API or a massive enterprise app, this package has your back.


🌟 Features

  • AI-Driven Insights: Analyzes logs and code to predict and prevent errors.
  • GitHub Integration: Syncs with your repos for code updates and audits.
  • Email Notifications: Alerts you when something needs attention.
  • Resource Optimization: Fine-tunes queries and resource usage.
  • Rollback Management: Safely reverts changes if things go south.
  • Scheduled Tasks: Runs health checks and audits on autopilot.
  • Plug-and-Play: Works out of the box with any NestJS project.

🛠 Installation

Get started in minutes:

  1. Install the package:
    npm install auto-self-healing-nestjs
    
  2. Add it to your NestJS app:

import { Module } from '@nestjs/common';
import { AutoSelfHealingModule } from 'auto-self-healing-nestjs';

@Module({
  imports: [AutoSelfHealingModule],
})
export class AppModule {}
  1. Configure your environment (see below).

⚙️ Configuration

This package uses environment variables for flexibility. Create a .env file in your project root and add the following:


# GitHub Integration (Required)
GITHUB_TOKEN=ghp_YourPersonalAccessTokenHere
GITHUB_OWNER=YourGitHubUsername
GITHUB_REPO=YourRepoName

# Email Notifications (Required)
[email protected]

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587 

SMTP_PASS=**************
[email protected]
[email protected]
  1. How to Get a GitHub Token

1.Go to GitHub Settings > Developer Settings > Personal Access Tokens.

2.Generate a new token with repo scope.

3.Copy it into your .env file.

📚 Usage

Once installed and configured, the package kicks in automatically. Here’s how to tap into its power:

Accessing Services You can inject any exported service into your app:

import { Injectable } from '@nestjs/common';
import { GithubSyncService, ModuleHealthCheck } from 'auto-self-healing-nestjs';

@Injectable()
export class MyService {
  constructor(
    private readonly githubSyncService: GithubSyncService,
    private readonly healthCheck: ModuleHealthCheck,
  ) {}

  async checkStatus() {
    const repoData = this.githubSyncService.getRepoData();
    const health = this.healthCheck.getStatus();
    return { repo: repoData?.full_name, health };
  }
}

Example Controller

import { Controller, Get } from '@nestjs/common';
import { MyService } from './my.service';

@Controller('status')
export class MyController {
  constructor(private readonly myService: MyService) {}

  @Get()
  async getStatus() {
    return this.myService.checkStatus();
  }
}

Run your app and hit http://localhost:3000/status to see it in action!

🔍 What Happens Under the Hood?

1.On Startup: Initializes AI analyzers, syncs with GitHub, and starts monitoring.

2.Every 5 Minutes: Runs health checks and logs performance metrics.

3.When Issues Arise: Detects errors, predicts potential failures, and applies fixes or rolls back as needed.

4.Check your logs for real-time updates:

{"level":"info","message":"Synced repo: username-github/auto-self-healing-nestjs (ID: 12345678)","timestamp":"..."}
{"level":"warn","message":"Module health issues detected: Slow response time: 1559ms","timestamp":"..."}

🧪 Testing

Test the package locally:

npm run build  # Build the package
npm install /path/to/auto-self-healing-nestjs  # Install in a test project

🛠 Development

Want to contribute or tweak it? Here’s how:

1.Clone the repo (if public):

git clone https://github.com/ZaraSdt7/auto-self-healing-nestjs.git
cd auto-self-healing-nestjs

2.Install dependencies:

npm install

3.Build and test:

npm run build
npm run test

📦 Dependencies

@nestjs/core, @nestjs/common: Core NestJS framework.

@nestjs/config: Environment variable management.

@nestjs/axios: HTTP requests for GitHub sync.

@nestjs/schedule: Task scheduling.

winston: Powerful logging.

nodemailer: Email notifications.

And more! Check package.json for the full list.

🤝 Contributing

Got ideas? Found a bug? Open an issue or submit a PR—we’d love to hear from you!

👩‍💻 Author

Zahra

Turning chaos into code, one self-healing app at a time.

GitHub

📜 License

This project is currently UNLICENSED. Stay tuned for updates!