Is your proposal related to a problem?
Currently, invoices generated and sent from Miru lack any form of authorized signature. Users who want to include a company signature on their invoices have no way to do so within the application. This means invoices appear unsigned and less professional, and users must manually add signatures outside of Miru before sending — which defeats the purpose of automated invoice generation and delivery.
Describe the solution you'd like
Signed Invoice Options — the ability to upload a signature image and conditionally include it on invoices per client.
Company Settings (Invoice Section):
- Add an "Invoice Signature" section under Company Settings where an owner or admin can upload a PNG signature image
- Enforce constraints: PNG format only, max dimensions 300×150 pixels, max file size 500KB
- Show a preview of the current signature with the option to replace or delete it
Per-Client Toggle (Client Edit Screen):
- Add a "Include signature on invoices" toggle on the client edit screen
- Defaults to disabled for all existing and new clients
- Only visible/editable by users with owner or admin roles
Invoice PDF Generation:
- When generating a PDF for a client that has the signature toggle enabled AND the company has a signature uploaded, render the signature image at the bottom of the invoice (below totals, above footer)
- When either condition is not met, generate the PDF normally without any signature
- Handle edge cases gracefully — if the signature file becomes unavailable, generate the PDF without it rather than failing
Authorization:
- Only owner and admin roles can upload/delete signatures or toggle the per-client setting
Testing:
- Comprehensive RSpec coverage across models, controllers, services, and policies
Describe alternatives you've considered
-
Hardcoded signature per company (no per-client toggle): Simpler, but removes flexibility. Some clients may not require or want a signed invoice, so per-client control is preferred.
-
Allow multiple signature images (e.g., per user or per signatory): More flexible but adds significant complexity. A single company-level signature covers the most common use case. Multiple signatures can be added as a future enhancement.
-
Embed signature as part of a custom invoice template: Would require a full template customization system. Overkill for this use case — a dedicated signature upload with a simple toggle is more focused and faster to implement.
-
Accept formats beyond PNG (JPEG, SVG): PNG was chosen because it supports transparency (important for signatures overlaying invoice content) and is universally supported in PDF rendering. SVG introduces security concerns, and JPEG lacks transparency.
Is your proposal related to a problem?
Currently, invoices generated and sent from Miru lack any form of authorized signature. Users who want to include a company signature on their invoices have no way to do so within the application. This means invoices appear unsigned and less professional, and users must manually add signatures outside of Miru before sending — which defeats the purpose of automated invoice generation and delivery.
Describe the solution you'd like
Signed Invoice Options — the ability to upload a signature image and conditionally include it on invoices per client.
Company Settings (Invoice Section):
Per-Client Toggle (Client Edit Screen):
Invoice PDF Generation:
Authorization:
Testing:
Describe alternatives you've considered
Hardcoded signature per company (no per-client toggle): Simpler, but removes flexibility. Some clients may not require or want a signed invoice, so per-client control is preferred.
Allow multiple signature images (e.g., per user or per signatory): More flexible but adds significant complexity. A single company-level signature covers the most common use case. Multiple signatures can be added as a future enhancement.
Embed signature as part of a custom invoice template: Would require a full template customization system. Overkill for this use case — a dedicated signature upload with a simple toggle is more focused and faster to implement.
Accept formats beyond PNG (JPEG, SVG): PNG was chosen because it supports transparency (important for signatures overlaying invoice content) and is universally supported in PDF rendering. SVG introduces security concerns, and JPEG lacks transparency.