A demonstration of Uber's H3 for performant queries in a Gig Economy job/provider matching system.
- 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.
- Frontend: React with TanStack Router and TanStack Query
- Backend: Express with Drizzle ORM
- Database: Postgres with PostGIS and H3
- 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)
Install packages
pnpm installStart Postgres. The database should automatically migrate via ./packages/api/src/db/migrations/20260110152951_strange_george_stacy/migration.sql.
docker compose up -dSeed the database with 10M jobs and 1M providers. This will take some time.
pnpm db:seedStart 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- create-t3-turbo, the template used by this monorepo