Design an address-book API: contacts have names, emails, phones, and labels. Users manage only their own contacts with deduplication hints, merge, and export. Support basic sync semantics for mobile clients.
Functional requirements
- CRUD contacts with multiple emails and phones
- Tag or group contacts (family, work)
- Detect possible duplicates and merge records
- Incremental sync with updated_since cursor (optional)
Non-functional requirements
- Strong privacy and isolation per account
- Consistent indexing for fast lookup by name or email
- Soft delete and undo window for mistaken deletes