/voting-dapp

Decentralized Application for Voting Proposals

Primary LanguageTypeScript

Projet 3 : Dapp Voting

Voting Proposals Not Voted Yet


📘 Pour correction :

Lien vidéo (durée 3 min 07 sec, vous pouvez la regarder en 1.2x, cela vous fera donc 2 min 35 sec) : https://www.loom.com/share/0612121444484927a82d6c9ebe39d3eb

Lien Déploiement : https://voting-dapp-ten-blush.vercel.app

Déployé sur sépolia : 0x35312cf73B9d7361470eDDBdfd0E2EA887AD932C

Groupe constitué de :
- Léo-Paul MARTIN
- Pierre ORGERET


📁 Détails

📜 Contract

La faille a été corrigée comme suit : nombre maximum de proposal 5.

Niveaux bonnes pratiques nous avons fait ceci :

  • Overall
    • Bon partage des taches (contrat + test, frontend voting steps, déploiement)
    • Frontend et backend en TypeScript
  • Backend
    • Backend scripts :
      • deployer contrat: yarn run deploy-ll (hardhat) et yarn run deploy-se (sepolia)
      • voir la liste des proposals : yarn run proposal-ll (hardhat) et proposal-se (sepolia)
      • reset le workflow/clear proposals et voters : reset-ll (hardhat) et reset-se (sepolia)
      • update le workflow manually
      • automatiser la démo
    • Backend script dans le package.json pour run les commandes hardhat (compile, test, coverage, node, deploy, proposal, reset)
    • Backend test coverage 100% statement, branches, functions, and lines, utilisation de fixture et loadFixture partout
  • Frontend
    • React context
    • Colors
    • Message d'alerte quand blockchain down/contract not deployed ou mauvais contrat target
    • Variable d'environnement pour update les variables importantes depuis vercel sans update le code
      • contract address
      • numéro de block de déploiement (début d'écoute des events)
      • projectId de walletConnect
      • rpc url Sepolia

🧪 Testing

  • Backend
    • Coverage 100% statement, branches, functions, and lines
    • Utilisation de fixture et loadFixture partout

🎨 Front

Voici la liste de la stack utilisée pour la réalisation du projet :

  • Chakra-ui
  • Next.JS
  • RainbowKit v2
  • Viem
  • Wagmi

🔄 Flow

1. Registering Voters
Registering Voters

2. Registering Proposals
Registering Proposals

3. Start Voting
Start Voting

4. Voting Proposals Not Voted Yet
Voting Proposals Not Voted Yet

5. Voting Search Empty
Voting Search Empty

6. Voting Proposals Voted
Voting Proposals Voted

7. End Voting Proposals
End Voting Proposals

8. End Voting Search
End Voting Search

9. Votes Tallied
Votes Tallied