HN Who's Hiring πŸ‘”+ AWS Lambda 🚒 + Next.js πŸ’» + Material UI πŸ’…
Branch: master
Clone or download
gadogado Merge pull request #6 from 0x70b1a5/master
open all links in new tab to avoid losing app state
Latest commit 3bcfbb3 Feb 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
components remove extraneous space Feb 10, 2019
lib Fixes firebase itemId for whoshiring user Jan 13, 2019
pages Adds loader for fuse search Jan 14, 2019
.gitignore Removes .next build Jul 15, 2018
.npmignore Adds npmignore for claudiajs unpack Jul 21, 2018
.nvmrc Adding hn hired Jul 12, 2018
.travis.yml Fixes travis config Jul 15, 2018
LICENSE Adding hn hired Jul 12, 2018 Update Jan 22, 2019
lambda.js Adding hn hired Jul 12, 2018
next.config.js Adding hn hired Jul 12, 2018
package-lock.json Adding hn hired Jul 12, 2018
package.json Upgrades react-dom Jan 13, 2019
server.js Adds auto item discovery via firebase Jul 15, 2018
yarn.lock Upgrades react-dom Jan 13, 2019

Hn Hired

Build Status Maintainability

Serverless + Searchable HN Who's Hiring Posts


  • HN Hired grabs the latest HN who's hiring post and presents everything with a searchable material ui experience.
  • The app utilizes Next.js to run serverless via AWS Lambda; both the client and server exist within a function which eases cross-origin opaque resource retrieval restrictions.
  • A manually curated list of trends are matched with a cursory regexp to give a loose ranking in the left sidebar.
  • Fuse.js provides very fast client fuzzy searching for anything in the comments.
  • Material UI components enrich the presentation with autocomplete, search chips, and a simple responsive layout.


  1. Clone this repo and run yarn to install the project dependencies.
  2. Run yarn dev to start the local server and visit http://localhost:3000 to run the app.
  3. If you're unfamiliar with Next.js the file system is the main API. Anything within pages/ ends up having a corresponding route. With this application there is a single file, index.js, which is the entry point.

Serverless Deployment

Serverless deployment can be tricky but there are some wonderful tools available to bring everything together and make it possible. I opted to use Claudia.js - here's some important steps to make everything happen:

  1. Setup the necessary AWS credentials. See here under Configuring access credentials.
  2. Change your .aws/credentials so that there is a profile for claudia:
$ cat ~/.aws/credentials
aws_access_key_id = abc
aws_secret_access_key = 123
  1. Build the project with yarn build
  2. Create an AWS Lambda function and deploy it:

claudia create --region us-west-1 --handler lambda.handler --deploy-proxy-api --profile claudia --memory 1280

# If there are issues with the path to the bin you can either install claudia as a global package or simply just specify the full path to the respective bin, `node_modules/.bin/claudia`.
  1. Any subsequent deploys should run yarn deploy