Coder Social home page Coder Social logo

awardwiz's Introduction

AwardWiz


AwardWiz searches airlines for award tickets so you can fly like a king, remorse-free. http://awardwiz.com

  • Searches all permutations of origins and destinations (direct flights only for now)
  • See when low-fares are available (X, I, O, etc) vs cash-based fares (for Chase Ultimate Rewards)
  • Searches: aa, aeroplan, alaska, delta, jetblue, southwest and united, along with skiplagged and skyscanner (currently disabled) for points-to-cash estimates
  • Scrapers used to obtain data usually avoid various anti-botting mitigations used by airlines and live tests are run twice-daily to make sure scrapers usually work
  • Know when WiFi and/or lie-flat pods will be available
  • Coming soon Get emailed when award space opens up
  • Coming soon Automatically calculate region-based miles based on published award charts

Architecture

The Typescript React-based frontend calls a Browserless backend to scrape airlines' award search pages with Puppeteer. Backend database for user prefs is Firebase. Vite is used as the dev server (pnpm start), Vitest is used for tests (pnpm test and pnpm test-scrapers). UI framework is Ant Design. The recommended package manager is pnpm.

Source code formatting and acceptable patterns are highly opinionated and enforced via eslint. This is checked as a git commit hook but can also be run with pnpm run check (also checks dependencies, and builds the page).

Running locally

A few environment variables are used to start the server and frontend. These can be listed in a .env.local file:

Required Variables

  • VITE_GOOGLE_CLIENT_ID: A Google client ID with OAuth capabilities (used for identity of users). You can get this from your Firebase Auth instance (Authentication > Sign-in method > Google > Web SDK confirmation > Web client ID)
  • VITE_FIREBASE_CONFIG_JSON: Set to the config information (in JSON format with quoted attribute names) from 'Settings > Project settings > General' and scroll to the bottom and select Config for your web app. The format is: {"apiKey": "...", "authDomain": "...", ...}
  • VITE_SCRAPERS_URL: The URL for awardwiz-scrapers, example: http://127.0.0.1:2222

Optional Variables

  • VITE_USE_FIREBASE_EMULATORS: When running locally, setting this to true will use the default Firebase emulators. Don't forget to start them using firebase emulators:start.
  • VITE_LOKI_LOGGING_URL: The url to log scraper results to ex: https://123456:[email protected]/loki/api/v1/push
  • VITE_LOKI_LOGGING_UID: Customize the loki logging user id when calling logging scraper results (defaults to unknown)
  • VITE_SMTP_CONNECTION_STRING required for sending email notifications (still in progress). This is used when using pnpm run marked-fares-worker. This is a secret and should not be public
  • VITE_FIREBASE_SERVICE_ACCOUNT_JSON: Set to the full service account JSON without line breaks from 'Settings > Project settings > Service accounts' from when you created it. If you create a new one now, note the old one will be immediately disabled. The service account is used by workers. The format is: {"type": "service_account", "project_id": "awardwiz", "private_key_id": "...", ...}. This is a secret and should not be public

You can start a local instance of Browserless using docker-compose up.

awardwiz's People

Contributors

lg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.