This is a Spring Boot RESTful web service that intelligently consolidates user contact information (email & phone number) across multiple inputs using shadow-linking logic and it is easy to test via Postman.
✅ Accepts contact data (email
+ phoneNumber
)
✅ Automatically detects existing entries using email/phone overlaps
✅ Maintains primary and secondary contact relationships
✅ Prevents duplicate records intelligently
✅ Exposes a clean JSON-based /identify
API
Contact {
id: Int
phoneNumber: String?
email: String?
linkedId: Int? // reference to another Contact ID
linkPrecedence: 'primary' | 'secondary'
createdAt: DateTime
updatedAt: DateTime
deletedAt: DateTime?
}
- Java 17+
- Spring Boot
- Spring Data JPA
- MySQL (or any JDBC DB)
- Lombok
- Maven
Prerequisites:
- Java 17+
- Maven
- MySQL (create a DB moonrider)
- URL: POST http://localhost:8080/identify
- Body (raw, JSON):
{
"email": "laxmi@gmail.com",
"phoneNumber": "1234567890"
}
- Contact deduplication
- User identity linking
- CRM backend logic
- Shadow merge logic in ecommerce or social apps
- Continue adding UI features
- Add validation (email format, phone regex)
- Show contact timeline/history
- Export results to PDF
- Deploy to cloud (Render / Railway / Vercel)
Want to enhance this? Fork the repo, add features, and open a pull request!