mail2couch/examples/simple-mail-document.json
Ole-Morten Duesund 651d95e98b docs: add comprehensive CouchDB schema documentation for cross-implementation compatibility
- Add complete CouchDB document schema specifications in couchdb-schemas.md
- Create example JSON documents for mail and sync metadata structures
- Implement Rust schema definitions with full serde support and type safety
- Add validation script to ensure schema consistency across implementations
- Document field definitions, data types, and validation rules
- Provide Rust Cargo.toml with appropriate dependencies for future implementation

This establishes a solid foundation for the planned Rust implementation while ensuring
100% compatibility with existing Go implementation databases. Both implementations will
use identical document structures, field names, and database naming conventions.

Schema Features:
- Mail documents with native CouchDB attachment support
- Sync metadata for incremental synchronization
- Predictable document ID patterns for efficient access
- Cross-language type mappings and validation rules
- Example documents for testing and reference

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 15:08:35 +02:00

24 lines
No EOL
816 B
JSON

{
"_id": "Sent_456",
"_rev": "1-xyz789abc123def",
"sourceUid": "456",
"mailbox": "Sent",
"from": ["user@company.com"],
"to": ["client@external.com"],
"subject": "Meeting Follow-up",
"date": "2025-08-02T10:30:00Z",
"body": "Thank you for the productive meeting today. As discussed, I'll send the proposal by end of week.\n\nBest regards,\nUser Name",
"headers": {
"Content-Type": ["text/plain; charset=utf-8"],
"Content-Transfer-Encoding": ["7bit"],
"Date": ["Sat, 02 Aug 2025 12:30:00 +0200"],
"From": ["user@company.com"],
"To": ["client@external.com"],
"Subject": ["Meeting Follow-up"],
"Message-ID": ["<sent456.789@company.com>"],
"MIME-Version": ["1.0"]
},
"storedAt": "2025-08-02T12:30:45.123456789+02:00",
"docType": "mail",
"hasAttachments": false
}