A modern monorepo of reusable NestJS packages and utilities for building scalable applications
This monorepo contains a collection of production-ready NestJS packages designed to accelerate your development workflow.
| Package | Version | Description |
|---|---|---|
@softvence/s3 |
0.0.1 |
AWS S3 file upload service with caching and auto-organization |
@softvence/mail |
0.0.1 |
Email service powered by Nodemailer with template support |
π€ @softvence/s3
A powerful NestJS module for uploading files to AWS S3 with built-in features:
- β¨ Single and multiple file uploads
- ποΈ Automatic folder organization by MIME type
- β‘ Built-in caching with hash-based deduplication
- π SHA256 file hashing
- π¦ Full TypeScript support
π§ @softvence/mail
A flexible email service for NestJS applications:
- π¨ Built on Nodemailer
- π¨ Template system with built-in OTP template
- π§ Support for all major email providers (Gmail, SendGrid, SMTP, etc.)
- π¬ Rich email options (attachments, CC, BCC, priority)
- β‘ Optional queue integration
- Node.js: >= 18
- pnpm: >= 9.0.0
- NestJS: >= 11.0.0 (for using the packages)
Install pnpm if you haven't already:
npm install -g pnpmClone the repository:
git clone https://github.com/softvence-agency/softvence.git
cd softvenceInstall dependencies:
pnpm installYou can install any package from this monorepo in your NestJS application:
npm install @softvence/s3
# or
npm install @softvence/mailimport { Module } from "@nestjs/common";
import { S3Module } from "@softvence/s3";
@Module({
imports: [
S3Module.forRoot({
region: "us-east-1",
bucket: "my-bucket",
accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
}),
],
})
export class AppModule {}import { Module } from "@nestjs/common";
import { MailModule } from "@softvence/mail";
@Module({
imports: [
MailModule.forRoot({
transport: {
service: "gmail",
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASSWORD,
},
},
}),
],
})
export class AppModule {}softvence/
βββ apps/ # Applications
βββ packages/ # Shared packages
β βββ s3/ # S3 upload service
β βββ mail/ # Email service
β βββ typescript-config/ # Shared TypeScript configs
βββ package.json # Root package configuration
βββ pnpm-workspace.yaml # pnpm workspace configuration
βββ turbo.json # Turborepo configuration
# Build all packages
pnpm build
# Run development mode
pnpm dev
# Run linting
pnpm lint
# Format code
pnpm format
# Type checking
pnpm check-types
# Publish packages
pnpm publish-packagesBuild all packages in the monorepo:
pnpm buildBuild a specific package:
cd packages/s3
pnpm build# Run tests for all packages
pnpm test
# Run tests for a specific package
cd packages/mail
pnpm testThis project uses:
- pnpm - Fast, disk space efficient package manager
- Turborepo - High-performance build system for monorepos
- Changesets - Version management and changelog generation
- π¦ Code Sharing - Share code between packages easily
- π Atomic Changes - Make changes across multiple packages in a single commit
- π Faster Builds - Turborepo caches and parallelizes builds
- π Consistent Tooling - Shared configuration across all packages
- π Better Collaboration - All packages in one place
Each package has its own comprehensive documentation:
We welcome contributions! Here's how you can help:
-
Create a new directory in
packages/:mkdir packages/my-package cd packages/my-package -
Initialize the package:
pnpm init
-
Add the package to
pnpm-workspace.yaml(already included viapackages/*) -
Follow the existing package structure and conventions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test your changes thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use TypeScript for all packages
- Follow the existing code style
- Run
pnpm formatbefore committing - Ensure
pnpm lintpasses - Add tests for new features
We follow conventional commits:
feat: add new feature
fix: bug fix
docs: documentation changes
chore: maintenance tasks
test: add tests
refactor: code refactoring
This monorepo uses Changesets for version management:
-
Create a changeset:
pnpm changeset
-
Commit the changeset:
git add . git commit -m "chore: add changeset"
-
Publish packages:
pnpm publish-packages
If you encounter issues with pnpm:
# Clear pnpm cache
pnpm store prune
# Reinstall dependencies
rm -rf node_modules
pnpm installIf builds fail:
# Clean build artifacts
pnpm clean
# Rebuild all packages
pnpm buildClear Turborepo cache:
rm -rf .turbo
pnpm buildThis project is licensed under the MIT License - see the LICENSE file for details.
- Sabbir Hossain Shuvo - softvenceomega@gmail.com
- Repository: github.com/softvence-agency/softvence
- Issues: github.com/softvence-agency/softvence/issues
- Discussions: github.com/softvence-agency/softvence/discussions
If you find this project helpful, please consider giving it a β on GitHub!
Made with β€οΈ by the Softvence Team