From 64ff68314e36d9ea3aee63c4af33e2cc164f5037 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 15 May 2025 11:10:11 +0200 Subject: [PATCH] Added projects to use cases page --- docusaurus.config.ts | 2 - src/components/ProjectCard/index.tsx | 22 +- src/components/ProjectList/index.tsx | 135 ++-------- src/content/projects.json | 296 +++------------------- src/icons/IconTwitter.tsx | 17 ++ src/pages/projects.tsx | 2 +- src/pages/{use_cases.md => use_cases.mdx} | 21 +- src/utils/getProjectsByFilter.ts | 40 --- 8 files changed, 90 insertions(+), 445 deletions(-) create mode 100644 src/icons/IconTwitter.tsx rename src/pages/{use_cases.md => use_cases.mdx} (69%) delete mode 100644 src/utils/getProjectsByFilter.ts diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 536de2a..b8e519d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -103,8 +103,6 @@ const config: Config = { { to: '/docs/faq', label: 'FAQ', position: 'left' }, - { to: '/projects', label: 'Projects', position: 'left' }, - { href: 'https://tlsnotary.github.io/tlsn/tlsn_prover/', label: 'API', position: 'left' }, { to: '/blog', label: 'Blog', position: 'left' }, { diff --git a/src/components/ProjectCard/index.tsx b/src/components/ProjectCard/index.tsx index dfd4c42..f13dc96 100644 --- a/src/components/ProjectCard/index.tsx +++ b/src/components/ProjectCard/index.tsx @@ -3,43 +3,31 @@ import { useColorMode } from "@docusaurus/theme-common"; import IconDiscord from "../../icons/IconDiscord"; import IconGithub from "../../icons/IconGithub"; import IconWebsite from "../../icons/IconWebsite"; - +import IconTwitter from "../../icons/IconTwitter"; import styles from "./styles.module.css"; interface ProjectLinks { website?: string; github?: string; discord?: string; + twitter?: string; } interface ProjectCardProps { name: string; description: string; - hackathon?: string; - status?: string; links: ProjectLinks; } const ProjectCard: React.FC = ({ description, - hackathon = "", links, name, - status = "", }: ProjectCardProps) => { - const categories = hackathon ? [hackathon] : [status]; const { colorMode } = useColorMode(); return (
-
- {categories.map((category) => ( - - {category} - - ))} -
-

{name}

@@ -65,6 +53,12 @@ const ProjectCard: React.FC = ({ )} + + {links.twitter && ( + + + + )}
)}
diff --git a/src/components/ProjectList/index.tsx b/src/components/ProjectList/index.tsx index eaad1ea..05e7cfc 100644 --- a/src/components/ProjectList/index.tsx +++ b/src/components/ProjectList/index.tsx @@ -2,7 +2,6 @@ import { useColorMode } from "@docusaurus/theme-common"; import React, { useState, useEffect, useCallback } from "react"; import projects from "../../content/projects.json"; -import { getProjectsByFilter, getUniqueHackathons, getUniqueStatuses } from "../../utils/getProjectsByFilter"; import ActionCard from "../ActionCard"; import ProjectCard from "../ProjectCard"; @@ -11,12 +10,11 @@ import styles from "./styles.module.css"; interface Project { name: string; description: string; - hackathon: string | null; - status: string; links: { website?: string; github?: string; discord?: string; + twitter?: string; }; } @@ -33,122 +31,32 @@ function chunkArray(array: Project[]): Project[][] { return result.length === 0 ? [[]] : result; } -const typedGetProjectsByFilter = getProjectsByFilter as ( - projects: Project[], - filters: { hackathon: string; status: string }, -) => Project[]; -const typedGetUniqueHackathons = getUniqueHackathons as (projects: Project[]) => string[]; -const typedGetUniqueStatuses = getUniqueStatuses as (projects: Project[]) => string[]; - const ProjectList: React.FC = () => { - const [filteredProjects, setFilteredProjects] = useState(chunkArray(sortedProjects)); - const [selectedHackathon, setSelectedHackathon] = useState(""); - const [selectedStatus, setSelectedStatus] = useState(""); + const [projects, setProjects] = useState(chunkArray(sortedProjects)); const [currentPage, setCurrentPage] = useState(0); const { colorMode } = useColorMode(); - const filterProjects = useCallback(() => { - const filtered = typedGetProjectsByFilter(sortedProjects, { - hackathon: selectedHackathon, - status: selectedStatus, - }); - setFilteredProjects(chunkArray(filtered)); - setCurrentPage(0); - }, [selectedHackathon, selectedStatus]); - useEffect(() => { - filterProjects(); - }, [filterProjects]); - - const hackathons = typedGetUniqueHackathons(sortedProjects); - const statuses = typedGetUniqueStatuses(sortedProjects); + setProjects(chunkArray(sortedProjects)); + setCurrentPage(0); + }, []); return (
-
-
-

Status

- -
- - - {statuses.map((status) => ( - - ))} -
-
- -
-

Hackathon

- -
- - - {hackathons.map((hackathon) => ( - - ))} -
-
-
-
- {filteredProjects[currentPage]?.length > 0 ? ( - filteredProjects[currentPage].map((project) => ( + { + projects[currentPage].map((project) => ( )) - ) : ( -
-

- No results found. -

- -

No projects matching these filters. Try changing your search.

-
- )} + }
- {filteredProjects.length > 1 && ( + {projects.length > 1 && (
{ ← - {filteredProjects.map((_, index) => ( + {projects.map((_, index) => ( { ))} { - setCurrentPage((prev) => Math.min(filteredProjects.length - 1, prev + 1)); + setCurrentPage((prev) => Math.min(projects.length - 1, prev + 1)); }} onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { - setCurrentPage((prev) => Math.min(filteredProjects.length - 1, prev + 1)); + setCurrentPage((prev) => Math.min(projects.length - 1, prev + 1)); } }} > @@ -205,12 +113,21 @@ const ProjectList: React.FC = () => {
+ + {/*
+ +
*/}
); }; diff --git a/src/content/projects.json b/src/content/projects.json index e9a8ebd..52309f9 100644 --- a/src/content/projects.json +++ b/src/content/projects.json @@ -1,294 +1,60 @@ [ { - "name": "clr.fund", - "description": "a protocol for efficiently allocating funds to public goods that benefit the Ethereum Network.", - "hackathon": null, - "status": "Production", + "name": "ZKP2P", + "description": "Completely peer-to-peer leveraging everyday payment networks", "links": { - "website": "https://clr.fund/", - "github": "https://github.com/clrfund/monorepo/", - "discord": "https://discord.com/invite/ZnsYPV6dCv" + "website": "https://zkp2p.xyz", + "twitter": "https://x.com/zkp2p", + "github": "https://github.com/zkp2p" } }, { - "name": "MACI_QF in Allo", - "description": "a MACI Quadratic Funding strategy to be used within Gitcoin's Allo Protocol.", - "hackathon": null, - "status": "Production", + "name": "OpenLayer (Jomo)", + "description": "Scale web3 through optimistic verifiable computation", "links": { - "github": "https://github.com/gitcoinco/MACI_QF" + "website": "https://www.openlayer.tech/", + "twitter": "https://x.com/OpenLayerHQ", + "github": "https://github.com/0xJomo" } }, { - "name": "DoraHacks Light-Weight MACI", - "description": "DoraHacks MACI is a light-weight implementation of MACI.", - "hackathon": null, - "status": "Production", + "name": "Opacity Labs", + "description": "The ZKP protocol for proving anything without revealing the details", "links": { - "github": "https://github.com/dorahacksglobal/qf-maci", - "website": "https://dorahacks.io/blog/guides/maci-qv-guide/" + "website": "https://www.opacity.network/", + "twitter": "https://warpcast.com/~/channel/opacity" } }, { - "name": "MACI Platform", - "description": "a platform that allows to run different types of vote and funding rounds using MACI.", - "hackathon": null, - "status": "Production", + "name": "vlayer", + "description": "Empowering web3 with Verifiable Data", "links": { - "github": "https://github.com/privacy-scaling-explorations/maci-platform", - "website": "https://maci-platform.vercel.app/" + "website": "https://www.vlayer.xyz", + "twitter": "https://x.com/vlayer_xyz", + "github": "https://github.com/vlayer-xyz" } }, { - "name": "MACI Starter Kit", - "description": "a starter kit for quickly prototyping applications with MACI.", - "hackathon": null, - "status": "Utility", + "name": "KapWork", + "description": "Automated invoice verification for Factoring Companies", "links": { - "github": "https://github.com/yashgo0018/maci-wrapper" + "website": "https://kapwork.com/", + "github": "https://github.com/antojoseph/ZeroTrustBounty" } }, { - "name": "Voto", - "description": "Voto is an on-chain censorship-resistant anonymous voting solution built on decentralised identities.", - "hackathon": "ETHBerlin 2024", - "status": "Hackathon", + "name": "Keyring Network", + "description": "Institutional-grade compliance", "links": { - "website": "https://projects.ethberlin.org/submissions/334", - "github": "https://github.com/Vote-tech/voto-tech" + "website": "https://keyring.network", + "twitter": "https://x.com/KeyringNetwork" } }, { - "name": "0xFeedback", - "description": "A privacy preserving B2C Survey Platform.", - "hackathon": "ETHDam 2024", - "status": "Hackathon", + "name": "Usher Labs", + "description": "Secure and verifiable data pipelines between traditional systems and blockchains", "links": { - "website": "https://taikai.network/cryptocanal/hackathons/ethdam2024/projects/cluyuw0j200y3yz01yjjd4rap/idea" - } - }, - { - "name": "StealthAlloc", - "description": "MACI as an Allo protocol Quadratic Funding Strategy for collusion-resistant, privacy-protecting allocations.", - "hackathon": "ETHDam 2024", - "status": "Hackathon", - "links": { - "website": "https://taikai.network/cryptocanal/hackathons/ethdam2024/projects/cluxse8cz00pjz3010wbq3thf/idea", - "github": "https://github.com/tse-lao/ethdam24" - } - }, - { - "name": "NEVO", - "description": "MACI's anti-collusion voting system with Near Protocol's Cross-Chain Signatures.", - "hackathon": "ETHDam 2024", - "status": "Hackathon", - "links": { - "website": "https://taikai.network/cryptocanal/hackathons/ethdam2024/projects/cluz9746q01c2z301tupriiuq/idea", - "github": "https://github.com/atahanyild/NEVO" - } - }, - { - "name": "EtherTale", - "description": "a decentralized, interactive fiction platform powered by AI.", - "hackathon": "ETHTaipei 2024", - "status": "Hackathon", - "links": { - "website": "https://taikai.network/ethtaipei/hackathons/hackathon-2024/projects/clu501yr50l1ey501e65jj8nr", - "github": "https://github.com/saurabhchalke/EtherTale" - } - }, - { - "name": "Demokratia", - "description": "Offers infrastructure to create and seamlessly integrate personalised AI agents for DAO voting.", - "hackathon": "ETHGlobal London 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/demokratia-c7bab", - "github": "https://github.com/ConfidentiDemokratia" - } - }, - { - "name": "SkaffoldMACI+ZkOSIOS", - "description": "User-friendly voting system UI (powered by Skaffold) for sports fans using MACI for enhanced security and privacy.", - "hackathon": "ETHGlobal London 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/skaffoldmaci-zkosios-2no6q", - "github": "https://github.com/GaetanoMondelli/ETH-GLOBAL-LONDON" - } - }, - { - "name": "Vota Protocol", - "description": "a privacy-preserved fair and trustless election Voting System on Blockchain programmable for global constituencies.", - "hackathon": "ETHGlobal London 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/vota-protocol-qxf3z", - "github": "https://github.com/Vota-Protocol" - } - }, - { - "name": "Votelik Pollerin", - "description": "Sybil- and bribery-resistant polling on Farcaster, utilizing World ID and MACI.", - "hackathon": "ETHGlobal London 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/votelik-pollerin-u0dcs", - "github": "https://github.com/pauldev20/farcaster-frames-polls" - } - }, - { - "name": "Anon Vote", - "description": "an on-chain anonymous voting solution with guaranteed proof of personhood.", - "hackathon": "ETHGlobal London 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/anonvote-uc7w0", - "github": "https://github.com/gasperpre/veripoll" - } - }, - { - "name": "MACI Subgraph", - "description": "a subgraph to index data from MACI protocol to serve as data layer for frontend integration", - "hackathon": "ETHGlobal Circuit Breaker 2024", - "status": "Hackathon", - "links": { - "website": "https://ethglobal.com/showcase/maci-subgraph-89h7c" - } - }, - { - "name": "Quadratic Dollar Homepage", - "description": "The Quadratic Dollar Homepage is a spin on the Million Dollar Homepage.", - "hackathon": null, - "status": "Unmaintained", - "links": { - "github": "https://github.com/privacy-scaling-explorations/qdh", - "website": "https://quadratic.page/" - } - }, - { - "name": "PriVote", - "description": "An open-source, decentralized voting platform that uses MACI for privacy and offers various authentication methods for secure, private polling.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "github": "https://github.com/Privote-project" - } - }, - { - "name": "PolyVote", - "description": "An end-to-end private voting service using MPC, ZK and AI to recommend and process votes.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "github": "https://github.com/ElectionZap/eth-singapore" - } - }, - { - "name": "ChillVille", - "description": "A private onchain voting system with sybil resistance by combining MACI and zkTLS.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://eth-sg.vercel.app/", - "github": "https://github.com/wasabijiro/ChillVille" - } - }, - { - "name": "MACPI", - "description": "A reliable DAO voting infrastructure for next billion users", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://maci-tap.vercel.app/", - "github": "https://github.com/0xhardman/tap-maci" - } - }, - { - "name": "Silent Wars", - "description": "A telegram mini-app guild based game with resource collection and voting.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://2024-eth-singapore-5k28.vercel.app/", - "github": "https://github.com/taijusanagi/2024-eth-singapore" - } - }, - { - "name": "Judg3", - "description": "A next-generation voting system that leverages the power of consensus over your conscious mind.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "github": "https://github.com/team-somehow/judg3" - } - }, - { - "name": "EZKPoll", - "description": "A polling system utilizing MACI to empower ZK on polling and A/B testing.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://ezkpoll.onrender.com/", - "github": "https://github.com/abcd5251/EzkPoll" - } - }, - { - "name": "Geist", - "description": "A Decentralized Autonomous Website (DAW) builder that enables censorship-resistant, trustless deployments and governance for DAOs through private previews, zk-proof-based deployments, and anti-collusion voting.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://gateway.geist.network/", - "github": "https://github.com/debuggingfuture/geist" - } - }, - { - "name": "Sniper", - "description": "An AI companion designed to improve personal productivity and growth.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "github": "https://github.com/MusubiLabs/sniper" - } - }, - { - "name": "zkElect", - "description": "A blockchain-based platform using zk-SNARKs and MACI for secure, anonymous, and transparent voting, preventing tampering, coercion, and bribery.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "github": "https://github.com/anvats/zkElect" - } - }, - { - "name": "clr.wiki", - "description": "Collusion-resistant information dispute resolution tool using MACI.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://www.cl3r.wiki/", - "github": "https://github.com/seigneur/clr-wiki" - } - }, - { - "name": "DAOTown", - "description": "The project streamlines DAO activities, governance, and tokenomics with decentralized infrastructure.", - "hackathon": "ETHGlobal Singapore 2024", - "status": "Hackathon", - "links": { - "website": "https://eth-global-sg.vercel.app/", - "github": "https://github.com/MukulKolpe/ETHGlobalSG" - } - }, - { - "name": "Pixel Game Assistant", - "description": "PGA is a tool that helps Pixel Game players to give community feedback on game features.", - "hackathon": null, - "status": "Production", - "links": { - "website": "https://voting.guildpal.work/", - "github": null + "website": "https://www.usher.so/" } } -] +] \ No newline at end of file diff --git a/src/icons/IconTwitter.tsx b/src/icons/IconTwitter.tsx new file mode 100644 index 0000000..373482f --- /dev/null +++ b/src/icons/IconTwitter.tsx @@ -0,0 +1,17 @@ +import React from "react"; + +interface IconDiscordProps extends React.SVGProps { + size?: number; +} + +const IconTwitter: React.FC = ({ size = 24, ...props }) => ( + + + + +); + +export default IconTwitter; diff --git a/src/pages/projects.tsx b/src/pages/projects.tsx index 86827f2..4d38a06 100644 --- a/src/pages/projects.tsx +++ b/src/pages/projects.tsx @@ -27,7 +27,7 @@ const Projects: React.FC = () => (
- +
diff --git a/src/pages/use_cases.md b/src/pages/use_cases.mdx similarity index 69% rename from src/pages/use_cases.md rename to src/pages/use_cases.mdx index 77caca8..cd7ffc7 100644 --- a/src/pages/use_cases.md +++ b/src/pages/use_cases.mdx @@ -1,10 +1,9 @@ --- -title: my hello page title -description: my hello page description hide_table_of_contents: true --- import styles from './index.module.css'; import Link from '@docusaurus/Link'; +import ProjectsList from "../components/ProjectList"; # Use cases @@ -26,16 +25,10 @@ You can use TLSNotary for: ...and more! - +## Projects using TLSNotary -## Share what you're building with TLSNotary - -Are you using TLSNotary in your project? Reach out on Discord and tell us about your work! - -
- - Join our Discord - -
\ No newline at end of file +
+
+ +
+
diff --git a/src/utils/getProjectsByFilter.ts b/src/utils/getProjectsByFilter.ts deleted file mode 100644 index 9ba1fed..0000000 --- a/src/utils/getProjectsByFilter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type Projects from "../content/projects.json"; - -/** - * Filters projects based on hackathon and status criteria. - * @param projects An array of objects where each object represents a project. - * @param filter An object containing optional hackathon and status filter criteria. - * @returns An array of projects that match the given filter criteria. - */ -export function getProjectsByFilter( - projects: typeof Projects, - filter: { hackathon?: string; status?: string }, -): typeof Projects { - return projects.filter((project) => { - const hackathonMatch = !filter.hackathon || project.hackathon === filter.hackathon; - const statusMatch = !filter.status || project.status === filter.status; - return hackathonMatch && statusMatch; - }); -} - -/** - * Extracts unique hackathons from the projects list. - * @param projects An array of objects where each object represents a project. - * @returns An array of strings, where each string is a unique hackathon from across all projects. - */ -export function getUniqueHackathons(projects: typeof Projects): string[] { - const hackathons = projects - .map((project) => project.hackathon) - .filter((hackathon): hackathon is string => hackathon !== null && hackathon !== ""); - return Array.from(new Set(hackathons)); -} - -/** - * Extracts unique statuses from the projects list. - * @param projects An array of objects where each object represents a project. - * @returns An array of strings, where each string is a unique status from across all projects. - */ -export function getUniqueStatuses(projects: typeof Projects): string[] { - const statuses = projects.map((project) => project.status); - return Array.from(new Set(statuses)); -}