Skip to content

githubotoro/formsify-web3-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

View Project | Report Bug | Request Feature
Twitter | Smart Contract
If you like this project, don't forget to give it a star!
Thanks! 😊

Formsify In A Tweet βœ’οΈ

Your forms are Good, but they can be Better πŸ’―

πŸ‘‰ Formsify helps you in creating better forms, which are Decentralized, Trustless & Distributed.

Project Links πŸ”—

πŸ“Œ Website (formsify.vercel.app)

🌐 Twitter (@formsifying)

πŸ’» GitHub Source Code: Web3 App | Smart Contract

Project Demo 🌈

Watch the video

Project Evolution πŸš€

πŸ‘‰ All the below links show the evolution of project - from building idea to shipping features and finally featured working state.

Inspiration πŸ“Œ

πŸ‘‰ Currently available "Online Survey Services" are Centralized, Trust-Based & Dependent.

" Thus, we have challenges of Integrity, Transparency and Accessibility. "

πŸ”Ž Let's have a discussion on the problems and drawbacks of Online Survey Services

1. Integrity 🀝

Definition πŸ‘‹

The quality of being honest and having strong moral principles.

Problems πŸ’’

How do you make sure πŸ‘‡

  • that the server which holds your information wouldn't be compromised?
  • that the platform which holds your forms, wouldn't go down?
  • that the system which holds your data, wouldn't betray you?

2. Transparency πŸ“‹

Definition πŸ‘‹

Operating in such a way that it is easy for others to see what actions were performed.

Problems πŸ’’

How do you confirm πŸ‘‡

  • that your data was unaltered?
  • that your forms were fair to all respondents?
  • that no-one filled forms on behalf of others?

3. Accessibility βœ…

Definition πŸ‘‹

The information that the user needs must be perceivable to them.

Problems πŸ’’

How do you ensure πŸ‘‡

  • that your data will be accessible, even when system goes down?
  • that your forms can be independently interacted with at all the times?
  • that access to your information cannot be revoked?

What Formsify Does πŸ’―

πŸ‘‰ Formsify helps in creating Decentralized, Trustless & Distributed forms by giving each form their own digital identity in terms of smart contract and storing them on-chain.

" Thus, we address the challenges of Integrity, Transparency and Accessibility. "

πŸ”Ž Let's have a discussion on how Formsify solves the problems and drawbacks of Online Survey Services

1. Integrity 🀝

Solution βœ”οΈ

We make sure πŸ‘‡

  • that your data is decentralized and therefore, it remains uncompromised because there isn't any single point of failure.
  • that your forms are platform independent and the interface can be re-built by anyone if we go down.
  • that the system isn't controlled by any single entity, therefore betrayal isn't possible until majority of the network gets compromised.

2. Transparency πŸ“‹

Solution βœ”οΈ

We confirm πŸ‘‡

  • that data is immutable by storing it on Blockchain.
  • that your forms are unbiased in all scenarios by ensuring that they cannot be altered.
  • that no-one can fill forms on behalf of others, until and unless respondent's wallet is compromised.

3. Accessibility βœ…

Solution βœ”οΈ

We ensure πŸ‘‡

  • that your data is accessible, even if go down by storing it on-chain.
  • that your forms can be independently interacted with by representing them as separate smart contracts.
  • that access to your information cannot be revoked because no single entity can stop you from accessing it.

Improvements in Web3 Ecosystem 🌐

1. Accountability ❗️

Respondent cannot deny, once their transaction is recorded on-chain which makes them accountable to their responses.

2. Spam Infeasibility ⚠️

Since each form submit will be backed by some amount of gas, it makes the intention of spam entries infeasible in a long run.

3. Independency β˜‘οΈ

Forms are unbiased and have their own digital identity which cannot be tampered with.

Built With πŸ”

React.js, DaisyUI, Firebase, RainbowKit, Wagmi, Vercel, Tailwind CSS, Ethers.js, Alchemy, Fluent Emoji, React Toastify

How Formsify Was Built 🧱

Each form is represented as an indiviudal smart contract The Smart Contract has following main features:

  • Owner (Form Deployer)
  • Fills (Total fills of the deployed form)
  • maxFills (Maximum fills that are allowed per form)
  • startTime and endTime (Opening and closing times of form)
  • allowedTotalFills (Number of fills allowed per user for a particular form)
  • formHead (Headers of the form which includes the initial parameters of heading and description)
  • fields (Question fields of the form)
  • records (Stores responses of the deployed form)
  • filledRecords (Tracks fill id and total number of fills of a particular address)

We had to make sure that each form response, although stored on-chain, would still remain unreadable to ensure data privacy.

  • We achieved it using AES Cryptography, where key of each form would be unique, generated using react-uuid and encryption-decryption is carried out using crypto-js.

App is based on following:

Challenges Tackled Down 😎

  • deploying smart contracts from frontend
  • synchronizing block time and local time of forms deployed on-chain
  • maintaining data privacy while storing data on-chain
  • cryptographic encryption and decryption of fetched form data locally
  • setting form parameters of smart contracts to ensure fill frequency and limits

Getting Started πŸš€

All you need to get started with this project is Formsiness πŸ‘€

Installation πŸ’»

  1. Clone this repo.

    git clone https://github.com/githubotoro/formsify-web3-app.git
  2. (Optional) Modify Formsify.json under /src/helper/Formsify.json to customize the smart contract according to your requirements.

    NOTE: If you want to make changes to smart contract, refer this formsify-smart-contract project and don't forget to update Formsify.json in your web3 app after compilation.

  3. Get your own Alchemy API Key on "Polygon Mumbai Testnet" from Alchemy. Make a .env file in the root directory and enter the following line.

    REACT_APP_POLYGON_MUMBAI_API_KEY = "YOUR_ALCHEMY_API_KEY"

    NOTE: Never push your .env file to GitHub.

  4. Install NPM packages.

    npm install
  5. Start the project.

    npm start
  6. Time to create Formsify Forms! βœ…

Contributing 🀝

"Formsify" is an open-sourced project and any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "Formsifying". 🏷

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/FormsifyFeature)
  3. Commit your Changes (git commit -m 'Add some FormsifyFeature')
  4. Push to the Branch (git push origin feature/FormsifyFeature)
  5. Open a Pull Request

License πŸ“ƒ

Distributed under the MIT License. See LICENSE for more information.

Contact πŸ‘‹

Uday Khokhariya

Accomplishments πŸ˜‡

image πŸ‘‰ Formsify has been a part of πŸ¦„ Buildspace's Nights and Weekends Program - Season 1 and was also presented under their "Demo Day" held on 6.8.2022

What We Learned πŸŽ“

Added the following learnings to our portfolio:

  • Pre-planning of solution before coding does matter. (We learnt it the hard-way. πŸ˜…)
  • Making separate components helps in saving a lot of development time. (Reusability is highly underrated! βŒ›οΈ)
  • Take proper backups before forcing a git repo to commit back to previous release. (Just in case you mess up like us, there is a command called 'git reflog', use it wisely. May the force be with you! 🌌)
  • Things which work locally, can create serious problems after deployement, if left untested. (What happens on localhost, stays on localhost. 😬)
  • Conduct experiments on a trial project before breaking up the main code. (Breaking & fixing is the endgame after all. 😌)

What's Next For Formsify πŸ‘€

We are looking forward on the inclusion of following features:

  • make dynamic smart contract creation based on forms
  • include more customization options
  • have forms record information as solitary variables instead of a JSON string
  • provide saving & editing functionalities for form respondents
  • add editable smart contract functions for after deployment changes

Releases

No releases published

Packages

No packages published

Languages