Giter Club home page Giter Club logo

decentralizedform's Introduction

Welcome to my project Decentralized Form (dForm)

This project is inspired by Google Forms.

  • Everybody can make a customized survey, see an analysis of a certain form, share the survey link to anyone as they want.

  • A Shared people will able to join a survey by using the shared link or using the survey id to join it.

  • After that, all the answers will be acquired and show the statistics for the owner

User case Diagram

dForm UserCase

  • The action of an owner can execute inclues:

    • Create new form
    • Edit form
    • Delete from (also delete all the question of this form)
    • Add new question
    • Edit question
    • Delete question
    • Join a form
    • View statistical
  • All of them need to be sign in first

Folder Structure

  • This project includes three folder
    • contract: Contains all the contract logic code of dForm. It was wrote in AssemblyScript
    • dapp: Contains all the web app code of dForm. This web app use the NextJs Framework
    • docs: Contains some figs, documentations (Todo)
  1. Contract

    • The contract includes three main folders
      • Controller: Contain all of the logic code of contract. receive requests from users, Interacting with Near storage and return the useful data.
      • Model: Contain all abstract object of Contract (Like OOP).
      • Storage: Contall all utility funtions to interact with Near Persistent Storage.
  2. dApp

    • The dApp inclues three main folders
      • backed: Contain utility function to connect to Near Wallet, Init the contract and so on
      • Components: Contain the whole logic code that will be used in this project
      • Pages: Contain all the pages of dApp

How to run this project

Let work with contract first.

  1. Contract

    • First of all, we need to login near wallet in terminal in the root folder of contract
    cd /contract
    near login
    • After that, install the node modules then build the contract
    npm i
    npx asb
    • Next, we need to change the Contract Name in Config file
    open the config.js
    
    vim /contract/src/config.js
    
    update the contract name as you want
    • The last, deploy the contract to testnet
    near deploy
  2. dApp

    • First of all, we install the node modules
    cd /dapp/cform
    yarn
    or
    npm i
    • Update the contract name in the utility file
    cd /backed
    vim /config.js
    update the contract name as you want
    • The last, run server
    yarn dev
    or
    npm run dev

If you have any questions, feel free to let me know

My contact

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.