Production-ready ServerCN components for building scalable backends. Here you can find all the components available in the library. We are working on adding more components.
A lightweight, production-ready error handling utility for Express applications.
A standardized, type-safe API response wrapper for Express applications.
The Async Handler component is a foundational Express utility that ensures all errors thrown inside asynchronous route handlers are reliably captured and forwarded to Express’s global error middleware.
Auth Verification Middleware protects private routes by validating user authentication using JWT access tokens and refresh tokens.
The Send Email component provides a standardized way to send emails in ServerCN using nodemailer as the email service provider.
The File Upload component provides a standardized way to handle file uploads in ServerCN using Cloudinary as the storage provider.
Cryptographically secure utility functions for generating OTPs, random tokens, and unique identifiers for authentication workflows.
The GitHub OAuth component provides a standardized way to handle GitHub OAuth authentication in ServerCN.
Centralized error handling for Express applications using TypeScript.
Google OAuth
The Graceful Shutdown Handler ensures that your ServerCN application terminates safely and predictably when the process receives shutdown signals (e.g. SIGTERM, SIGINT).
Production-ready health check endpoints for monitoring API status, database connectivity, and system health in Express applications.
Centralized, type-safe HTTP status codes for consistent API responses.
JWT Utils Function for JSON Web Token authentication with access & refresh token support for Express
The Not Found Handler component provides a standardized way to handle not found routes in ServerCN.
The Password Hashing component provides a standardized way to hash passwords in ServerCN using bcryptjs, argon2, pbkdf2, scrypt.
The Rate Limiter component provides a standardized way to handle rate limiting in ServerCN.
The Request Validator(Zod) middleware provides a type-safe and declarative way to validate incoming HTTP requests in ServerCN using Zod.
The Role Based Access Control component provides a standardized way to handle role based access control in ServerCN.
The Security Headers component provides a standardized way to handle security headers in ServerCN.
The SMS Service component provides a standardized way to handle SMS notifications in ServerCN.
Structured and configurable logging for Node.js applications using Winston or Pino.
The Validate ObjectId Middleware component provides a standardized way to validate MongoDB ObjectIds in ServerCN.
Version: 1.0.0 | Total components: 23 | Stable components: 19