Skip to content

About

The best way to find your hotels for your vacation

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Staylens

A local-first hotel search companion that calls Hopper through a browser-connected adapter and re-ranks hotels using review confidence, total price, and itinerary fit. image image image

Run locally

pnpm install
pnpm dev

Open http://localhost:3000.

Connect Hopper

No extension is required. Start a search in Staylens and it launches a dedicated local Chrome profile in headless mode, loads the Hopper result page, and captures the first valid lodging request without showing or focusing a browser window. Staylens then follows Hopper's nextPageToken chain from inside that authenticated page until Hopper has no more pages. Results stream into the interface page by page, so the first hotels are usable while the complete crawl continues. The browser closes automatically after completion or failure. It does not depend on scrolling or on how many hotels Hopper's UI renders.

The Settings menu in the header contains the Hopper page budget. One page corresponds to one Hopper inventory request, including the initial request. It defaults to 25 and accepts 1–250; Staylens reports when that chosen limit is reached before Hopper runs out of pages.

The dedicated profile is stored under gitignored data/chrome-profile/. Staylens normalizes prices, Tripadvisor signals, stars, amenities, meal plans, and cancellation flags for local filtering and ranking. It does not persist captured request headers, page-view identifiers, advertising identifiers, or opaque booking tokens.

The result interface paginates the complete ranked set at 25, 50, or 100 hotels per page. Hard filters include price, Tripadvisor score and review count, stars, property type, cancellation/payment conditions, breakfast, and grouped Hopper amenities such as air conditioning, Wi-Fi, parking, pools, fitness, pets, spa, kitchen, laundry, restaurants, and accessibility.

Add trip places and use the map

The destination field searches Hopper’s own destination index. Type at least two characters, then select the correct city, region, or landmark from the labeled suggestions so the hotel query receives Hopper’s matching place identifier.

Use Places you’ll visit directly below the hotel search. Search for a landmark, neighborhood, or station near the selected destination, then choose the exact result using its full address. Each place becomes a numbered chip and map pin; remove it with the × on the chip. Up to five places can be active at once.

Once hotel results load, Map view appears automatically above the paginated list. It plots the full filtered result set, clusters dense hotel markers, and colors individual hotel markers by match score. Click a cluster to reveal its hotels; click an individual hotel for its rank, match score, total price, property details, Tripadvisor rating and review volume, trip distance, and Hopper link. Added trip places also activate the Trip location ranking weight using average straight-line distance.

The map uses MapLibre GL JS with low-volume public OpenStreetMap tiles, and place lookup uses the public Nominatim endpoint with caching and a one-request-per-second limit. Both are free and require no API key. This personal build shows attribution and is intentionally low volume; true walking and transit travel time is still a planned local-routing improvement.

Verify

pnpm test
pnpm build

Data safety

HAR files are one-time development artifacts used to understand Hopper's private request contract; they are not uploaded through the product. HAR files may include cookies and temporary session credentials. Raw captures, data/, and research/har/ are ignored by Git and must never be committed.

The initial capture established the /commerce-api/v1/stays/lodgings request and response schema. Direct HTTP replay requires browser session state, so Staylens performs the query through a locally controlled Chrome window rather than an extension or raw server request.

See PRODUCT_PLAN.md for the product and delivery plan.

About

The best way to find your hotels for your vacation

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages