{"id":26729111,"url":"https://github.com/friskycodeur/identityreconciliation","last_synced_at":"2025-03-27T22:51:35.699Z","repository":{"id":277135745,"uuid":"931448640","full_name":"friskycodeur/IdentityReconciliation","owner":"friskycodeur","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-12T10:07:54.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T10:49:17.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friskycodeur.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T09:47:16.000Z","updated_at":"2025-02-12T10:07:58.000Z","dependencies_parsed_at":"2025-02-12T10:49:21.036Z","dependency_job_id":"4f66ed7d-59f0-45c2-9003-a2aeb96571ec","html_url":"https://github.com/friskycodeur/IdentityReconciliation","commit_stats":null,"previous_names":["friskycodeur/identityreconciliation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friskycodeur%2FIdentityReconciliation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friskycodeur%2FIdentityReconciliation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friskycodeur%2FIdentityReconciliation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friskycodeur%2FIdentityReconciliation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friskycodeur","download_url":"https://codeload.github.com/friskycodeur/IdentityReconciliation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245937976,"owners_count":20696989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T22:51:35.082Z","updated_at":"2025-03-27T22:51:35.690Z","avatar_url":"https://github.com/friskycodeur.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Identity Reconciliation\n\n---\n\u003c!-- TOC --\u003e\n* [Identity Reconciliation](#identity-reconciliation)\n  * [Overview](#overview)\n  * [Tech Stack](#tech-stack)\n  * [API Documentation](#api-documentation)\n    * [Identify Customer](#identify-customer)\n      * [Endpoint:](#endpoint)\n      * [Request Body (JSON)](#request-body-json)\n      * [Response (200 OK)](#response-200-ok)\n  * [Expected Scenarios \u0026 Corresponding Behaviour](#expected-scenarios--corresponding-behaviour)\n  * [Setup \u0026 Installation](#setup--installation)\n\u003c!-- TOC --\u003e\n\n---\n## Overview\n\nThis is a Spring Boot based API to identify and keep track of a customer's identity across multiple purchases.\n\n---\n## Tech Stack\n- **Backend:** Java (Spring Boot)\n- **Database:** SQL-based in-build database (H2 database)\n- **API Format:** REST (JSON)\n- **Build Tool:** Maven\n\n---\n\n## API Documentation\n\n### Identify Customer\n#### Endpoint:\n`POST /api/identify`\n\n#### Request Body (JSON)\n```json\n{\n    \"email\": \"mcfly@hillvalley.edu\",\n    \"phoneNumber\": \"123456\"\n}\n```\n\n#### Response (200 OK)\n```json\n{\n    \"contact\": {\n        \"primaryContactId\": 1,\n        \"emails\": [\"lorraine@hillvalley.edu\", \"mcfly@hillvalley.edu\"],\n        \"phoneNumbers\": [\"123456\"],\n        \"secondaryContactIds\": [23]\n    }\n}\n```\n---\n## Expected Scenarios \u0026 Corresponding Behaviour\n- If no matching contacts exist, a new primary contact is created.\n- If a match is found, it links contacts together, marking new ones as `secondary`.\n- If an existing primary contact is found, it remains primary.\n\n---\n## Setup \u0026 Installation\n\n1. Clone the Repository\n\n```bash \ngit clone https://github.com/your-username/bitespeed-backend-task.git\ncd bitespeed-backend-task\n```\n\n2. Configure Database\n\nUpdate application.properties with your database credentials:\n```text\nspring.datasource.url=jdbc:mysql://localhost:3306/bitespeed\nspring.datasource.username=root\nspring.datasource.password=yourpassword\nspring.jpa.hibernate.ddl-auto=update\n```\n3. Build \u0026 Run the Project\n\n\n```bash\nmvn clean install\nmvn spring-boot:run\n```\n\nThe API will be available at `http://localhost:8080/api/identify`\n\n--- \n\n## Examples\n\nRequest:\n```json\n{\n    \"email\": \"mcfly@hillvalley.edu\",\n    \"phoneNumber\": \"123456\"\n}\n```\nwill give the following response\n```json\n{\n    \"contact\":{\n        \"primaryContatctId\": 1,\n        \"emails\": [\"lorraine@hillvalley.edu\",\"mcfly@hillvalley.edu\"],\n        \"phoneNumbers\": [\"123456\"],\n        \"secondaryContactIds\": [23]\n    }\n}\n```\n\nDetailed Description : [Bitespeed Backend Task](https://drive.google.com/file/d/1m57CORq21t0T4EObYu2NqSWBVIP4uwxO/view) \n\n📩 Contact\n\nFor any queries, reach out at friskycouder@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriskycodeur%2Fidentityreconciliation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriskycodeur%2Fidentityreconciliation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriskycodeur%2Fidentityreconciliation/lists"}