Inspiration

We were inspired by blockchain technology and how much application it has to such a variety of industries. We also thought it was interesting how blockchain has such a magnitude of possibilities, yet many people just associate it with cryptocurrency and banking. Blockchain has gone far beyond its origins of cryptocurrency and banking. However, thanks to Bitcoin's popularity, it helped demonstrate the power of blockchain. The idea of having a system in which information can be stored and be tracked without altering past entries is a really powerful tool and it doesn't get affected by a single point of failure in any scenario. We thought it would be empowering if we could make a prototype for an application that could speed the lengthy passport process by creating a blockchain out of it. Going into the competition, none of us had experience working with ruby, rails, or even the blockchain data structure, so we decided to take on the challenge and learn a completely new language, framework, and data structure in just two days.

What it does

We created two main components of our final submission. One of these is a landing page for our technology and the other is the functional application that allows users to try it out and get a feel of what it would be like to use it day to day. The idea behind how we decided to implement this was that in theory, it wouldn't be practical to have people create a whole new passport system and restart the entire process. Instead, we made this application integrate old physical passports, to this new online passport system. So, now let's talk about what the application does upon launch. Upon launching, the application asks the user to enter the name of their passport file or to create a new one if they don't already have one. Keep in mind that this passport file contains the database for that particular user's travels and passport information. If the user already has a passport file, they can go ahead and enter the name of it and either verify the information in there is valid, or they can add a new trip to it. If they choose to add a new trip to it, it asks for a country, date, and other important information. Upon completing this, a hash is generated using a sha256 algorithm. If the user doesn't already have a passport file, they can create one by entering their passport ID (Intended to represent possible integration from using a physical passport), then verifying information on it by entering details such as their name and birth date. This will then allow them to use their physical passport online by creating a new passport file. This passport file will then be used just like any other, by allowing users to add new trips and information to it.

How we built it

Since the theme of this hackathon was to embrace the word rookie, we all chose a framework, language, and data structure that none of us had ever dealt with which was Ruby, Rails, and blockchain. We built the application within the console as a proof of concept. We used rails to get working on a front-end for it as a web app, but unfortunately due to the time constraint, we were unable to complete the web interface and integration for it, so we instead focused on flourishing the console version. The app uses object-oriented programming, local text files, and hashing to run user authentication, adding to files, and creating hashed values. We created schemas for our local text file databases using objects and we were able to implement user authentication as well as mimick of removing and pushing to a database using text files. When users are prompted to enter information, we coded basic instructions and rules for them to follow and we made test cases for them to follow, so they would be notified if they made any mistakes. Verification and updating of user travels were done by pushing information to text files once submitted by a user. Our application is also built a lot around the blockchain technology. We created our classes and methods based on blockchain technology and we implemented it so that users can create new travel entries and each one creates a new hash that must be verified to the previous hash. Also, there are no alterations allowed of previously made entries, any new information to a schema, but have a new block created for it. The usage of the private blockchain really secures the entire application and makes it highly functional.

Challenges we ran into

One of the biggest challenges we ran into once we began coding was connecting our Ruby program with a MongoDB Atlas in the cloud. We found that there was little documentation on the subject online and the fact that none of us had dealt with Ruby before perhaps caused us to all overthink the concept and make it sound more complicated than it might have actually been. Another challenge we had was setting up a workspace using Ruby on Rails. This was definitely new to all of us as the frameworks we've used in the past had a fairly orthodox file structure and workspace setup. We found that setting up a local or even remote-based workspace with ruby required many packages, some of which were hard to get configured and imported properly. Eventually, however, we were able to get enough experience in Ruby that one can in 2 days' time, and we were able to create a workspace that worked well for the application to function. Another challenge we had which was more minor was really understanding how blockchain worked and how we could implement it. Not many of us had experience working with any possible data structure before, so it did take a lot of research at first to truly understand blockchain and how it works underline.

Accomplishments that we're proud of

Although there were many hurdles and disappointments along the way, we're all happy and proud to say that we were able to do something that we didn't think was capable. We learned and successfully created a functional project in a new programming language none of us had touched before. This was honestly one of the proudest things we've worked on for a while, thinking back on it and seeing the fact how in just 2 days time we were able to learn a new framework and syntax, but still create something super functional with another new technology we never worked with, blockchain. We are also super proud that we were able to dive into a data structure unfamiliar to us, and use it effectively and in a correct manner.

What we learned

In this project, we learned a lot about blockchain technology and technologies associated with it such as hashing. As most of us are entering the age of jobs and internships, it was very nice to learn about this data structure. We also learned about coding in Ruby and using object orientated programming with Ruby to authenticate, and add information to local files. Although we were unable to implement a Mongo Cloud server, the process of trying to figure it out was also a learning process as we learned about the usability of Mongo straight from the cloud and we plan on using it for the other frameworks we regularly use. We also learned about creating routes, templates, and views using Rails. The process is quite similar to Node.js and Flask so we found it very interesting to see it done using Rails. Another thing we learned was how to work more efficiently on a project with Git while collaborating with others. My team members and I for the first time really understood the benefits of using version control software like Git and we chose to master it within the first hour of the hackathon to better utilize how we will make this project from the ground up. We were making sure to make small commits with meaningful messages so that if at any time we had problems, we could easily pinpoint the versions of the code and see where something went wrong.

What's next for Online Passport

Like we said earlier, we were able to create a functional console application for it to demonstrate the possibilities of what this can do. Due to the time constraint, we were unable to fully utilize this to contain a nice user interface and cloud database, so that's definitely what we're going to be working on next. Once we design a nice front end with it and integrate it with Rails and MongoDB or another Database system, we can easily demo this project to others and prove the power of blockchain technology and how much time and money it can really save.

Built With

Share this project:

Updates