Generate realistic synthetic data for MOCO test instances.
Creates a complete, plausible company structure with interconnected entities:
- Users (employees + freelancers) with employments
- Companies (customers) with contacts
- Deals/Leads at different pipeline stages
- Offers with line items, linked to deals
- Projects from accepted offers with team assignments
- Time tracking (activities) spread over months
- Project expenses
- Invoices based on logged hours
- Purchases (supplier invoices)
- CAMT.053 bank statements for payment reconciliation
git clone https://github.com/starsong-consulting/moco-synthesizer.git
cd moco-synthesizer
bundle installCreate a .env file with your MOCO credentials:
MOCO_SUBDOMAIN=yourcompany
MOCO_API_KEY=your_api_key_hereGet your API key from MOCO under Profile → API Integration.
# Generate small dataset (default)
bundle exec ruby synthesize_full.rb
# Preview without making API calls
bundle exec ruby synthesize_full.rb --dry-run
# Generate medium or large dataset
bundle exec ruby synthesize_full.rb --scale medium
bundle exec ruby synthesize_full.rb --scale large
# Run specific step only
bundle exec ruby synthesize_full.rb --only users
bundle exec ruby synthesize_full.rb --only projects| Entity | Small | Medium | Large |
|---|---|---|---|
| Employees | 6 | 12 | 25 |
| Freelancers | 2 | 4 | 8 |
| Companies | 10 | 25 | 50 |
| Deals | 15 | 35 | 70 |
| Offers | 12 | 25 | 50 |
| Projects | 8 | 18 | 40 |
| Purchases | 8 | 20 | 40 |
Run individual steps with --only:
users- Employees and freelancers with employmentscompanies- Customer companiescontacts- Contacts for companiesdeal_categories- Pipeline stagesdeals- Leads/opportunitiesoffers- Quotes with line itemsprojects- Projects with tasks and teamactivities- Time entriesexpenses- Project expensesinvoices- Customer invoicespurchases- Supplier invoicescamt- Bank statement XML files
The synthesizer creates interconnected data that flows naturally:
Deal (won) → Offer (accepted) → Project → Activities → Invoice
→ Expenses
→ Planning
Two XML files are generated for import into MOCO's bank reconciliation:
bank_statement_incoming.xml- Customer payments (invoice receipts)bank_statement_outgoing.xml- Supplier payments (purchase disbursements)
Payment references match invoice/purchase identifiers for automatic matching.
- Ruby 3.0+
- MOCO account with API access
- moco-ruby gem 1.2+
AGPL-3.0 - See LICENSE