NestJS Mailable Core Documentation
This directory contains the comprehensive documentation for NestJS Mailable Core, built with Docusaurus.
📚 Documentation Structure
Core Documentation
- Introduction - Getting started, features overview, and quick start guide
- Configuration - Module setup, transport providers, environment variables
- Mailable Classes - Creating reusable email templates with object-oriented patterns
- Testing - MailFake utilities, unit testing, integration testing
- Templates - Handlebars, EJS, Pug, MJML, and Markdown template engines
- Advanced Features - Queues, monitoring, performance optimization, security
- API Reference - Complete API documentation for all classes and interfaces
Features Covered
🚀 Core Features
- ✅ Multiple transport support (SMTP, SES, Mailgun)
- ✅ Mailable classes with fluent API
- ✅ Template engine integration
- ✅ Queue-based email processing
- ✅ Comprehensive testing utilities
- ✅ Error handling and monitoring
🛠️ Development
Prerequisites
- Node.js 18.0 or higher
- npm or yarn
Running the Documentation Site
- Install dependencies:
- Start development server:
This command starts a local development server and opens up a browser window at http://localhost:3000
.
- Build for production:
This command generates static content into the build
directory.
- Serve production build:
🚢 Deployment
GitHub Pages Deployment
Using SSH:
USE_SSH=true npm run deploy
Not using SSH:
GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command builds the website and pushes to the gh-pages
branch.
📝 Contributing to Documentation
Adding New Documentation
- Create a new markdown file in the
docs/
directory
- Add frontmatter with sidebar position
- Update
sidebars.ts
to include your new page
- Test locally with
npm start
Documentation Standards
- Clear and concise - Explain concepts simply
- Example-driven - Include code examples for all features
- TypeScript-first - All examples use TypeScript
- Tested code - Ensure all examples actually work
This creates comprehensive documentation covering all aspects of the NestJS Mailer Core package with practical examples, best practices, and complete API reference.