A secure and efficient microservice that handles the generation, delivery, and management of digital receipts.
- 📧 Automatically sends receipts via email after a transaction
- 🧾 Generates PDF receipts on the fly
- ☁️ Uploads and stores receipts securely using AWS S3
- 🔐 Provides signed download links with built-in expiry
- ⚡️ Uses in-memory caching to optimize performance and reduce redundant operations
- NestJS — Framework for building scalable Node.js backend services
- Prisma — Type-safe ORM for PostgreSQL
- AWS S3 — For storing PDF receipts
- NodeCache — In-memory cache for temporary URL storage
- EJS + HTML to PDF — Dynamic templating for receipt design
This service is part of a planned microservice architecture.
The authentication and API key validation will be handled by a separate auth service, allowing other services (like this one) to remain focused and loosely coupled.
- 🔑 API key-based access control
- 🧵 Decoupled auth & permissions service
- Send transaction data to the
/generate
endpoint - The service generates a receipt PDF and emails it to the user
- The user receives a signed download link (valid for a limited time)
- Link access is cached to reduce AWS usage and boost speed
Note: This repo is a work-in-progress and part of a larger initiative. Contributions, feedback, and stars are welcome 🙌
MIT