Skip to content

Repository files navigation

🛡️ API Shield

A production-ready Express middleware toolkit for securing, monitoring, and protecting REST APIs.

API Shield is an open-source middleware framework for Express.js that helps developers secure, monitor, and manage their APIs with minimal configuration.

Instead of installing and configuring multiple security libraries individually, API Shield provides a unified and extensible solution that combines essential security features into a single package.


✨ Features

Current Features

  • ✅ Rate Limiting
  • ✅ Security Headers
  • ✅ Request Logging
  • ✅ IP Blocking

Upcoming Features

  • 🚧 JWT Authentication Middleware
  • 🚧 Brute Force Protection
  • 🚧 API Analytics
  • 🚧 Request Validation
  • 🚧 Performance Monitoring
  • 🚧 Redis Store Support
  • 🚧 Custom Security Rules
  • 🚧 Plugin Architecture
  • 🚧 Dashboard & Metrics
  • 🚧 Event Hooks

🚀 Installation

npm install api-shield

or

yarn add api-shield

📦 Basic Usage

import express from "express";
import apiShield from "api-shield";

const app = express();

app.use(
  apiShield({
    rateLimit: true,
    requestLogger: true,
    securityHeaders: true,
    blockedIPs: ["192.168.1.100"]
  })
);

app.listen(3000);

⚙️ Configuration

apiShield({
    rateLimit: true,
    requestLogger: true,
    securityHeaders: true,
    blockedIPs: [],
});
Option Type Default Description
rateLimit boolean false Enables rate limiting
requestLogger boolean false Logs incoming requests
securityHeaders boolean false Adds common security headers
blockedIPs string[] [] Blocks incoming requests from specified IP addresses

🏗️ Roadmap

  • Package Initialization
  • Rate Limiter
  • Security Headers
  • Request Logger
  • IP Blocking
  • JWT Middleware
  • Brute Force Protection
  • Redis Adapter
  • Plugin System
  • Metrics Dashboard
  • Performance Monitoring
  • Comprehensive Test Suite
  • GitHub Actions
  • npm Publish (v1.0.0)

🎯 Vision

API Shield aims to become a modular security framework for Express.js by providing production-ready middleware that is lightweight, extensible, and easy to integrate.


🛠 Tech Stack

  • Node.js
  • Express.js
  • TypeScript
  • Jest
  • GitHub Actions

🤝 Contributing

Contributions are welcome!

If you'd like to improve API Shield, feel free to:

  • Fork the repository
  • Create a feature branch
  • Commit your changes
  • Open a Pull Request

📄 License

This project is licensed under the MIT License.


⭐ Support

If you find this project useful:

  • ⭐ Star the repository
  • 🐞 Report bugs
  • 💡 Suggest new features
  • 🤝 Contribute to the project

Made with ❤️ by Saurabh Pande

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages