Skip to content

A secure service that automatically generates and sends digital receipts to users after a transaction. It allows recipients to easily download their receipts via email links, while giving businesses a simple way to manage and deliver proof of payments.

License

Notifications You must be signed in to change notification settings

geraldAp/receipt-api

Repository files navigation

📄 Quick

A secure and efficient microservice that handles the generation, delivery, and management of digital receipts.

🚀 Features

  • 📧 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

🛠 Tech Stack

  • 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

🧱 Microservice Structure

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.

🧪 In Progress

  • 🔑 API key-based access control
  • 🧵 Decoupled auth & permissions service

📬 Usage

  1. Send transaction data to the /generate endpoint
  2. The service generates a receipt PDF and emails it to the user
  3. The user receives a signed download link (valid for a limited time)
  4. 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 🙌


📎 License

MIT

About

A secure service that automatically generates and sends digital receipts to users after a transaction. It allows recipients to easily download their receipts via email links, while giving businesses a simple way to manage and deliver proof of payments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •