HyperCube

Hypercube is a Doctor Who themed web application hosted on Heroku, and is based on Twitter, and The Ruby On Rails Tutorial by Michael Hartl. Click the image below to try it out for yourself!

About the App

The app itself is modified from The Ruby On Rails Tutorial by Michael Hartl. If you haven’t heard about it, that 800+ page tutorial is an excellent resource for anyone looking to get started in software engineering for web applications. There are a whole bunch of tutorials on all kinds of topics, check it out at the Learn Enough Society

What It Does

The app is a fully functioning social media microblogging service: users can create and sign into their account, look up other users and follow/unfollow them, and publish short blog posts including images.

Signup Page

Signup Page

Account Activation

User Homepage

The pictures above show stages of the signup flow. The user is able to register, add their username, email, and password, and they can choose to stay logged in, at which point the app saves a remember token for them. The app automatically generates a profile image sourced from Gravatar, based on the user’s email address. Users can see who they are following, and who their followers are.

Paginated list of users

User profile and follow button

Writing a microblog post

Feed, post, and image

A user can access the list of all accounts on the application and can choose to follow whomever they please. The above images show the process of looking at the list of users, visiting the profile of one of them, with the option of following, crafting a post with an image, and finally, the micropost feed, showing the image that was attached, and a follower’s response.

What’s Under The Hood?

This is a classic project of the Ruby on Rails world. Twitter (now X) was originally written in Rails, and the purpose of the project is to learn and demonstrate applicable skills in software engineering. It’s gone through a number of versions, and more recently I decided to update it so I can host it on Heroku. Currently it uses Ruby 3.1.4 and Rails 6. The last time I worked on it was before the Mimemagic snafu, so I had to update everything to make sure all the deprecated gems were either up to date, or replaced.

In its original version, users’ accounts started as unactivated, and would have to click a link with an activation token embedded in the address to toggle their account on. I ran into some problems with Sendgrid, (the service that sends emails in production) so I changed the configuration to automatically redirect users after registering their account.

I still use AWS S3 Buckets to save all the images that users post, since Heroku clears the cache every time it restarts.

The whole app has 100% test coverage, and always runs green before I push it up.

Thanks for reading, here is a link to the active app: HyperCube, and here’s the link to the GitHub Repo: https://github.com/corbettbw/hypercube

Published by corbettbw

I am a Ruby developer in Phoenix, AZ. I'm interested in the intersection of technology and social justice, love weird science facts, and my dog, Coco; a cute black lab/pit bull mix, who won't stop eating rocks.

Leave a comment