Last Friday, we had the chance to see some of the final projects from the Bitmaker Summer Cohort. After only two weeks, the result has been some amazing MVPs. From dining deals and reservations to a Github for DJs, it’s amazing what we can build now.
Our Bitmaker project is up online at StayTraders.com. Create an account, play with it, and email me at sing.drew at gmail.com if you have any questions!
If you want to hear about the technologies we used and features of the site, feel free to read onwards.
StayTraders is an accommodation for skills exchange that allows guests to teach or work for their hosts. In return, they get a free place to stay. Users can contact hosts listed on the site. If a host has accommodation available, they can then offer it to that person for a maximum of 20 hours of work a week. I’ve always enjoyed traveling and immersing myself in different cultures, which is one reason why seeing the physical MVP online has been so rewarding.
I was lucky enough to work with Eric Szeto. I feel we got along really well, and got into a solid work flow once we understood the goals of our MVP (I highly recommend interviewing him for his full-stack skills, and on top of that, he’s a personable guy who’s quite funny!). We managed our tasks with Asana, and scribbled text on a shared google doc when further notes were required.
A cool gem we found was Figaro, which is used to keep our sensitive keys confidential since this is a public repo. And our site is hosted on Heroku’s handy setup!
For testing, we’re utilizing Rspec and Capybara. Our intention was to use BDD. Most of our views are covered, but admittedly we have fallen behind on the specs and need to spend some time catching up on them.
Carrierwave, mini_magick, and S3 – Our images are hosted on Amazon S3. We’re using the carrierwave gem for image uploads and a Jquery cropping plugin called Jcrop for image cropping. Configuring everything was a bit tricky because for some reason mini-magick wasn’t saving the cropped image coordinates (x, y, w, h). In our crop method, we then open the image and manually write the new cropped image dimensions to make sure it saves and displays properly (see asset_uploader.rb under app/uploaders)
State_machine -To get an understanding of state machines, we used them in our admin panel. We transition the state of a hosting to pending once it has been submitted by a user.
This allows an admin to approve the hosting for display on the site if all the requirements have been filled out.
Polymorphic assets – StayTraders allows multiple image uploads for both Profiles and Hostings. Initially, we set up lis_images and pro_images models and controllers, which wasn’t very DRY and became a bit confusing. We then refactored all our images into an assets polymorphic tree, which can be accessed by both Profiles and Hostings. Our assets table also has a column called “state” (probably not the best name), which is used to label whether an image is the default profile image or not (active or inactive).
Google Charts! – For logged in users, we recently implemented a google chart to display the country location of all hostings and people with a toggle button. Check out our maps_controller.rb for how the data is organized.
Mailers – Test our mailers :-). Upon registration, we’ve set up mailers to send an automatic email to the user. We’ve also implemented a contact form for both hostings and profiles, which automatically is sent to the recipient via email. It allows us to keep emails private until a user has reached out to another StayTrader.
Overall, it’s been extremely rewarding to work on this fun idea. Eric has been an awesome partner. His attention to detail is amazing, and I hope to be able to continue working on StayTraders with him in our free time.