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 Background Jobs component provides a standardized way to schedule recurring tasks and background jobs in ServerCN using node-cron.
The Send Email component provides a standardized way to send emails in ServerCN using nodemailer as the email service provider.
A type-safe environment variable configuration using Zod and Dotenv for Express applications.
The File Upload component provides a standardized way to handle file uploads in ServerCN using Cloudinary as the storage provider.
The File Upload component provides a standardized way to handle file uploads in ServerCN using ImageKit as the storage provider.
The GitHub & Google OAuth component provides a standardized way to handle GitHub & Google OAuth authentication in ServerCN.
The GitHub OAuth component provides a standardized way to handle GitHub OAuth authentication in ServerCN.
Centralized error handling for Express applications using TypeScript.
The Google OAuth component provides a standardized way to handle Google OAuth authentication in ServerCN.
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 Utilities 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.
Structured and configurable logging for Node.js applications using Winston or Pino.
Automated OpenAPI documentation and interactive UI for Express APIs using Swagger.
Cryptographically secure utility functions for generating OTPs, random tokens, and unique identifiers for authentication workflows.
The Validate ObjectId Middleware component provides a standardized way to validate MongoDB ObjectIds in ServerCN.
Total components: 27 | Stable components: 27