Labs Olympics: Sunlight 2D
Recently, the Labs broke into teams and spent two days doing projects entirely of our own devising, given free rein. Our team consisted of two developers, a designer, and Sunlight’s prized sysadmin. So for our project, we wanted to do something for the office, that blended software and design with the physical world. Inspired by some recent internal work in inventorying items using QR codes, we thought it’d be fun to make a system that lets Sunlighters print out QR codes for anything they wanted.
What people do with those codes is up to them – document internal events for posterity, lead coworkers on a scavenger hunt, plant jokes, write QR slam poetry, whatever. The design goal here was to make it dirt easy, through their computer’s browser or their mobile phone, for a Sunlighter to print out a QR code with some text and/or a picture attached.
This involved a few layers: a web and mobile frontend for the site, a backend app and database, setting up an actual label printer with dedicated sticker stock, and figuring out how to get the printer and the web app to interoperate. The mobile frontend was important, especially so that if someone is motivated after scanning one to print out their own, they can right away.
We built a Django app running on MongoDB for the backend, and the code for it is on Sunlight’s Github account. The live app is visible only to Sunlighters right now (only over the LAN), until we add better permissioning to prevent the world from using our printer, but you can see a screenshot above.
When a user hits Print, the app creates a new page containing the text and/or photo, and prints out a QR code containing a URL to that page. We don’t store the text or image directly in the QR code, which has the downside of requiring a network connection to see the content – but, the flexibility makes it very worth it. We use the Google Charts API to actually generate the QR codes that get printed out.
For our label printing needs, we went with the LabelWriter 450 Turbo, the high-speed, hassle-free labeling and mailing solution for your busy office. After we got it all set up and figured out the right paper and positioning, it’s been totally reliable. We have it hooked up directly to the box that’s hosting the web app, so printing from the app is as simple as calling out to the system with an “lp” command with the right arguments.
In the end, we managed to finish everything on time, and as a last minute feature, we also made it so other coworkers could append further text and photos to the same QRcode, to make whole threads. Whether this turns into an office tradition or not, making an office QR code generator was a very fun project, and definitely outside of our routine. If you’ve ever thought of doing something similar – just do it!