A way to identify and keep track of a customer's identity across multiple purchases. - BiteSpeed
- Node.js
- Express.js
- Postgres
- TypeScript
- Using
ThunderClient/Postman
and using the URL:https://identity-reconciliation-api.onrender.com/
-
Clone the repository:
git clone https://github.com/GauthamSree/Identity-Reconciliation.git cd Identity-Reconciliation
-
Set up your Postgres database and update the
.env
file with your database configuration.TABLE Contact { id Int phoneNumber String? email String? linkedId Int? // the ID of another Contact linked to this one linkPrecedence "secondary"|"primary" // "primary" if its the first Contact in the link createdAt DateTime updatedAt DateTime deletedAt DateTime? } CREATE TABLE Contact ( id SERIAL PRIMARY KEY, phoneNumber VARCHAR(10), email VARCHAR (255), linkedId INT, linkPrecedence VARCHAR (25), createdAt TIMESTAMP NOT NULL, updatedAt TIMESTAMP NOT NULL, deletedAt TIMESTAMP);
-
Build and run the TypeScript code:
npm install npm run dev
- GET
/welcome
- Returns a welcome message.
- POST
/findIdentity
- Accepts JSON data with
email
andphoneNumber
, and returns contact information.
- Accepts JSON data with
src/
- Contains the TypeScript source code.src/models/
- Contains the data models.src/routes/
- Contains the API routes.src/services/
- Contains the business logic.src/db.js
- Configuration for connecting to the database.package.json
- Project configuration and dependencies.tsconfig.json
- TypeScript compiler configuration.
Contributions are welcome! Please create an issue or pull request for any improvements or bug fixes.