Lunch: search no longer to sate your hunger
Having recently moved into the dead center of the Financial District, we at Lab Zero have found ourselves awash with new culinary opportunities. As a social bunch that values the mid-day excursion away from our desks and out of the office setting, we’ve been almost overwhelmed with the amount of lunch options that surround our office. Call it a case of paradox of choice, where we would often end up grabbing a quick bite downstairs since we couldn’t even keep in mind all of the other restaurants out there. I know, life is hard.
Meanwhile, in the working world, I was given the opportunity to brush up on some new (to us) frameworks. Lab Zero is traditionally a Rails dev house, and we mostly have experience with Angular front-ends nowadays, but I decided to throw it all out the window for a bit and experiment with the latest and, well, hippest.
Those few weeks resulted in a neat little app that I call Lunch. It’s got a very simple premise: contribute to a list of nearby lunch places and vote daily on where you’d like to go. It has a map that plots out the restaurants that have been geocoded, and a tagging system for restaurant categorization. You can only vote for each restaurant once every 12 hours, so the app is already set up to go for the next day.
Lunch is written using React Starter Kit, a boilerplate that not only provides you with a simple React skeleton, but also includes Express, Webpack, Babel, BrowserSync, Jest, and a whole bunch of other technologies that I’d never worked with. A bit overpowering for the beginner, especially as it continued to evolve with new features within the first few days of setting my project up, but I quickly found my footing and continued onward.
Not being satisfied with the towering amount of new content to understand, I also tacked on Sequelize, an ORM that’s not quite as easy to understand as Rails’s ActiveRecord/ActiveModel, but functional nevertheless.
I also knew that vanilla React wouldn’t be adequate with the amount of data I’d be passing around, so I chose Redux as a state container for my app. I was especially impressed with this type of data flow model. If only maintaining state were as straightforward with Angular!
React Starter Kit had just recently ditched REST for Facebook’s GraphQL protocol, but I decided it was a step too far and threw all that RESTful stuff back in. I had to have SOME semblance of normalcy. I also familiarized myself with WebSockets, whose messages I use to populate the new state of everyone’s current session, instead of using the REST responses sent to just one person.
As part of our effort to embrace the Container, I began to deploy the app to Docker Cloud for internal use, and now, with the help of CTO Matt and DevOps wizard Dave, it lives on Amazon EC2 Container Service, what with an RDS database, SSL cert; the whole nine yards.
This is the first in-house app that Lab Zero has open-sourced. You should feel free to deploy it for your own organization, as you can limit sign-ins to a specific domain via Google’s OAuth. It’s a simple Node app, so setup is easy-peasy.
At least in the short term, using Lunch internally has remedied our analysis paralysis, given us some laughs with the tagging system (Taco Bell went over about as well as you’d imagine), and best of all, it’s stopped us from having to talk directly to one another about where we want to go! Problem… uh… solved?
Continue the conversation.
Lab Zero is a San Francisco-based product team helping startups and Fortune 100 companies build flexible, modern, and secure solutions.