Skip to content

ngxsmk-gatekeeperMiddleware Engine for Angular

Route and HTTP request protection through a composable middleware pattern

ngxsmk-gatekeeper

Quick Start

Install the library:

bash
npm install ngxsmk-gatekeeper

Use in your Angular app:

typescript
import { provideGatekeeper, gatekeeperGuard } from 'ngxsmk-gatekeeper';
import { createAuthMiddleware } from 'ngxsmk-gatekeeper/lib/middlewares';

export const appConfig: ApplicationConfig = {
  providers: [
    provideRouter(routes),
    provideHttpClient(),
    provideGatekeeper({
      middlewares: [createAuthMiddleware()],
      onFail: '/login',
    }),
  ],
};

Protect your routes:

typescript
const routes: Routes = [
  {
    path: 'dashboard',
    component: DashboardComponent,
    canActivate: [gatekeeperGuard],
  },
];

What Problem Does It Solve?

Angular applications often need to protect routes and HTTP requests based on authentication, authorization, feature flags, or other business logic. ngxsmk-gatekeeper provides:

  • ✅ A unified middleware pattern for both route and HTTP protection
  • ✅ Composable middleware functions that can be chained together
  • ✅ A single configuration that applies to both routes and HTTP requests
  • ✅ Support for synchronous, Promise-based, and Observable-based middleware
  • ✅ Built-in middleware examples for common scenarios

Fully Open Source

ngxsmk-gatekeeper is 100% open source and completely free to use. All features are available without any restrictions:

  • ✅ Core Middleware Engine
  • ✅ Route & HTTP Protection
  • ✅ Debug Mode & Benchmarking
  • ✅ Authentication Adapters (Auth0, Firebase, JWT)
  • ✅ Compliance Mode (SOC2, ISO)
  • ✅ License Verification
  • ✅ Plugin Architecture
  • ✅ Angular Schematics
  • ✅ CLI Tool
  • ✅ Visual Builder
  • ✅ Testing Utilities
  • ✅ Template Library
  • ✅ Observability Dashboard
  • ✅ Middleware Marketplace
  • ✅ Showcase Gallery
  • ✅ All features included

Learn more about the plugin architecture →

Released under the MIT License.