- Rename billFwd* to billsNotification* for clarity
- Rename rentDueNotification* to rentNotification* for consistency
- Rename utilBillsProofOfPayment to billsProofOfPayment
- Introduce enums for type safety:
- BillsNotificationStrategy (WhenPayed, WhenAttached)
- BillsNotificationStatus (Scheduled, Sent, Failed)
- RentNotificationStatus (Sent, Failed)
- Replace "pending" status with "scheduled" for better semantics
- Fix function names to proper camelCase
- Fix incorrect import path in web-app/app/lib/format.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove private registry references and SSH key handling from Docker
build process. Images now build locally without registry prefix.
Changes:
- Remove SSH key copying from Dockerfile (no private npm packages)
- Remove registry.ngit.hr references from build and run scripts
- Simplify image tags to local format (no registry prefix)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated all email templates to include locale prefixes (/en/ or /hr/)
in URLs to ensure language consistency when users click email links.
Changes:
- Email validation templates: /email/verify/ → /{locale}/email/verify/
- Rent due templates: /share/rent-due/ → /{locale}/share/rent-due/
- Bills due templates: /share/bills-due/ → /{locale}/share/bills-due/
- Unsubscribe links: /email/unsubscribe/ → /{locale}/email/unsubscribe/
- Base site links in EN templates: / → /en
Benefits:
- Users land on pages in the same language as their email
- Better UX - no manual language switching needed
- Proper i18n implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Created a new /share/rent-due/ page to display rent payment information
separately from utility bills.
Changes:
- Created /share/rent-due/[id]/ page structure with RentViewPage component
- Created ViewRentCard component to display rent amount and payment info
- Added uploadRentProofOfPayment action for tenant proof upload
- Added translation keys for rent-specific labels (en/hr)
- Updated rent email templates to link to /share/rent-due/ instead of /share/bills-due/
- Updated documentation to reflect new URL structure
The rent page displays:
- Rent amount
- IBAN or Revolut payment information with QR/barcode
- Rent proof of payment upload (when enabled)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update email worker to select templates based on BillingLocation.tenantEmailLanguage:
- Change default language from 'en' to 'hr' in emailTemplates.ts
- Pass language parameter (location.tenantEmailLanguage || 'hr') to all loadAndRender calls
- Applies to email validation, rent due, and utility bills notifications
Email templates are now automatically selected based on tenant's language preference,
defaulting to Croatian when not specified.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add Croatian (hr) translations for all email templates:
- email-validation: email verification request
- rent-due: rent payment due notification
- util-bills-due: utility bills notification
All templates maintain same structure and styling as English versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed rent amount handling to use whole currency units throughout the application
instead of storing in cents. This simplifies data entry and aligns with Zod validation
requiring integer values.
Changes:
- Set rent input step to "1" (whole numbers only)
- Remove cents-to-currency conversion (/ 100) when formatting for email
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add TypeScript generic type parameters to MongoDB collection calls and
remove ObjectId conversion workaround.
Changes:
- Added <BillingLocation> type parameter to collection().updateOne() calls
- Simplified _id usage by removing new ObjectId() conversion
- Cleaner code with better type inference
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace . encoding with zero-width space (​) approach to prevent
email clients from auto-linking "rezije.app" in header and body text.
Changed "rezije.app" to "rezije​.​app" which displays normally
but breaks the auto-link detection pattern.
Applied to:
- Header h1 tags in all templates
- Body text mentions in email-validation template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace the period in "rezije.app" header text with HTML entity . to
prevent email clients from automatically converting it into a clickable link.
This change only affects the display text in the h1 header, not the actual
URLs which remain unchanged for proper functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace inline HTML in email notifications with professional HTML templates
for better email client compatibility and consistent branding.
Changes:
- Created emailTemplates.ts utility for loading and rendering templates
- Template caching for performance
- Variable substitution with ${variable} syntax
- Warning logging for unreplaced variables
- Updated sendVerificationRequests to use email-validation template
- Variables: location.tenantName, ownerName, location.name, shareId
- Updated sendRentDueNotifications to use rent-due template
- Fetches user settings for owner name and currency
- Calculates rent due date from yearMonth and rentDueDay
- Formats rent amount (converts cents to display format)
- Variables: location.tenantName, location.name, rentDueDate,
rentAmount, currency, ownerName, shareId
- Updated sendUtilityBillsNotifications to use util-bills-due template
- Calculates total amount from all bills
- Fetches user settings for owner name and currency
- Variables: location.tenantName, location.name, totalAmount,
currency, ownerName, shareId
- Fixed ObjectId type mismatches in MongoDB operations
All emails now feature:
- Responsive 3-column layout
- rezije.app branding with logo
- Professional typography and spacing
- Unsubscribe links
- Email client compatible table-based layouts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update email-worker to use @evidencija-rezija/shared-code for common types
and utilities instead of maintaining duplicate copies.
Changes:
- Add shared-code dependency to package.json
- Update imports in emailSenders.ts to use shared-code
- Remove duplicate db-types.ts and shareChecksum.ts files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update email verification subject line to be more personal and inviting by
including the landlord's name. Also add the property location name to the
email body to provide better context for the recipient.
- Subject changed from "Please verify your e-mail address" to
"{ownerName} has invited you to rezije.app"
- Added location name to email body for clarity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add explicit EU API endpoint configuration for Mailgun client to ensure emails
are sent through the correct regional API server. This is required for accounts
created in the EU region.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Configure nodemon to automatically load environment variables from .env file
using dotenv/config preload. This ensures all environment variables are available
during development without manual loading.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add MongoDB connection module for database access
- Implement Mailgun email service for sending notifications
- Add shareChecksum utility for generating secure share links
- Implement three email sender functions:
- Email verification requests (highest priority)
- Rent due notifications (CET timezone)
- Utility bills due notifications
- Create main email worker with budget-based email sending
- Add environment variables for configuration
- Install dependencies: mongodb, mailgun.js, form-data
- Update package.json description to reflect email worker purpose
- Add .env.example with all required configuration
The worker processes emails in priority order and respects a configurable
budget to prevent overwhelming the mail server. All database operations are
atomic and updates are performed immediately after each email send.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>