Skip to content

mattddean/jobs-and-providers

Repository files navigation

Jobs and Providers

A demonstration of Uber's H3 for performant queries in a Gig Economy job/provider matching system.

Performance Optimizations

  • Uses H3 indexes to avoid computing provider/job distances for providers that are prohibitively far from the job site.
  • Maintains provider ratings in a materialized view that can updated with a cron job according to staleness requirements.

Tested locally at 1M Providers, 10M Jobs.

Tech Stack

  • Frontend: React with TanStack Router and TanStack Query
  • Backend: Express with Drizzle ORM
  • Database: Postgres with PostGIS and H3

Running the Project

Required Software

  • nodejs (tested with version 22.21.0)
  • pnpm (tested with version 10.19.0)
  • docker (tested with version 27.3.1 and docker compose plugin)

Getting Started

Install packages

pnpm install

Start Postgres. The database should automatically migrate via ./packages/api/src/db/migrations/20260110152951_strange_george_stacy/migration.sql.

docker compose up -d

Seed the database with 10M jobs and 1M providers. This will take some time.

pnpm db:seed

Start the app. When you've run pnpm dev from the root of the repo, both the Express app and the React app should start. The React app will listen on port 3090 and the Express app will listen on port 3091.

pnpm dev

Resources

About

A demonstration of Uber's H3 for performant queries in a Gig Economy job/provider matching system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors