Skip to main content
Winnerr’s database is architected for real estate workflows with complete multi-tenant isolation, optimized for performance and scalability. Built with Prisma ORM and PostgreSQL, it ensures data integrity while supporting complex real estate business logic.

Schema Overview

The database centers around four core entities: Organizations, People, Properties, and Deals, with extensive support for communications, AI features, and integrations.

Core Entities

Organization Management

Organization

The root entity for multi-tenant data isolation.

Organization Membership

Junction table linking users to organizations with roles.

Organization Settings

Configuration and preferences for each organization.

User Management

User

Synchronized with Clerk authentication system.

Contact Management

Person

Central entity for all contacts and leads.

Property Management

Property

Real estate listings and property information.

Property Images

Property photos and media management.

Deal Management

Deal

Sales pipeline and transaction tracking.

Communication System

Unified Communication Tracking

Phone System Integration

Twilio Call Records

Call Recordings and Transcriptions

Transcript Segments

Detailed transcript data with speaker diarization.

Task and Activity Management

Tasks

Activity Timeline

Multi-tenant Security

Row-Level Security Policies

Database Indexes

Next Steps

API Architecture

Learn how the API layer interacts with the database

Real-time Features

Understand WebSocket and collaboration features

Performance Optimization

Database optimization and scaling strategies

This database design is optimized for real estate workflows while maintaining flexibility for customization and future feature additions.