Skip to content

ditto-examples/ditto-cookbook

Repository files navigation

Ditto Cookbook

A collection of example applications and tools demonstrating best practices for building offline-first applications with the Ditto SDK.

Overview

The Ditto Cookbook provides comprehensive examples of how to build real-world applications using Ditto's offline-first synchronization platform. Each example demonstrates proper architecture, testing, and implementation patterns that developers can learn from and adapt to their own projects.

Quick Start

# Clone the repository
git clone https://github.com/getditto/ditto-cookbook.git
cd ditto-cookbook

# Browse examples in apps/ and tools/ directories

Want to contribute? See CONTRIBUTING.md for setup and guidelines.

Available Examples

Applications

Browse the apps/ directory for example applications organized by platform:

  • Flutter: Cross-platform mobile and desktop applications
  • [Future platforms]: Additional platforms coming soon

Each application includes:

  • Complete source code with best practices
  • Architecture documentation
  • Comprehensive tests
  • README with setup instructions

Tools

Browse the tools/ directory for development utilities and helper tools that demonstrate specific Ditto patterns or simplify common tasks.

Learning Resources

Architecture Documentation

How to Use This Repository

For Learning:

  • Study architecture documentation to understand design decisions
  • Review code for implementation patterns
  • Check tests for validation approaches
  • Use as reference when building your own applications

For Development:

  • Follow the patterns demonstrated in examples
  • Adapt examples to your specific use cases
  • Learn Ditto SDK best practices from working code

Testing

Run tests across all applications from the repository root:

./scripts/test-all.sh

This command:

  • Discovers all testable applications automatically
  • Runs tests in parallel for faster execution
  • Stops on first failure (fail-fast behavior)
  • Works with Flutter apps now, extensible to other platforms

For platform-specific testing instructions, see the README in each platform directory (e.g., apps/flutter/README.md).

Documentation

Official Ditto Resources

Platform Documentation

Project Documentation

Contributing

We welcome contributions! To get started:

  1. Read CONTRIBUTING.md for detailed setup and guidelines
  2. Check out CLAUDE.md for development standards
  3. Browse existing examples to understand the patterns
  4. Submit your contribution following the workflow in CONTRIBUTING.md

Quick Contribution Checklist

  • ✅ Follow development guidelines in CLAUDE.md
  • ✅ Write showcase-quality code (clear, documented, educational)
  • ✅ Target 80%+ test coverage
  • ✅ Create/update architecture documentation
  • ✅ Use English for all artifacts
  • ✅ Ensure all checks pass

Support

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Built by the Ditto community to help developers build better offline-first applications.


Explore the examples and start building offline-first applications with Ditto!

About

A collection of practical patterns and examples using the Ditto SDK

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •