Features: Firebase, Google Cloud, Twilio, BlockChain

Inspiration

Coming up with New Years Resolution is fun. Keeping it is not so much. For some people, it's because of the lack of motivation. For others, it's because they treat it as a sprint, not a marathon. Either way, the joy and excitement that comes with making New Years Resolution fade over time.

What it does

Our app helps keep people on track with their New Years Resolution by:

  • Guiding them to be more specific with their goal and create achievable baby steps
  • Coming up with a reliable system that rewards users when they achieved their goal
  • Giving them a gentle reminder every so often about their goal.

How we built it

Frontend: React JS, Web3 library (to interact with the Smart Contract) Backend: Solidity, Twilio, Google Cloud Scheduler (to send the text message), Firebase Firestore, Firebase Hosting

Challenges we ran into

When we came up with this idea, we had no clue where to start. The first few hours of the Hackathon, we were just watching countless youtube videos, asking friends for resources online, and trying everything we can to wrap our heads around building a token and a smart contract.

Building the backend with solidity was one of the challenges. Unlike regular programming languages and environment, there was no print or console.log statements. There was a time when we spent hours debugging why our stake function fails when we try to transfer money or how float works in solidity.

Connecting it to the frontend using web3 is another thing. This is our first time using Web3 library and blockchain in general, and it was very confusing. Web3 has so many features that we were overwhelmed by the documentation. Also, the latest version of React JavaScript doesn't support Web3 and it took us a lot of time to debug and to find the solution. But once we have set everything up, it was easy to connect MetaMask to our web application.

Aside from the contract, building the feature that automatically sends user text messages also took a while. There were so many options including numerous python library, a local queue, and Google Cloud Function. We tried almost every single options but ultimately found that the last one is the most straightforward.

Accomplishments that we're proud of

  • Having a fully working web app
  • Learning how to build a smart contract and a token in less than 48 hours
  • Doing something productive on new year's eve

What's next for New Year New Token

New Year New Token, in its current state, is just a proof of concept. We found a way to make achieving goals more rewarding, and we successfully built it. However, we're aware that the main downfall of this app is that it relies on people's honesty to report whether they have achieved their goal. But, as smart contract becomes smarter, we believe that it's possible for smart contract to determine if someone has achieved their goal automatically in the future.

There are many ways we can make a spin-off of this project. For example, in a classroom situation where each student initially gets the same amount of NYNT tokens. Instead of staking on monthly goals, they can stake it on homework. And, instead of doing self-reporting, we can have a reliable third party (i.e. the teacher) to mark if the homework are completed. This makes learning fun for the students but also provides insight to the teacher on each student's attitude towards each homework.

Built With

Share this project:

Updates