Behind the app: Chrome Weather Extension
Published on by Eric L. Barnes
Tim Leland has created a new Chrome Extension for getting not only the current weather, but today’s outlook, and a 5-day forecast. The extension automatically calculates your location and viewing the current temperature is as simple glancing at the menu bar. The temperature is always visible and when you click the button it loads the modal window as shown above. It’s simple and intuitive.
The Extension itself uses a Laravel backend and I wanted to find out more how it works. Below is a question and answer session with Tim about the app and how it utilizes Laravel.
What made you decide to create a weather extension for Chrome?
Weather extension was created from my own frustration. I was tired of going to sites like weather.com and having to search through the ads etc. I wanted a quick way to know the current, hourly and 5-day forecast of the weather. I’m also a big fan of DarkSky, one of the top weather apps for iOS and wanted to use their amazing api.
Is this your first Chrome extension?
My first chrome extension was Read Later which was a simple way to save links for reading later, similar to apps like Pocket. It was never very popular, but it solved my issue of emailing myself links.
Can you tell us how it works?
Weather uses the Forecast.io API for its weather data. Their documentation is straightforward and they have very accurate weather data. V1 of my extension was pretty basic. It consisted of html, css and javascript. Once the extension started gaining traction, I decided to rewrite the extension in Laravel so I could do things like caching, user settings, quick updates, and billing for pro features. My goal was to keep the extension code barebone and have all the logic on the server. Building it this way allows me to easily port my extension to other platforms.
What role does Laravel play?
Laravel handles all the backend logic such as calling the forecast.io API, caching, user settings and blade views. When the user checks the weather, they are actually loading an iframe into the extension popup. I’m also using Cashier and Stripe for billing. Cashier is great and makes it easy to work with Stripe.
I really enjoy the developer experience Laravel offers. It allows me to focus on what I’m building and not all the other mundane stuff. I use DigitalOcean for hosting and Forge for server management. I highly recommend Forge for provisioning servers. I had to add an SSL certificate to my server and Forge makes tasks like this so simple.
With almost 8,000 users, it seems like this has been successful. How did you get so many users?
I’ve had several other side projects that I thought were much better ideas, but they never gained traction. Seriously, who needs another way to check the weather? After about a week of the extension being in the chrome web store, Lifehacker published an article featuring my extension. Weather went from about 150 users to over 8,000 users. I’ve done my best to respond to bugs and feature requests as quickly as possible. People all over the world are using the extension which is amazing. I’ve discovered that coding an app is usually easier than getting users and keeping them happy.
Are you planning on creating more extensions in the future?
For now my plans are to continue working on Weather. I do plan on creating a firefox and possibly a mac/windows version of Weather. Since most of the logic is on the server, it shouldn’t be very difficult.
Eric is the creator of Laravel News and has been covering Laravel since 2012.