All notable changes to Masaar CRM will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- WhatsApp Receiver — Receive and read incoming WhatsApp messages via Meta webhook
- Sales Pipeline — Single Kanban board with drag-drop stage management (dnd-kit)
- AI Summarize — Manual "Summarize" button powered by Ollama (local LLM, data never leaves server)
- Deals Management — Deal list, stage tracking, linked to leads
- VAT Invoicing — Invoice generator with 5% UAE VAT; sequential
INV-YYYY-NNNNnumbering; draft → sent → paid workflow - Notifications — Personal real-time notifications via WebSocket (
/ws/notifications) - Keyword Search — Search contacts by name, phone, email
- Contact Management — Unified contact profiles linked to WhatsApp threads
- Audit Log — Immutable activity log for PDPL compliance
- RTL / LTR — Full Arabic interface; Cairo font for AR, Inter for EN; logical CSS properties
- RBAC — Role-based access control (admin / agent / viewer) enforced on all write routes
- Rate Limiting — 300 req/min on WhatsApp webhook; 10 req/min on login
- OpenAPI / Swagger UI — Auto-generated spec at
/docs,docs/swagger.yamlcommitted to repo - Self-hosted — Full stack via
docker compose up(Next.js + Go + PostgreSQL + Redis + Ollama)
- Go 1.22 + Fiber v2
- Next.js 14 + Tailwind CSS (App Router, TypeScript)
- PostgreSQL 16 + pgvector
- Ollama (llama3 / mistral)
- WebSockets (native Fiber)
- Redis (refresh tokens + blacklist)
- goose v3 (SQL migrations)
- Added comprehensive expense management system
expense_categoriestable with type enum (maintenance, utilities, insurance, repairs, staff, cleaning, other)expensestable with full expense lifecycle (amount, date, vendor, payment status, receipt tracking)expense_approvalstable for approval workflow- 8 API endpoints: category management, expense CRUD, approval workflow
- Role-based access: Admin full access, Agent create/update
- Real-time notifications on approval/rejection
- Added inspection and maintenance management system
inspection_templatestable with reusable checklistsinspectionstable with status tracking, findings, severity levels, photosmaintenance_taskstable with priority, contractor tracking, cost estimationmaintenance_photostable for before/during/after documentation- 16 API endpoints for inspection and maintenance workflows
- Frontend pages:
/inspections,/maintenancewith list, filter, detail views - Features: Priority-based sorting, status tracking, photo gallery
- Added comprehensive analytics system
- Company-wide KPIs: occupancy rate, revenue, collection rate
- Property-level metrics: revenue, NOI, maintenance needs
- Tenant performance metrics: risk scoring based on payment history, disputes, tenure
- Financial analytics: revenue trends, expense breakdown, profit margins
- Maintenance metrics: task completion rates, response times
- 7 API endpoints under
/api/v1/analytics/ - Frontend analytics pages:
/analytics/overview- KPI dashboard/analytics/properties- Property performance/analytics/tenants- Risk scoring/analytics/financial- Revenue analysis
- Features: Real-time calculations, bilingual labels, color-coded risk scores
- Added automated lease renewal workflow system
lease_renewal_workflowstable with status tracking, proposed terms, counter-offersrenewal_communication_templatestable for email/WhatsApp templates (bilingual)renewal_communication_logtable for audit trail- 9 API endpoints: initiate, propose, send-offer, accept, reject, counter-offer, templates
- Features: Automated renewal tracking, communication history, tenant responses
- Role-based access: Admin initiates, Agent/Admin manage workflow
- Added database schema (Migration 00027):
commission_structurestable (fixed/percentage/tiered types)agent_commissionstable (monthly tracking)commission_transactionstable (individual entries)- Domain models and enums ready for handler implementation
- Added database schema (Migration 00028):
document_templatestable (lease, offer, inspection, waiver, custom)documentstable with signature status and audit traildocument_signaturestable with IP/user-agent loggingdocument_audit_logtable for compliance- Data classification: public, internal, confidential
- Ready for e-signature integration (DocuSign framework)
- Added custom fields system (Migration 00029):
- Entity-specific custom metadata support
- Dynamic field storage and validation
- Added bulk operations framework (Migration 00030):
- CSV import/export job tracking
- Error logging and data validation
- Dry-run mode support
- Total migrations: 30 (up from previous)
- New tables: 35+ across all phases
- Total API endpoints: 100+ with consistent response format
- All endpoints include role-based access control
- Full audit trails for sensitive operations
- None. All changes are backward-compatible.
- DocuSign e-signature not yet implemented (framework ready)
- Commission calculation engine pending implementation
- Bulk import/export job processing pending
- Analytics caching in Redis not yet implemented
- Root cause:
uuid.Parse(str)returns(uuid.UUID, error)but all 14 call-sites across 5 files captured only one return value, preventing the entire binary from compiling. - Files fixed:
document.go,expense.go,inspection.go,lease_renewal.go,maintenance.go - Fix: All occurrences changed to
id, _ := uuid.Parse(...)orfield, _ = uuid.Parse(...). - Impact: Documents, Expenses, Inspections, Lease Renewals, and Maintenance were completely non-functional.
- See: Development Notes — uuid.Parse Pattern in CLAUDE.md
- Full CRUD frontend page for WhatsApp message templates (backend was already complete)
- Table view: Name, Category, Variables, Active status
- Create/Edit modal with
{{1}}{{2}}variable placeholder syntax, active toggle - Click-to-preview panel renders a WhatsApp-style bubble with variables substituted
- Sidebar: added under Inbox in CRM section
- Standalone page listing all sent emails across all entities
- Status filter chips: All / Sent / Failed / Bounced / Pending
- Click-to-detail panel: full body, error message if failed, timestamps
- New backend:
EmailRepository.ListAll(ctx, page, limit)+GET /api/v1/emails - Sidebar: added in CRM section
- List page: summary cards (Subtotal / VAT (5%) / Total), status filter, inline PDF link
- Detail page: line-item breakdown, status action buttons (Mark Sent / Mark Paid), link to deal
- New backend:
InvoiceRepo.ListAll(ctx, page, limit)+GET /api/v1/invoices - Sidebar: added in CRM section
- "🤖 AI" button beside the lead score badge; visible to Agent/Admin when contact has leads
- Calls Ollama LLM, parses
{"score": int, "reasoning": "..."}response - Persists score back to
contacts.lead_scoreimmediately; updates display live - Shows AI reasoning text inline below the badge
- New backend:
ContactRepo.UpdateScore(ctx, id, score)+POST /api/v1/ai/score-contact/:id - Note: Pipeline page already had AI scoring — this completes the contact detail page
- Card-grid CRUD page (Admin only) for renewal communication templates
- Card shows: template name, language badge, email subject preview, WhatsApp message excerpt
- Create/Edit modal with Email / WhatsApp tab switcher; supports bilingual templates
- New backend:
RenewalTemplateRepo.Update+RenewalTemplateRepo.Delete+PATCH /renewal-templates/:id+DELETE /renewal-templates/:id - Sidebar: added in Properties section (admin only)
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/invoices |
List all invoices, paginated |
GET |
/api/v1/emails |
List all email history, paginated |
POST |
/api/v1/ai/score-contact/:id |
AI-score a contact via their latest lead; persists score |
PATCH |
/api/v1/renewal-templates/:id |
Update renewal template |
DELETE |
/api/v1/renewal-templates/:id |
Delete renewal template |
| Route | Notes |
|---|---|
/message-templates |
Full CRUD, Agent + Admin |
/email-history |
Read-only log, Agent + Admin |
/invoices |
List with summary cards |
/invoices/[id] |
Detail + status actions + PDF download |
/renewal-templates |
Full CRUD, Admin only |
All gaps below were found during a systematic audit and either fixed or documented:
| # | Gap | Severity | Resolution |
|---|---|---|---|
| 1 | uuid.Parse single-value assignment in 5 handler files — backend won't compile |
Critical | Fixed in this release |
| 2 | GET /api/v1/invoices missing — no standalone invoices list page possible |
High | Fixed in this release |
| 3 | GET /api/v1/emails missing — email history page not possible |
High | Fixed in this release |
| 4 | AI scoring only covered leads, not contact detail page | High | Fixed in this release |
| 5 | RenewalTemplateRepo missing Update + Delete |
Medium | Fixed in this release |
| 6 | Message Templates page entirely missing (backend was done) | Medium | Fixed in this release |
| 7 | ai.go missing "log" import |
Medium | Fixed in this release |
- Company onboarding workflow
- Subscription management
- Usage analytics and billing
- Tenant isolation at API and database level
- DocuSign e-signature
- Stripe/PayPal payment processing
- Accounting software integrations
- SMS gateway expansion
- Automated lease renewal workflows
- Predictive tenant risk scoring
- Expense categorization via ML
- Document OCR and extraction
For self-hosters: Always check the changelog before upgrading. Breaking changes will be marked with