@maci-protocol/website 0.0.0-ci.1e276ed

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/.eslintrc.js +157 -0
  2. package/CHANGELOG.md +566 -0
  3. package/LICENSE +22 -0
  4. package/README.md +58 -0
  5. package/babel.config.js +3 -0
  6. package/blog/2021-10-12-maci-v1.md +100 -0
  7. package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
  8. package/blog/2023-01-18-maci-v1.1.1.md +121 -0
  9. package/blog/2024-01-18-roadmap.md +106 -0
  10. package/blog/2024-02-28-maci-v1.2.0.md +121 -0
  11. package/blog/2024-04-10-roadmap-q2.md +96 -0
  12. package/blog/2024-05-08-ethdam.md +169 -0
  13. package/blog/2024-05-22-the-origins-of-maci.md +38 -0
  14. package/blog/2024-05-28-upcoming-grants.md +85 -0
  15. package/blog/2024-06-17-understanding-maci.md +63 -0
  16. package/blog/2024-06-21-deciphering-maci.md +48 -0
  17. package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
  18. package/blog/2024-07-23-q2-review.md +72 -0
  19. package/blog/2024-07-30-roadmap-q3.md +61 -0
  20. package/blog/2024-08-10-maci-v2.md +102 -0
  21. package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
  22. package/blog/2024-10-29-q3-review.md +63 -0
  23. package/blog/2024-11-20-maci-platform.md +93 -0
  24. package/blog/2024-12-01-maci-getting-started.md +294 -0
  25. package/blog/2025-03-21-roadmap-2025.md +112 -0
  26. package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
  27. package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
  28. package/blog/assets/MACI_Complex_Message.png +0 -0
  29. package/blog/assets/MACI_Contracts.png +0 -0
  30. package/blog/assets/MACI_Sign_Up.png +0 -0
  31. package/blog/assets/MACI_Simple_Message.png +0 -0
  32. package/blog/assets/MACI_Verifier_1.png +0 -0
  33. package/blog/authors.yml +5 -0
  34. package/docusaurus.config.ts +213 -0
  35. package/package.json +65 -0
  36. package/src/components/ActionCard/index.tsx +30 -0
  37. package/src/components/ActionCard/styles.module.css +96 -0
  38. package/src/components/HomepageFeatures/index.tsx +91 -0
  39. package/src/components/HomepageFeatures/styles.module.css +17 -0
  40. package/src/components/ProjectCard/index.tsx +74 -0
  41. package/src/components/ProjectCard/styles.module.css +77 -0
  42. package/src/components/ProjectList/index.tsx +218 -0
  43. package/src/components/ProjectList/styles.module.css +180 -0
  44. package/src/content/projects.json +294 -0
  45. package/src/css/card.module.css +130 -0
  46. package/src/css/custom.css +91 -0
  47. package/src/icons/IconDiscord.tsx +16 -0
  48. package/src/icons/IconGithub.tsx +16 -0
  49. package/src/icons/IconWebsite.tsx +16 -0
  50. package/src/pages/blogs.tsx +58 -0
  51. package/src/pages/index.module.css +152 -0
  52. package/src/pages/index.tsx +66 -0
  53. package/src/pages/projects.tsx +44 -0
  54. package/src/pages/roadmap.md +150 -0
  55. package/src/pages/typedoc.tsx +11 -0
  56. package/src/plugins/blog-plugin/index.ts +86 -0
  57. package/src/react-app-env.d.ts +1 -0
  58. package/src/scripts/setupSolidityDocs.ts +67 -0
  59. package/src/scripts/setupTypedoc.ts +112 -0
  60. package/src/scripts/utils.ts +115 -0
  61. package/src/utils/getProjectsByFilter.ts +40 -0
  62. package/static/.nojekyll +0 -0
  63. package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
  64. package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
  65. package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
  66. package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
  67. package/static/fonts/DM_Sans.woff2 +0 -0
  68. package/static/fonts/Share_Tech_Mono.woff2 +0 -0
  69. package/static/img/box.png +0 -0
  70. package/static/img/box_dark.png +0 -0
  71. package/static/img/chain.png +0 -0
  72. package/static/img/chain_dark.png +0 -0
  73. package/static/img/chart.png +0 -0
  74. package/static/img/chart_dark.png +0 -0
  75. package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
  76. package/static/img/circuits/calculateTotal.svg +21 -0
  77. package/static/img/circuits/ecdh.svg +21 -0
  78. package/static/img/circuits/messageToCommand.svg +21 -0
  79. package/static/img/circuits/messageValidator.svg +21 -0
  80. package/static/img/circuits/poseidonHasher13.svg +21 -0
  81. package/static/img/circuits/privToPubkey.svg +21 -0
  82. package/static/img/circuits/processMessages.svg +21 -0
  83. package/static/img/circuits/processMessagesInputHasher.svg +21 -0
  84. package/static/img/circuits/processMessages_2_0.svg +21 -0
  85. package/static/img/circuits/processOne.svg +21 -0
  86. package/static/img/circuits/processTopup.svg +21 -0
  87. package/static/img/circuits/processingAfterPollEnds.svg +21 -0
  88. package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
  89. package/static/img/circuits/quinCheckRoot.svg +21 -0
  90. package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
  91. package/static/img/circuits/quinSelector.svg +21 -0
  92. package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
  93. package/static/img/circuits/splicer.svg +21 -0
  94. package/static/img/circuits/tallyInputHasher.svg +21 -0
  95. package/static/img/circuits/tallyVotes.svg +21 -0
  96. package/static/img/circuits/unpackElement.svg +21 -0
  97. package/static/img/circuits/verifySignature.svg +21 -0
  98. package/static/img/completingAPoll.svg +4 -0
  99. package/static/img/contracts.svg +16 -0
  100. package/static/img/coordinatorComponents.svg +21 -0
  101. package/static/img/favicon.ico +0 -0
  102. package/static/img/generateProofs.svg +4 -0
  103. package/static/img/hero.svg +9 -0
  104. package/static/img/maci-card.png +0 -0
  105. package/static/img/maci-rpgf-design.jpg +0 -0
  106. package/static/img/messageProcessingLocal.svg +21 -0
  107. package/static/img/offlineProcessing.svg +21 -0
  108. package/static/img/pse-logo-round.png +0 -0
  109. package/static/img/relayer-diagram.png +0 -0
  110. package/static/img/tallyCommitments.svg +4 -0
  111. package/static/img/voteTallyingLocal.svg +21 -0
  112. package/tsconfig.json +34 -0
  113. package/versioned_docs/version-v0.x/circuits.md +22 -0
  114. package/versioned_docs/version-v0.x/contract.md +186 -0
  115. package/versioned_docs/version-v0.x/faq.md +67 -0
  116. package/versioned_docs/version-v0.x/introduction.md +119 -0
  117. package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
  118. package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
  119. package/versioned_docs/version-v1.2/audit.md +160 -0
  120. package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
  121. package/versioned_docs/version-v1.2/circuits.md +508 -0
  122. package/versioned_docs/version-v1.2/cli.md +689 -0
  123. package/versioned_docs/version-v1.2/contracts.md +445 -0
  124. package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
  125. package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
  126. package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
  127. package/versioned_docs/version-v1.2/deployment.md +122 -0
  128. package/versioned_docs/version-v1.2/installation.md +175 -0
  129. package/versioned_docs/version-v1.2/integrating.md +200 -0
  130. package/versioned_docs/version-v1.2/introduction.md +94 -0
  131. package/versioned_docs/version-v1.2/key-change.md +182 -0
  132. package/versioned_docs/version-v1.2/overview.md +47 -0
  133. package/versioned_docs/version-v1.2/poll-types.md +68 -0
  134. package/versioned_docs/version-v1.2/primitives.md +216 -0
  135. package/versioned_docs/version-v1.2/project-ideas.md +14 -0
  136. package/versioned_docs/version-v1.2/purpose.md +62 -0
  137. package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
  138. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
  139. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
  140. package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
  141. package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
  142. package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
  143. package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
  144. package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
  145. package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
  146. package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
  147. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
  148. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
  149. package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
  150. package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
  151. package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
  152. package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
  153. package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
  154. package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
  155. package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
  156. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
  157. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
  158. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
  159. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
  160. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
  161. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
  162. package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
  163. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
  164. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
  165. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
  166. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
  167. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
  168. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
  169. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
  170. package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
  171. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
  172. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
  173. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
  174. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
  175. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
  176. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
  177. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
  178. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
  179. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
  180. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
  181. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
  182. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
  183. package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
  184. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
  185. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
  186. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
  187. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
  188. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
  189. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
  190. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
  191. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
  192. package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
  193. package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
  194. package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
  195. package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
  196. package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
  197. package/versioned_docs/version-v1.2/spec.md +944 -0
  198. package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
  199. package/versioned_docs/version-v1.2/testing.md +472 -0
  200. package/versioned_docs/version-v1.2/topup.md +43 -0
  201. package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
  202. package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
  203. package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
  204. package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
  205. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
  206. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
  207. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
  208. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
  209. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
  210. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
  211. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
  212. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
  213. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
  214. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
  215. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
  216. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
  217. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
  218. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
  219. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
  220. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
  221. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
  222. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
  223. package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
  224. package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
  225. package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
  226. package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
  227. package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
  228. package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
  229. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
  230. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
  231. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
  232. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
  233. package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
  234. package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
  235. package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
  236. package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
  237. package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
  238. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
  239. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
  240. package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
  241. package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
  242. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
  243. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
  244. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
  245. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
  246. package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
  247. package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
  248. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
  249. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
  250. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
  251. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
  252. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
  253. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
  254. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
  255. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
  256. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
  257. package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
  258. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
  259. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
  260. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
  261. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
  262. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
  263. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
  264. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
  265. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
  266. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
  267. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
  268. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
  269. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
  270. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
  271. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
  272. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
  273. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
  274. package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
  275. package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
  276. package/versioned_docs/version-v1.2/versioning.md +94 -0
  277. package/versioned_docs/version-v1.2/workflow.md +142 -0
  278. package/versioned_docs/version-v2.x/case-studies.md +35 -0
  279. package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
  280. package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
  281. package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
  282. package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
  283. package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
  284. package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
  285. package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
  286. package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
  287. package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
  288. package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
  289. package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
  290. package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
  291. package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
  292. package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
  293. package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
  294. package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
  295. package/versioned_docs/version-v2.x/getting-started.md +313 -0
  296. package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
  297. package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
  298. package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
  299. package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
  300. package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
  301. package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
  302. package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
  303. package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
  304. package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
  305. package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
  306. package/versioned_docs/version-v2.x/introduction.md +146 -0
  307. package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
  308. package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
  309. package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
  310. package/versioned_docs/version-v2.x/resources.md +33 -0
  311. package/versioned_docs/version-v2.x/security/_category_.json +4 -0
  312. package/versioned_docs/version-v2.x/security/audit.md +167 -0
  313. package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
  314. package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
  315. package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
  316. package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
  317. package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
  318. package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
  319. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
  320. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
  321. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  322. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
  323. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
  324. package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
  325. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
  326. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
  327. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  328. package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
  329. package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
  330. package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
  331. package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
  332. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  333. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
  334. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
  335. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  336. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  337. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
  338. package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
  339. package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
  340. package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
  341. package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
  342. package/versioned_docs/version-v3.x/case-studies.md +35 -0
  343. package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
  344. package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
  345. package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
  346. package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
  347. package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
  348. package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
  349. package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
  350. package/versioned_docs/version-v3.x/core-concepts/coordinator-service.md +16 -0
  351. package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
  352. package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
  353. package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
  354. package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
  355. package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
  356. package/versioned_docs/version-v3.x/core-concepts/offchain-voting.md +14 -0
  357. package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
  358. package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
  359. package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
  360. package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
  361. package/versioned_docs/version-v3.x/core-concepts/workflow.md +149 -0
  362. package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
  363. package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
  364. package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
  365. package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
  366. package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
  367. package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
  368. package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
  369. package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
  370. package/versioned_docs/version-v3.x/introduction.md +153 -0
  371. package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
  372. package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
  373. package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
  374. package/versioned_docs/version-v3.x/quick-start.md +318 -0
  375. package/versioned_docs/version-v3.x/resources.md +33 -0
  376. package/versioned_docs/version-v3.x/security/_category_.json +4 -0
  377. package/versioned_docs/version-v3.x/security/audit.md +167 -0
  378. package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
  379. package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
  380. package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
  381. package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
  382. package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
  383. package/versioned_docs/version-v3.x/technical-references/coordinator-service/_category_.json +8 -0
  384. package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
  385. package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
  386. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
  387. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
  388. package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -0
  389. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
  390. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  391. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
  392. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
  393. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
  394. package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
  395. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
  396. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
  397. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  398. package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
  399. package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
  400. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  401. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
  402. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
  403. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
  404. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  405. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  406. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
  407. package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
  408. package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
  409. package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
  410. package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
  411. package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
  412. package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
  413. package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
  414. package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
  415. package/versions.json +1 -0
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@maci-protocol/website",
3
+ "version": "0.0.0-ci.1e276ed",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "scripts": {
9
+ "setup-typedoc": "ts-node ./src/scripts/setupTypedoc.ts",
10
+ "setup-soliditydocs": "ts-node ./src/scripts/setupSolidityDocs.ts",
11
+ "docusaurus": "docusaurus",
12
+ "start": "docusaurus start",
13
+ "prebuild": "pnpm run setup-typedoc && pnpm run setup-soliditydocs",
14
+ "build": "docusaurus build",
15
+ "swizzle": "docusaurus swizzle",
16
+ "deploy": "docusaurus deploy",
17
+ "clear": "docusaurus clear",
18
+ "serve": "docusaurus serve",
19
+ "write-translations": "docusaurus write-translations",
20
+ "write-heading-ids": "docusaurus write-heading-ids",
21
+ "types": "tsc -p tsconfig.json --noEmit"
22
+ },
23
+ "dependencies": {
24
+ "@docusaurus/core": "^3.7.0",
25
+ "@docusaurus/preset-classic": "^3.7.0",
26
+ "@docusaurus/theme-classic": "^3.7.0",
27
+ "@docusaurus/theme-common": "^3.7.0",
28
+ "@easyops-cn/docusaurus-search-local": "^0.49.1",
29
+ "@mdx-js/react": "^3.1.0",
30
+ "clsx": "^2.1.1",
31
+ "docusaurus-plugin-image-zoom": "^3.0.1",
32
+ "docusaurus-plugin-matomo": "^0.0.8",
33
+ "gray-matter": "^4.0.3",
34
+ "prism-react-renderer": "^2.4.1",
35
+ "react": "^19.1.0",
36
+ "react-dom": "^19.1.0",
37
+ "rehype-katex": "^7.0.1",
38
+ "remark-math": "^6.0.0"
39
+ },
40
+ "devDependencies": {
41
+ "@docusaurus/module-type-aliases": "^3.7.0",
42
+ "@docusaurus/tsconfig": "^3.7.0",
43
+ "@docusaurus/types": "^3.7.0",
44
+ "@types/node": "^22.14.0",
45
+ "@types/react": "^19.1.0",
46
+ "ts-node": "^10.9.2",
47
+ "typescript": "^5.8.3"
48
+ },
49
+ "browserslist": {
50
+ "production": [
51
+ ">0.5%",
52
+ "not dead",
53
+ "not op_mini all"
54
+ ],
55
+ "development": [
56
+ "last 3 chrome version",
57
+ "last 3 firefox version",
58
+ "last 5 safari version"
59
+ ]
60
+ },
61
+ "engines": {
62
+ "node": ">=18.0"
63
+ },
64
+ "gitHead": "4d521a0ec67d0ab5be062cb0354cd3145cc883fe"
65
+ }
@@ -0,0 +1,30 @@
1
+ import styles from "./styles.module.css";
2
+
3
+ interface ActionCardProps {
4
+ title: string;
5
+ description: string;
6
+ buttonText: string;
7
+ buttonUrl: string;
8
+ }
9
+
10
+ const ActionCard: React.FC<ActionCardProps> = ({ buttonText, buttonUrl, description, title }: ActionCardProps) => (
11
+ <div className={styles.actionCard}>
12
+ <div className={styles.actionCardBody}>
13
+ <div className={styles.actionCardContent}>
14
+ <div className={styles.actionCardText}>
15
+ <h2 className={styles.actionCardTitle}>{title}</h2>
16
+
17
+ <p className={styles.actionCardDescription}>{description}</p>
18
+ </div>
19
+
20
+ <div className={styles.actionCardButtonContainer}>
21
+ <a className={styles.actionCardButton} href={buttonUrl} rel="noopener noreferrer" target="_blank">
22
+ {buttonText}
23
+ </a>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ );
29
+
30
+ export default ActionCard;
@@ -0,0 +1,96 @@
1
+ .actionCard {
2
+ background-color: #1a202c; /* darkBlue */
3
+ color: white;
4
+ border-radius: 24px;
5
+ width: 100%;
6
+ padding: 64px 32px;
7
+ }
8
+
9
+ .actionCardBody {
10
+ padding: 0;
11
+ }
12
+
13
+ .actionCardContent {
14
+ display: flex;
15
+ flex-direction: column;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ gap: 2rem;
19
+ }
20
+
21
+ .actionCardText {
22
+ width: 100%;
23
+ }
24
+
25
+ .actionCardTitle {
26
+ font-size: 30px;
27
+ line-height: 44px;
28
+ font-weight: normal;
29
+ color: white;
30
+ }
31
+
32
+ .actionCardDescription {
33
+ margin-top: 1rem;
34
+ font-size: 16px;
35
+ line-height: 25px;
36
+ font-weight: normal;
37
+ color: #a0aec0; /* text.400 */
38
+ }
39
+
40
+ .actionCardButtonContainer {
41
+ width: 100%;
42
+ }
43
+
44
+ .actionCardButton {
45
+ display: inline-block;
46
+ padding: 0.5rem 1rem;
47
+ background-color: #3182ce; /* primary */
48
+ color: white;
49
+ text-decoration: none;
50
+ border-radius: 0.25rem;
51
+ font-size: 1rem;
52
+ line-height: 1.5;
53
+ text-align: center;
54
+ }
55
+
56
+ @media (min-width: 768px) {
57
+ .actionCardContent {
58
+ flex-direction: row;
59
+ gap: 0;
60
+ }
61
+
62
+ .actionCardText {
63
+ width: 522px;
64
+ }
65
+
66
+ .actionCardTitle {
67
+ font-size: 40px;
68
+ }
69
+
70
+ .actionCardDescription {
71
+ font-size: 20px;
72
+ line-height: 32px;
73
+ }
74
+
75
+ .actionCardButtonContainer {
76
+ width: auto;
77
+ }
78
+
79
+ .actionCardButton {
80
+ padding: 0.75rem 1.5rem;
81
+ font-size: 1.125rem;
82
+ border-radius: 30px;
83
+ }
84
+ }
85
+
86
+ @media (min-width: 992px) {
87
+ .actionCard {
88
+ padding: 41px 80px;
89
+ }
90
+ }
91
+
92
+ @media (min-width: 1280px) {
93
+ .actionCard {
94
+ width: 1110px;
95
+ }
96
+ }
@@ -0,0 +1,91 @@
1
+ import { useColorMode } from "@docusaurus/theme-common";
2
+ import Heading from "@theme/Heading";
3
+ import clsx from "clsx";
4
+
5
+ import type { ReactElement } from "react";
6
+
7
+ import boxImage from "../../../static/img/box.png";
8
+ import boxDarkImage from "../../../static/img/box_dark.png";
9
+ import chainImage from "../../../static/img/chain.png";
10
+ import chainDarkImage from "../../../static/img/chain_dark.png";
11
+ import chartImage from "../../../static/img/chart.png";
12
+ import chartDarkImage from "../../../static/img/chart_dark.png";
13
+
14
+ import styles from "./styles.module.css";
15
+
16
+ interface FeatureItem {
17
+ title: string;
18
+ img: string;
19
+ imgDark: string;
20
+ description: ReactElement;
21
+ }
22
+
23
+ const FeatureList: FeatureItem[] = [
24
+ {
25
+ title: "Highly secure",
26
+ img: boxImage as string,
27
+ imgDark: boxDarkImage as string,
28
+ description: (
29
+ <>
30
+ Our Ethereum smart contracts enforce correct execution. Votes cannot be faked, censored, double-counted, or
31
+ tampered with.
32
+ </>
33
+ ),
34
+ },
35
+ {
36
+ title: "Protects privacy",
37
+ img: chainImage as string,
38
+ imgDark: chainDarkImage as string,
39
+ description: (
40
+ <>
41
+ Votes are encrypted before submitting them on-chain to ensure individual privacy is preserved throughout the
42
+ voting process.
43
+ </>
44
+ ),
45
+ },
46
+ {
47
+ title: "Powered by zk-SNARKs",
48
+ img: chartImage as string,
49
+ imgDark: chartDarkImage as string,
50
+ description: (
51
+ <>
52
+ Vote tallying happens off-chain but ZK-proofs are submitted and verified on-chain, which guarantees votes are
53
+ counted correctly without revealing the individual votes.
54
+ </>
55
+ ),
56
+ },
57
+ ];
58
+
59
+ const Feature = ({ title, img, imgDark, description }: FeatureItem) => {
60
+ const { isDarkTheme } = useColorMode();
61
+
62
+ return (
63
+ <div className={clsx("col col--4")}>
64
+ <div className="text--center">
65
+ <img alt={title} className={styles.featureImg} src={isDarkTheme ? imgDark : img} />
66
+ </div>
67
+
68
+ <div className="text--center padding-horiz--md">
69
+ <Heading as="h3" className={styles.featureTitle}>
70
+ {title}
71
+ </Heading>
72
+
73
+ <p>{description}</p>
74
+ </div>
75
+ </div>
76
+ );
77
+ };
78
+
79
+ const HomepageFeatures = (): ReactElement => (
80
+ <section className={styles.features}>
81
+ <div className="container">
82
+ <div className="row">
83
+ {FeatureList.map((data) => (
84
+ <Feature key={data.title} {...data} />
85
+ ))}
86
+ </div>
87
+ </div>
88
+ </section>
89
+ );
90
+
91
+ export default HomepageFeatures;
@@ -0,0 +1,17 @@
1
+ .features {
2
+ display: flex;
3
+ align-items: center;
4
+ padding: 2rem 0;
5
+ width: 100%;
6
+ font-size: 1.1rem;
7
+ }
8
+
9
+ .featureImg {
10
+ width: 200px;
11
+ }
12
+
13
+ .featureTitle {
14
+ text-decoration: underline;
15
+ text-decoration-color: var(--ifm-link-color);
16
+ text-underline-offset: 0.5rem;
17
+ }
@@ -0,0 +1,74 @@
1
+ import { useColorMode } from "@docusaurus/theme-common";
2
+
3
+ import IconDiscord from "../../icons/IconDiscord";
4
+ import IconGithub from "../../icons/IconGithub";
5
+ import IconWebsite from "../../icons/IconWebsite";
6
+
7
+ import styles from "./styles.module.css";
8
+
9
+ interface ProjectLinks {
10
+ website?: string;
11
+ github?: string;
12
+ discord?: string;
13
+ }
14
+
15
+ interface ProjectCardProps {
16
+ name: string;
17
+ description: string;
18
+ hackathon?: string;
19
+ status?: string;
20
+ links: ProjectLinks;
21
+ }
22
+
23
+ const ProjectCard: React.FC<ProjectCardProps> = ({
24
+ description,
25
+ hackathon = "",
26
+ links,
27
+ name,
28
+ status = "",
29
+ }: ProjectCardProps) => {
30
+ const categories = hackathon ? [hackathon] : [status];
31
+ const { colorMode } = useColorMode();
32
+
33
+ return (
34
+ <div className={`${styles.card} ${styles[colorMode]}`}>
35
+ <div className={styles.cardTags}>
36
+ {categories.map((category) => (
37
+ <span key={category} className={styles.tag}>
38
+ {category}
39
+ </span>
40
+ ))}
41
+ </div>
42
+
43
+ <div className={styles.cardBody}>
44
+ <h2 className={styles.cardTitle}>{name}</h2>
45
+
46
+ <p className={styles.cardDescription}>{description}</p>
47
+ </div>
48
+
49
+ {(links.website || links.github || links.discord) && (
50
+ <div className={styles.cardFooter}>
51
+ {links.github && (
52
+ <a aria-label="GitHub" href={links.github} rel="noopener noreferrer" target="_blank">
53
+ <IconGithub />
54
+ </a>
55
+ )}
56
+
57
+ {links.website && (
58
+ <a aria-label="Website" href={links.website} rel="noopener noreferrer" target="_blank">
59
+ <IconWebsite />
60
+ </a>
61
+ )}
62
+
63
+ {links.discord && (
64
+ <a aria-label="Discord" href={links.discord} rel="noopener noreferrer" target="_blank">
65
+ <IconDiscord />
66
+ </a>
67
+ )}
68
+ </div>
69
+ )}
70
+ </div>
71
+ );
72
+ };
73
+
74
+ export default ProjectCard;
@@ -0,0 +1,77 @@
1
+ .card {
2
+ border-radius: 18px;
3
+ padding: 34px;
4
+ width: 100%;
5
+ height: 100%;
6
+ display: flex;
7
+ flex-direction: column;
8
+ transition: border-color 0.3s ease;
9
+ }
10
+
11
+ .card.light {
12
+ background-color: var(--ifm-color-gray-100);
13
+ border: 1px solid var(--ifm-color-gray-300);
14
+ color: var(--ifm-color-gray-900);
15
+ }
16
+
17
+ .card.dark {
18
+ background-color: var(--ifm-color-gray-900);
19
+ border: 1px solid var(--ifm-color-gray-800);
20
+ color: var(--ifm-color-gray-100);
21
+ }
22
+
23
+ .card:hover {
24
+ border-color: var(--ifm-color-primary);
25
+ }
26
+
27
+ .cardTags {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ gap: 8px;
31
+ margin-bottom: 2rem;
32
+ }
33
+
34
+ .tag {
35
+ border: 1px solid var(--ifm-color-gray-600);
36
+ border-radius: 9999px;
37
+ padding: 0.25rem 0.75rem;
38
+ font-size: 0.875rem;
39
+ }
40
+
41
+ .cardBody {
42
+ flex-grow: 1;
43
+ }
44
+
45
+ .cardTitle {
46
+ font-size: 24px;
47
+ line-height: 33px;
48
+ margin-bottom: 1rem;
49
+ }
50
+
51
+ .cardDescription {
52
+ font-size: 14px;
53
+ line-height: 22.4px;
54
+ }
55
+
56
+ .cardFooter {
57
+ display: flex;
58
+ gap: 1rem;
59
+ padding-top: 1rem;
60
+ }
61
+
62
+ .cardFooter a {
63
+ color: inherit;
64
+ text-decoration: none;
65
+ }
66
+
67
+ .cardFooter svg {
68
+ width: 24px;
69
+ height: 24px;
70
+ }
71
+
72
+ @media (max-width: 768px) {
73
+ .cardFooter svg {
74
+ width: 16px;
75
+ height: 16px;
76
+ }
77
+ }
@@ -0,0 +1,218 @@
1
+ import { useColorMode } from "@docusaurus/theme-common";
2
+ import React, { useState, useEffect, useCallback } from "react";
3
+
4
+ import projects from "../../content/projects.json";
5
+ import { getProjectsByFilter, getUniqueHackathons, getUniqueStatuses } from "../../utils/getProjectsByFilter";
6
+ import ActionCard from "../ActionCard";
7
+ import ProjectCard from "../ProjectCard";
8
+
9
+ import styles from "./styles.module.css";
10
+
11
+ interface Project {
12
+ name: string;
13
+ description: string;
14
+ hackathon: string | null;
15
+ status: string;
16
+ links: {
17
+ website?: string;
18
+ github?: string;
19
+ discord?: string;
20
+ };
21
+ }
22
+
23
+ const typedProjects = projects as unknown as Project[];
24
+
25
+ const sortedProjects = typedProjects.slice().sort((a, b) => a.name.localeCompare(b.name));
26
+
27
+ function chunkArray(array: Project[]): Project[][] {
28
+ const result = [];
29
+ for (let i = 0; i < array.length; i += 9) {
30
+ const chunk = array.slice(i, i + 9);
31
+ result.push(chunk);
32
+ }
33
+ return result.length === 0 ? [[]] : result;
34
+ }
35
+
36
+ const typedGetProjectsByFilter = getProjectsByFilter as (
37
+ projects: Project[],
38
+ filters: { hackathon: string; status: string },
39
+ ) => Project[];
40
+ const typedGetUniqueHackathons = getUniqueHackathons as (projects: Project[]) => string[];
41
+ const typedGetUniqueStatuses = getUniqueStatuses as (projects: Project[]) => string[];
42
+
43
+ const ProjectList: React.FC = () => {
44
+ const [filteredProjects, setFilteredProjects] = useState<Project[][]>(chunkArray(sortedProjects));
45
+ const [selectedHackathon, setSelectedHackathon] = useState("");
46
+ const [selectedStatus, setSelectedStatus] = useState("");
47
+ const [currentPage, setCurrentPage] = useState(0);
48
+ const { colorMode } = useColorMode();
49
+
50
+ const filterProjects = useCallback(() => {
51
+ const filtered = typedGetProjectsByFilter(sortedProjects, {
52
+ hackathon: selectedHackathon,
53
+ status: selectedStatus,
54
+ });
55
+ setFilteredProjects(chunkArray(filtered));
56
+ setCurrentPage(0);
57
+ }, [selectedHackathon, selectedStatus]);
58
+
59
+ useEffect(() => {
60
+ filterProjects();
61
+ }, [filterProjects]);
62
+
63
+ const hackathons = typedGetUniqueHackathons(sortedProjects);
64
+ const statuses = typedGetUniqueStatuses(sortedProjects);
65
+
66
+ return (
67
+ <div className={`${styles.projectList} ${styles[colorMode]}`}>
68
+ <div className={styles.filters}>
69
+ <div className={styles.filterGroup}>
70
+ <h3>Status</h3>
71
+
72
+ <div className={styles.filterOptions}>
73
+ <button
74
+ className={selectedStatus === "" ? styles.active : ""}
75
+ type="button"
76
+ onClick={() => {
77
+ setSelectedStatus("");
78
+ }}
79
+ >
80
+ All
81
+ </button>
82
+
83
+ {statuses.map((status) => (
84
+ <button
85
+ key={status}
86
+ className={selectedStatus === status ? styles.active : ""}
87
+ type="button"
88
+ onClick={() => {
89
+ setSelectedStatus(status);
90
+ }}
91
+ >
92
+ {status}
93
+ </button>
94
+ ))}
95
+ </div>
96
+ </div>
97
+
98
+ <div className={styles.filterGroup}>
99
+ <h3>Hackathon</h3>
100
+
101
+ <div className={styles.filterOptions}>
102
+ <button
103
+ className={selectedHackathon === "" ? styles.active : ""}
104
+ type="button"
105
+ onClick={() => {
106
+ setSelectedHackathon("");
107
+ }}
108
+ >
109
+ All
110
+ </button>
111
+
112
+ {hackathons.map((hackathon) => (
113
+ <button
114
+ key={hackathon}
115
+ className={selectedHackathon === hackathon ? styles.active : ""}
116
+ type="button"
117
+ onClick={() => {
118
+ setSelectedHackathon(hackathon);
119
+ }}
120
+ >
121
+ {hackathon}
122
+ </button>
123
+ ))}
124
+ </div>
125
+ </div>
126
+ </div>
127
+
128
+ <div className={styles.projectsGrid}>
129
+ {filteredProjects[currentPage]?.length > 0 ? (
130
+ filteredProjects[currentPage].map((project) => (
131
+ <ProjectCard
132
+ key={project.name}
133
+ description={project.description}
134
+ hackathon={project.hackathon || undefined}
135
+ links={project.links}
136
+ name={project.name}
137
+ status={project.status}
138
+ />
139
+ ))
140
+ ) : (
141
+ <div className={styles.noResults}>
142
+ <p>
143
+ <strong>No results found.</strong>
144
+ </p>
145
+
146
+ <p>No projects matching these filters. Try changing your search.</p>
147
+ </div>
148
+ )}
149
+ </div>
150
+
151
+ {filteredProjects.length > 1 && (
152
+ <div className={styles.pagination}>
153
+ <span
154
+ className={`${styles.paginationArrow} ${currentPage === 0 ? styles.disabled : ""}`}
155
+ role="button"
156
+ tabIndex={0}
157
+ onClick={() => {
158
+ setCurrentPage((prev) => Math.max(0, prev - 1));
159
+ }}
160
+ onKeyDown={(e) => {
161
+ if (e.key === "Enter" || e.key === " ") {
162
+ setCurrentPage((prev) => Math.max(0, prev - 1));
163
+ }
164
+ }}
165
+ >
166
+
167
+ </span>
168
+
169
+ {filteredProjects.map((_, index) => (
170
+ <span
171
+ key={`page-${String(index)}`}
172
+ className={`${styles.paginationNumber} ${currentPage === index ? styles.active : ""}`}
173
+ role="button"
174
+ tabIndex={0}
175
+ onClick={() => {
176
+ setCurrentPage(index);
177
+ }}
178
+ onKeyDown={(e) => {
179
+ if (e.key === "Enter" || e.key === " ") {
180
+ setCurrentPage((prev) => Math.max(0, prev - 1));
181
+ }
182
+ }}
183
+ >
184
+ {index + 1}
185
+ </span>
186
+ ))}
187
+
188
+ <span
189
+ className={`${styles.paginationArrow} ${currentPage === filteredProjects.length - 1 ? styles.disabled : ""}`}
190
+ role="button"
191
+ tabIndex={0}
192
+ onClick={() => {
193
+ setCurrentPage((prev) => Math.min(filteredProjects.length - 1, prev + 1));
194
+ }}
195
+ onKeyDown={(e) => {
196
+ if (e.key === "Enter" || e.key === " ") {
197
+ setCurrentPage((prev) => Math.min(filteredProjects.length - 1, prev + 1));
198
+ }
199
+ }}
200
+ >
201
+
202
+ </span>
203
+ </div>
204
+ )}
205
+
206
+ <div className={styles.actionCardContainer}>
207
+ <ActionCard
208
+ buttonText="Submit your project"
209
+ buttonUrl="https://github.com/privacy-scaling-explorations/maci/issues/new?title=Add+a+Project+to+the+Projects+Showcase"
210
+ description="We are missing your project! Add your project to this page and show your awesomeness to the world."
211
+ title="Show what you have built"
212
+ />
213
+ </div>
214
+ </div>
215
+ );
216
+ };
217
+
218
+ export default ProjectList;