Upstate Hacks 2016 Postmortem - MyCart
This is a guest post from one of our community members, Declan Hopkins.
This past October marked the 8th installment of the bi-annual Hack Upstate, a hackathon where developers, designers, and innovators from Upstate New York come together to build some seriously awesome stuff. I attended with my team member and friend, Arthur, and we took home a prize for the best usage of MongoDB, awarded to us by MongoDB’s very own Peter Gravelle.
Our weekend hack was a bit of an experiment with barcode scanning, facial recognition, and how many APIs we could cram into a single project during 24 hours. The end result was MyCart, a smart and simple point of sale solution that allows vendors to use a central database to manage their products and eliminates the need for a cashier and/or cash register.
A vendor logs onto the enterprise screen of the app, scans the products that they wish to have available for sale, and then switches the app back to a consumer mode. In this mode, customers in the shop can take items that they wish to purchase, scan them, and then check out when they are ready. Sounds a lot like a self-checkout station, doesn’t it? Many stores have that.
The innovative portion of the app kicks in after checkout has been completed. The point of sale station (most likely an iPad) snaps a picture of the customer, and then uses facial recognition technology to identify the shopper. This information can then be used to show analytics and statistics on certain purchases, which the vendor can use to improve their business. For example, say that after a business day, you check on your analytics and you find that an item is being purchased primarily by customers in a younger age range. It might be a good idea to move that item in the store so it is grouped with other items being purchased by the same age range, to possibly increase sales. The data can also be used to improve the customer experience.
We used Swift for the iOS app, Python for the backend, and MongoDB for our database, and I think it was a great tech stack to work with. Regardless of some issues getting Python and MongoDB to interface properly, it was really simple to get a database up and running, and fill it with products. Unfortunately, we didn’t get to entirely finish the app.
What Went Right
- Planning. We came up with the idea very quickly after the hackathon began, and even got a room with a whiteboard that allowed us to sketch out details easily.
- Design. Arthur is pretty rad at design, so we were able to make the prototype of the app look nice without losing much time.
- Motivation. I’m a really competitive person, and we were motivated to win. We didn’t want to go home empty handed. This drive helped us stick with the project until the minute our 24 hours were up.
What Went Wrong
- Hardware. We spent hours trying to fix a non-existent bug with the barcode scanning, only to find out that the “bug” was caused because the iPad 2 just has a really bad camera.
- Python, PyMongo, and Flask. These three would have been easier to use if I had any experience with python, but I had to learn python on the fly for this project. I was running into all sorts of errors deserializing MongoDB objects into JSON, but eventually I figured out a hack to make it work properly.
- The demo. During our demo, I accidentally ran the server on the wrong port, and the app just didn’t work at all. Luckily, the folks at Hack Upstate allowed us to do another demo after I let them know that I found the issue.
- Sleep. We worked into the wee hours of the morning on the app, and eventually I started feeling quite sick. I had to sleep it off, and we lost about 6 hours. Because of this, we didn’t get to finish implementing the facial recognition API.
Overall, regardless of the app’s faults, and the features we didn’t get a chance to fully implement, I’m proud of it. I'll take what I've learned over that weekend and use it to do even better next time.
About the Author - Declan Hopkins
Declan is a software developer and entrepreneur who is always looking for new opportunities to learn and drive the industry forward. You can learn more about him and his projects, as well as read his blog, at www.declanhopkins.com