
Complete Corporate Platform
Rafael Constructions – Digital Construction Infrastructure
Technical Architecture
Data Integrity & Security
Scalability
Problem
The developer had no central system for inquiries, project status, documents or client communication. Leads were lost in inboxes, status updates happened over the phone, and documents were scattered across folders and WhatsApp chats.
Baseline
Static website without backend, manual quoting in Word/PDF, no structured customer database, no measurable conversion funnel, no audit trail on contract changes.
Architecture
Tech stack
Solution
Conversion-focused public site with structured inquiry form, multi-step lead qualification and data enrichment before submission.
Edge functions for email delivery, PDF generation, GDPR-compliant unsubscribe and signed storage URLs. Stateless, idempotent, structured logs.
Normalized tables for leads, projects, quotes, contracts, documents, audit logs. Row-Level Security separates roles (public, customer, admin) at the DB layer.
Authenticated area for project progress, milestones, document download and direct messaging. Eliminates email ping-pong.
Automation flows
APIs & integrations
| Service | Purpose | Method |
|---|---|---|
| Resend / SMTP | Transactional and marketing email | REST |
| Storage Buckets | Plans, PDFs, signed URLs | S3-kompatibel |
| Gemini 2.5 | Lead classification and reply suggestions | REST + structured output |
| Cron Scheduler | Reminders, reports, cleanups | Edge Cron |
Data flow
Public form → edge function (validate + enrich) → Postgres (RLS) → realtime push to admin → email pipeline → tracking → reporting view.Outcomes & targets
Strictly separated between verified measurements, declared targets and qualitative observations. No projections, no estimated numbers.
Measurement pending live operation and analysis.
Outcome
What used to be a static business card became an operational system: inquiries, quotes, contracts, projects, communication and documents run through one central architecture with clear roles, audit trails and automated hand-offs.
Interface view
Real admin and portal views are shown on request under NDA. Anonymised mockups can be added here via CMS.
Technical learnings
Designing Row-Level Security into the data model upfront is cheaper than retrofitting it later.
Idempotent email edge functions prevent duplicate sends on retries — critical for trust.
Per-mutation audit logs (insert/update/delete) are non-negotiable in regulated industries.





