Portfolio Project: FakeStop

Develop a smart contract based web application to fight counterfeit diplomas in 20 days

Joudirim
7 min readNov 16, 2021
Logo
Landing page overview

FakeStop is an online checker for the authenticity of diplomas based on smart contract.

This blog describes the process of making our portfolio project, which is done for Holberton school at the end of the foundation year.

Introduction:

Blockchain is not just about Bitcoins or other cryptocurrencies. It is also used for databases such as document records.

To keep things organized let’s ask some questions and try to answer them one by one

- Why we chose to work on this project?

- What is the project’s inspiration?

- What exactly is the purpose of our project?

- What are The Technology & Architecture used in our Project?

- What about technical interests as a result of our Project ?

- What are the challenges have we discovered about our project?

- What we learned about yourself as an engineer and how this project informs our engineering path in the future?

Firstly Coming into the point why we chose to work on this project?

Since degree fraud has become a global phenomenon because of the rising demand of degree certificate in job market. Academic certificate is an important piece of document. So, there is a very great need for the protection of documents to keep them from being destroyed, manipulated or forged into some other documents.

Therefore we though about designing a system that checks whether a diploma is fake or not.

So we decided to build a decentralized app (Dapp) based on the Ethereum smart contract, that aims to check diplomas and returns the authentication state of them.

We chose to work with Blockchain because it provides the authentication, authorization, privacy, confidentiality and ownership to the documents of the user which are the required properties of the digital documents.

Our project helps:

  • Universities to store students diplomas in a secure way using a smart contract runned on Ethereum blockchain.
  • Users to check whether a diploma is fake or not.

Created by Maroua Alaya and Rim Joudi.

What is the project’s inspiration?

The project was inspired by” a True Story from a movie. As a society, we’re enthralled with stories that actually happened in real life.

After that, we do a lot of researches before beginning our Project, we search to determine whether there is enough information out there for our needs and to set the context of our research. We look up in other sources such as our internet search engines.

For us it was a fully challenging project, we used technologies that we don’t know and we have never tried before that’s why we chose to do all parts by collaborating together so we all can learn and work with those new technologies.

Architecture & used Technology:

In our project, we developed a decentralized application and designed a certificate system based on Ethereum blockchain.

Ethereum is an implementation of Blockchain technology that can run smart contracts. This technology was selected because it is incorruptible, encrypted, and trackable and permits data synchronization. By integrating the features deleted or modified.

Solidity: is the programming language used for implementing smart contracts and is similar to JavaScript. After a Solidity-programmed smart contract is completed, a compiler called solc is required to transform the Solidity code into contract bytecode, which is then interpreted by the EVM. Next, the compiled instructions are deployed in an Ethereum blockchain. This completes the whole process.

Smart contract: Refer to computer protocols that digitally that facilitate the verification, control, or execution of an agreement.

Architecture:

The university is going to enter the student’s details in a form after signing in if they have an account, if they don’t they need to signup so they can have the access to the form page.

After submitting the credentials of the student, informations will be stored in the smart contract and when a user wants to check the authenticity of a diploma certificate he has to put the id to check.

The id is unique, each student has a unique id.

Used Technologies:

For the Fronted we used the JavaScript fronted framework ReactJs.,we opted to use ReactJs because Truffle which is the framework to develop the Ethereum smart contract has boxes that contains helpful modules for the dapp development such as the ReactJs.

We run this command to unbox the Truffle box:

truffle unbox react

For the back-end we used ExpressJs and to code the Ethereum smart contract we used Solidity, since we are familiar with JavaScript we opt to work with it over Golang because of the similarities between solidity and JavaScript.

For the API we used web3.js which is an Ethereum JavaScript API that allows the interaction with a local or remote Ethereum node.

Some of the features covered by the project:

  • The ability to create an account with signup.
  • The authentication with the Firebase.
  • Users can signin if they already have an account.

We’ve tried making the issue more clear by explaining core algorithms and code snippet of our smart contract: Here is how we built an application , and codes are available on GitHub.

  • In the smart contract we used struct to store data of diploma:
  • Then we implement two methods for generating id and checking id of each diploma.
Generate the id
check the id

=> So, What happens when the user make a transaction (enter Data):

- Execute the transaction(storage data) in the Blockchain,

- The new block will be mined and added to the chain,

- Giving each users’diploma an unique id.

What are the challenges have we discovered about our project?

We have discovered that Blockchain is not just about Bitcoins or other cryptocurrencies, it is also used for databases such as document records.

The most difficult technical challenge we encountered in the project:

The all project is a challenge for us, creating the smart contract with solidity that serves our proposal project, Deployment of the smart contract on Ethereum that needs a lot of tests before deploying it in the EVM, we needed to change some methods and variables in the smart contract.

But the hardest part was linking and synchronizing smart contract with front-end, to connect the smart contract with the ReactJs front end we did a lot of tries some of them failed and other succeeded and the connection worked finally.

And we should mention that delevering the project in time was one of the biggest challenges.

The most difficult non-technical challenge we encountered in the project:

For non-technical challenges, we’ve tried to work in a team so we encourage each other to share constructive criticism and praise respectfully. Each individual’s experience and talents play into their unique perspective to tackle problems and tasks. No one’s opinion should be discredited.Our work progressed smoothly because we are using git branches pulling requests and a lot pulling requests and a lot of tests before deployment of smart contract and committing new code. also we think about the processing and progressing as planned , so we split the work among us making sure we discuss every step before hand.

What we learned about ourselves as engineers and how this project informs our engineering path in the future?

- Deep understanding of Blockchain: Now each team member have a good experience working with Ethereum and related Blockchain frameworks.

- Security and protecting privacy: Working with Ethereum Platform to protect Data of each Diploma.

- Deploying Smart Contract: Learning how to deploy a correct smart contract that serve the project proposal.

- Professional API’s: To create an API you should do a lot of work.

On the personal level this project has taught me a lot of things such as:

- Manage my time effectively.

- Working under pressure and to respect deadlines.

- To be open and to learn new technologies and to work with them in a brief period of time.

- Understanding the concept of decentralized app and how it is structured.

- Creating, implementing, testing and linking a solidity smart contract.

- Building a website app using ReactJs.

Conclusion:

Storage of documents has become a very important thing in our current lifestyle. Also, with this rising importance of documents, the theft and forgery of documents is also increasing day-by- day. So, there is a very great need for the protection and authentication of documents.

This project proves another use of blockchain other than cryptocurrencies. It shows that it is the most secure way to protect data due to it’s immutability, transparency and no third party interference.

Rim Joudi: Student at Holberton school.

Link to the GitHub project: https://github.com/RimJoudi/Portfolio-Project_FakeStop

Link to linkedin profile: https://www.linkedin.com/in/rym-joudi-014023206/

--

--