View Project
|
Report Bug
|
Request Feature
Twitter
|
Smart Contract
If you like this project, don't forget to give it a star!
Thanks! π
Your forms are Good, but they can be Better π―
π Formsify helps you in creating better forms, which are Decentralized, Trustless & Distributed.
π Website (formsify.vercel.app)
π Twitter (@formsifying)
π» GitHub Source Code: Web3 App | Smart Contract
π All the below links show the evolution of project - from building idea to shipping features and finally featured working state.
π 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
The quality of being honest and having strong moral principles.
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?
Operating in such a way that it is easy for others to see what actions were performed.
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?
The information that the user needs must be perceivable to them.
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?
π 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
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.
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.
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.
Respondent cannot deny, once their transaction is recorded on-chain which makes them accountable to their responses.
Since each form submit will be backed by some amount of gas, it makes the intention of spam entries infeasible in a long run.
Forms are unbiased and have their own digital identity which cannot be tampered with.
React.js, DaisyUI, Firebase, RainbowKit, Wagmi, Vercel, Tailwind CSS, Ethers.js, Alchemy, Fluent Emoji, React Toastify
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:
- made using React
- styled using Tailwind
- designed using DaisyUI
- data is stored on Firebase
- chain on which forms are stored is Polygon
- connect wallet funtionality is abstracted from RainbowKit
- chain APIs are fetched from Alchemy
- web3 app is deployed on Vercel
- 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
All you need to get started with this project is Formsiness π
-
Clone this repo.
git clone https://github.com/githubotoro/formsify-web3-app.git
-
(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.
-
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.
-
Install NPM packages.
npm install
-
Start the project.
npm start
-
Time to create Formsify Forms! β
"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". π·
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/FormsifyFeature
) - Commit your Changes (
git commit -m 'Add some FormsifyFeature'
) - Push to the Branch (
git push origin feature/FormsifyFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Uday Khokhariya
- Twitter - yupuday
- Email - [email protected]
π 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
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. π)
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