Zeny NestJS packages
npm install zeny-nestjs-packagesReusable NestJS building blocks that wrap common infrastructure concerns used across Zeny services. The package exposes cache, database, encryption, file handling, mail delivery, OTP, push notification, queues, throttling, and other utilities through @nestjs-friendly modules and helpers.
``bash`
npm install nestjs-libs
The package ships precompiled JavaScript in dist/ plus TypeScript declarations, so it can be consumed from either JavaScript or TypeScript projects.
`ts
import { CacheModule } from '@nestjs/cache-manager';
import { CacheService, DatabaseModule } from 'nestjs-libs';
@Module({
imports: [
CacheModule.register(),
DatabaseModule.register({
dialect: 'postgres',
database: process.env.DB_NAME,
host: process.env.DB_HOST,
username: process.env.DB_USER,
password: process.env.DB_PASS,
}),
],
providers: [CacheService],
})
export class AppModule {}
`
Modules are designed to plug into an existing NestJS application with minimal configuration. Refer to the exports in src/index.ts for additional services and helpers that can be imported directly.
- Cache – Redis-backed cache module and service helpers under drivers/cache.drivers/database
- Database – Sequelize-based database integration (helpers, repositories, entities) under .drivers/encryption
- Encryption – JWT utilities, password hashing, and Snap signature helpers in .drivers/files
- File management – S3/MinIO drivers, CSV and Excel helpers, and abstractions under .drivers/mail
- Mail – Configurable mail module, processor, and service in .
- OTP & Security – OTP drivers (email, Fazpass), throttling support, reCAPTCHA helpers, and TOTP utilities.
- Queues & Notifications – Bull queue helpers and push notification contracts/services.
- Common utilities – Data transfer objects, interceptors, pipes, exceptions, and helper functions for date/time, randomization, validation, and more.
Each folder under src/ exposes TypeScript types and services that can be imported individually if you prefer not to load entire modules.
- npm run build – Compile the TypeScript sources via tsc into the dist/ directory.npm run test
- – Execute the Jest test suite.
1. Install dependencies with npm install.npm run build
2. Run to compile or npm run test` to execute tests.
3. Open a pull request describing the changes and the affected modules.
ISC © zeny-team