Ready-made tools for backend developers. Start simple, scale to production.
npm install @rajeev3/smart-api-kitNote: Replace allen with your npm username and SMART-API-KIT with published package name if different.
const api = require('smart-api-kit');
// Response handlers
api.success({ user: 'John' }, 'User created');
api.error('Validation failed', 400);
// Logger
api.logger.info('Server started on port 3000');
// Validators
api.validateEmail('test@example.com'); // true
api.validatePhone('+1234567890'); // trueStandardized API responses.
api.success(data, message = 'Success', code = 200);
api.error(message, code = 500);
// Returns: { success: true/false, data/message, code }Simple leveled logging.
const log = api.logger;
log.info('Info message');
log.error('Error message');
log.warn('Warning message');Basic input validation.
api.validateEmail(email);
api.validatePhone(phone);- Express middleware
- JWT Auth
- Rate limiting
- Request tracking
⭐ Star on GitHub!