emilshr / Identity-Reconciliation-

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identity reconciliation

Job application submission for Bitespeed Backend Task. Assignment link

👉🏾 My resume

Live endpoint

This REST API is deployed to Netlify functions and the database of choice is Postgres (Supabase). Reason for choosing them is that they have generous free tiers.

Identify POST endpoint - https://identity-reconciliation-test.netlify.app/api/identify

Postman collection

To run locally


Requirements

  • Node >16.0 (Should work in 14, although netlify binaries are recommended to be run on 16 and above)
  • Postgres service running (either as a stand-alone process or a docker image)
  • netlify executable installed. This can be installed with npm i -g netlify. The API is deployed as a Netlify function (for demo purposes therefore, you need the netlify binaries to execute the functions). For more information on how the API is hosted and redirected, check out the netlify.toml file

  1. Create a .env file that would contains 2 variables as below
DIRECT_URL="postgresql://<postgres_username>:<postgres_password>@localhost:5432/identity-reconciliation?schema=public"

DATABASE_URL="postgresql://<postgres_username>:<postgres_password>@localhost:5432/identity-reconciliation?schema=public"

Replace the postgres_username with the actual username. Same with the postgres_password param in the url

  1. Run netlify dev. You will receive the localhost run-time to test out the functions. Further testing of the endpoints can be done using Postman or the browser

POST Endpoints

  • /api/seed

This endpoint is to reset the database and seed the json payload that is shown here

Alt text

  • /api/seed-two

This endpoint is to reset the database and seed the json payload that is shown here

Alt text

  • /api/identify

  • /api/order

About

License:Apache License 2.0


Languages

Language:TypeScript 100.0%