Skip to main content

Sync Fields

Sync fields determine which data from your models is synchronized to clients. Proper field selection is crucial for performance, security, and user experience.

Field Selection Strategies

1. Essential Fields Only

Start with the minimum required fields and add more as needed:

2. Progressive Field Selection

Add fields based on feature requirements:

3. Role-Based Field Selection

Sync different fields based on user permissions:

Relationship-Based Fields

Include different fields based on model relationships:

Performance Optimization

Field Size Considerations

Be mindful of field sizes to optimize sync performance:

Security Best Practices

Field Whitelisting

Always use explicit whitelisting rather than blacklisting:

Sensitive Data Handling

Never sync sensitive information:

Field Validation

Testing Sync Fields

Unit Tests

Test your sync field configuration:

Next Steps

Apply Sync Filters

Control which records are synchronized to each user

Write Actions

Set up server-side write operations and validation

Frontend Integration

Use synchronized fields in your React components

Getting Started

Get up and running with Chorus in your Laravel project.

You now understand how to effectively configure sync fields for optimal performance and security. Next, learn how to apply sync filters to control which records each user receives.