From c0b5f6faacd3407b6f8df7ead0f53dde7265298b Mon Sep 17 00:00:00 2001 From: Kalidou Diagne Date: Wed, 6 Nov 2024 01:59:28 +0100 Subject: [PATCH] project by category --- components/project/project-card.tsx | 16 +++++---- components/project/project-filters-bar.tsx | 16 +++++---- components/project/project-link.tsx | 2 -- components/project/project-list.tsx | 42 ++++++++++++---------- components/project/project-result-bar.tsx | 2 +- config/site.ts | 2 +- data/projects/anon-aadhaar.ts | 21 ++++++----- data/projects/anon-klub.ts | 9 +++-- data/projects/bandada.ts | 15 +++++--- data/projects/channel-4.ts | 1 - data/projects/chiquito.ts | 9 +++-- data/projects/coco.ts | 1 - data/projects/cryptkeeper.ts | 1 - data/projects/discreetly.ts | 1 - data/projects/dsl-working-group.ts | 1 - data/projects/ecip-halo2.ts | 9 +++-- data/projects/eigen-trust.ts | 1 - data/projects/excubiae.ts | 9 +++-- data/projects/interep.ts | 1 - data/projects/jubmoji.ts | 1 - data/projects/maci-platform.ts | 11 ++++-- data/projects/maci.ts | 17 +++++---- data/projects/mopro.ts | 9 +++-- data/projects/mpc-stats.ts | 6 ++-- data/projects/mpc.ts | 9 +++-- data/projects/nfctap.ts | 1 - data/projects/openpassport.ts | 9 +++-- data/projects/p0tion.ts | 9 +++-- data/projects/p256.ts | 1 - data/projects/pollen-labs.ts | 1 - data/projects/powers-of-tau.ts | 9 +++-- data/projects/pse-security.ts | 1 - data/projects/rln.ts | 1 - data/projects/semaphore.ts | 13 ++++--- data/projects/summa.ts | 1 - data/projects/tlsn.ts | 9 +++-- data/projects/trusted-setups.ts | 9 +++-- data/projects/unirep-protocol.ts | 1 - data/projects/voice-deck.ts | 1 - data/projects/wax.ts | 9 +++-- data/projects/zk-email.ts | 9 +++-- data/projects/zk-id.ts | 1 - data/projects/zk-kit.ts | 37 ++++++++++--------- data/projects/zkevm-community.ts | 1 - data/projects/zkitter.ts | 1 - data/projects/zkml.ts | 1 - data/projects/zkopru.ts | 1 - data/projects/zkp2p.ts | 9 +++-- lib/types.ts | 17 +++++++-- state/useProjectFiltersState.ts | 16 ++++----- 50 files changed, 240 insertions(+), 140 deletions(-) diff --git a/components/project/project-card.tsx b/components/project/project-card.tsx index 1cc60de..7381cfc 100644 --- a/components/project/project-card.tsx +++ b/components/project/project-card.tsx @@ -40,7 +40,7 @@ const tagCardVariants = cva( } ) const projectCardVariants = cva( - "flex cursor-pointer flex-col overflow-hidden rounded-lg transition duration-200 ease-in border border-transparent hover:border-anakiwa-500", + "flex flex-col overflow-hidden rounded-lg transition duration-200 ease-in border border-transparent", { variants: { showLinks: { @@ -77,9 +77,6 @@ export default function ProjectCard({ "group", projectCardVariants({ showLinks, border, className }) )} - onClick={() => { - router.push(`/projects/${id}`) - }} > {showBanner && (
@@ -88,7 +85,7 @@ export default function ProjectCard({ alt={`${name} banner`} width={1200} height={630} - className="min-h-[160px] w-full overflow-hidden rounded-t-lg border-none object-cover" + className="h-[160px] w-full overflow-hidden rounded-t-lg border-none object-cover" /> {!image && ( @@ -99,7 +96,14 @@ export default function ProjectCard({ )}
-

{name}

+

{ + router.push(`/projects/${id}`) + }} + > + {name} +

{projectContent?.tldr && (

diff --git a/components/project/project-filters-bar.tsx b/components/project/project-filters-bar.tsx index fd183ea..7284d48 100644 --- a/components/project/project-filters-bar.tsx +++ b/components/project/project-filters-bar.tsx @@ -16,6 +16,8 @@ import { useDebounce } from "react-use" import { IThemeStatus, IThemesButton, LangProps } from "@/types/common" import { + ProjectCategories, + ProjectCategory, ProjectSectionLabelMapping, ProjectSections, ProjectStatus, @@ -134,8 +136,8 @@ export default function ProjectFiltersBar({ lang }: LangProps["params"]) { queryString, activeFilters, onFilterProject, - currentSection, - setCurrentSection, + currentCategory, + setCurrentCategory, } = useProjectFiltersState((state) => state) useEffect(() => { @@ -309,25 +311,25 @@ export default function ProjectFiltersBar({ lang }: LangProps["params"]) {

setCurrentSection(null)} + onClick={() => setCurrentCategory(null)} > All
- {ProjectSections.map((key) => { + {ProjectCategories.map((key) => { return (
setCurrentSection(key)} + onClick={() => setCurrentCategory(key as ProjectCategory)} > {key}
diff --git a/components/project/project-link.tsx b/components/project/project-link.tsx index 1d65f7a..a53636e 100644 --- a/components/project/project-link.tsx +++ b/components/project/project-link.tsx @@ -1,7 +1,5 @@ "use client" -import Image from "next/image" - import { ProjectLinkWebsite } from "@/lib/types" import { ProjectLinkIconMap } from "./project-links" diff --git a/components/project/project-list.tsx b/components/project/project-list.tsx index d537774..7455c31 100644 --- a/components/project/project-list.tsx +++ b/components/project/project-list.tsx @@ -8,6 +8,9 @@ import { cva } from "class-variance-authority" import { LangProps } from "@/types/common" import { + ProjectCategories, + ProjectCategory, + ProjectCategoryLabelMapping, ProjectSection, ProjectSectionDescriptionMapping, ProjectSectionLabelMapping, @@ -47,7 +50,7 @@ export const ProjectList = ({ lang }: LangProps["params"]) => { const [isManualScroll, setIsManualScroll] = useState(false) const [isMounted, setIsMounted] = useState(false) - const { projects, currentSection } = useProjectFiltersState((state) => state) + const { projects, currentCategory } = useProjectFiltersState((state) => state) const noItems = projects?.length === 0 @@ -95,17 +98,17 @@ export const ProjectList = ({ lang }: LangProps["params"]) => { // loading state skeleton if (!isMounted) { return ( -
-
+
+
-
+
-
+
-
+
@@ -114,33 +117,34 @@ export const ProjectList = ({ lang }: LangProps["params"]) => { if (noItems) return + console.log("ProjectCategories", ProjectCategories) + return (
- {ProjectSections.map((section, index) => { + {ProjectCategories.map((category: any, index: number) => { const sectionProjects = - projects.filter( - (project) => - project.section?.toLowerCase() === section?.toLowerCase() - ) ?? [] + projects.filter((project) => project.category === category) ?? [] const hasProjectsForSection = sectionProjects.length > 0 const sectionTitle = - ProjectSectionLabelMapping[section as ProjectSection] + ProjectCategoryLabelMapping[category as ProjectCategory] + const sectionDescription = - ProjectSectionDescriptionMapping[section as ProjectSection] + // @ts-ignore + ProjectSectionDescriptionMapping[category as any] // todo: filter by project section if (!hasProjectsForSection) return null - const showTitle = ["archived"].includes(section) + const showTitle = ["archived"].includes(category) return (
{ "flex w-full flex-col", hasProjectsForSection ? "gap-6 md:gap-10" : "gap-2", showTitle - ? currentSection == null && "pt-[120px]" - : index > 0 && currentSection == null + ? currentCategory == null && "pt-[120px]" + : index > 0 && currentCategory == null ? "pt-10" : "" )} diff --git a/components/project/project-result-bar.tsx b/components/project/project-result-bar.tsx index 00c2984..e0996a8 100644 --- a/components/project/project-result-bar.tsx +++ b/components/project/project-result-bar.tsx @@ -13,7 +13,7 @@ import { useTranslation } from "@/app/i18n/client" import { CategoryTag } from "../ui/categoryTag" import { Dropdown } from "../ui/dropdown" -const labelClass = "h-5 text-xs text-base md:h-6 text-slate-900/70 md:text-lg" +const labelClass = "h-5 text-xs text-base md:h-6 text-slate-900/70 md:text-sm" export const ProjectResultBar = ({ lang }: LangProps["params"]) => { const { t } = useTranslation(lang, "common") diff --git a/config/site.ts b/config/site.ts index 1484fd1..e83623a 100644 --- a/config/site.ts +++ b/config/site.ts @@ -30,5 +30,5 @@ export const siteConfig = { addGithubResource: "https://github.com/privacy-scaling-explorations/website-v2/blob/main/app/%5Blang%5D/content/resources.md", editProjectPage: (id: string, locale = "en") => - `https://github.com/privacy-scaling-explorations/pse.dev/blob/main/app/i18n/locales/${locale}/projects/${id}.json`, + `https://github.com/privacy-scaling-explorations/pse.dev/blob/main/data/projects/${id}.ts`, } diff --git a/data/projects/anon-aadhaar.ts b/data/projects/anon-aadhaar.ts index a739cc3..7fb018c 100644 --- a/data/projects/anon-aadhaar.ts +++ b/data/projects/anon-aadhaar.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -7,25 +12,25 @@ const content: ProjectContent = { ### Overview Anon Aadhaar is a project that allows Aadhaar ID holders to prove their Indian residency, optionally revealing some aspects of their identity while hiding the others. The project provides ZK Circuits, SDK for Javascript and Solidity, a demo application, and integrates with the PCD framework for a better developer experience. - + ### Features Anon Aadhaar is a zero knowledge protocol that let Aadhaar owners prove their identity in a privacy preserving way. Key features include: - **Selective Disclosure**: If your app request to reveal one of the field from the identity the circuit will reveal it in its output. There only four fields that could be revealed (Age > 18, Gender, State, Pincode). Note that by default the Prover will reveal nothing from the ID. -- **Nullifier**: Nullifier is a unique identifiers derived from data fields, used to prevent double-spending or duplicate proofs without revealing the actual data. -- **Timestamp**: The timestamp of the signature associated with the data is converted into a UNIX UTC format, enabling Timebased One Time Passord verification at the verifier level. - +- **Nullifier**: Nullifier is a unique identifiers derived from data fields, used to prevent double-spending or duplicate proofs without revealing the actual data. +- **Timestamp**: The timestamp of the signature associated with the data is converted into a UNIX UTC format, enabling Timebased One Time Passord verification at the verifier level. + The protocol is served through an SDK containing: - TypeScript Library: [@anon-aadhaar/core](https://www.npmjs.com/package/@anon-aadhaar/core) - Solidity Library: [@anon-aadhaar/contracts](https://www.npmjs.com/package/@anon-aadhaar/contracts) - React Library: [@anon-aadhaar/react](https://www.npmjs.com/package/@anon-aadhaar/react) - + You can play with our **mobile prover**, which offer a faster proving time: - [Anon Aadhaar React Native](https://github.com/anon-aadhaar/anon-aadhaar-react-native) We developed a prover for [Digilocker](https://www.digilocker.gov.in/), that let you generate ZKPs from official documents stored in the Digolocker App, enabling use cases with proof of degrees, UPI, driver license and more. - + ### Applications: - Quick Setup - [Website](https://anon-aadhaar-quick-setup.vercel.app/) | [GitHub](https://github.com/anon-aadhaar/quick-setup) - Boilerplate On-Chain Voting App - [Website](https://boilerplate.anon-aadhaar.pse.dev/) | [GitHub](https://github.com/anon-aadhaar/boilerplate) @@ -36,7 +41,7 @@ We developed a prover for [Digilocker](https://www.digilocker.gov.in/), that let export const anonAadhaar: ProjectInterface = { id: "anon-aadhaar", - section: "pse", + category: ProjectCategory.APPLICATION, content, projectStatus: ProjectStatus.ACTIVE, image: "anon-aadhaar.svg", diff --git a/data/projects/anon-klub.ts b/data/projects/anon-klub.ts index 193a614..efb140a 100644 --- a/data/projects/anon-klub.ts +++ b/data/projects/anon-klub.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const anonKlub: ProjectInterface = { id: "anon-klub", - section: "archived", + category: ProjectCategory.APPLICATION, content, projectStatus: ProjectStatus.INACTIVE, image: "anonklub.svg", diff --git a/data/projects/bandada.ts b/data/projects/bandada.ts index f7ce4b6..94ea227 100644 --- a/data/projects/bandada.ts +++ b/data/projects/bandada.ts @@ -1,13 +1,18 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { tldr: "An open-source tool for managing privacy-preserving groups of anonymous individuals.", description: `### Overview -[Bandada](https://bandada.pse.dev/) is a project designed to simplify the management of privacy-preserving groups. It is aimed at developers who want to build privacy-based applications and integrate anonymity sets, as well as non-developers working in DAOs, governments, international institutions, non-profit organizations, and associations that want to create and manage anonymous groups. +[Bandada](https://bandada.pse.dev/) is a project designed to simplify the management of privacy-preserving groups. It is aimed at developers who want to build privacy-based applications and integrate anonymity sets, as well as non-developers working in DAOs, governments, international institutions, non-profit organizations, and associations that want to create and manage anonymous groups. -Bandada offers a plug-and-play infrastructure, reducing the time and complexity required for managing anonymity sets. It enables anonymous signaling, such as voting, messaging, logging in, or endorsing, in various use cases like private organizations, GitHub repository contributors, and groups of wallets holding a specific NFT. +Bandada offers a plug-and-play infrastructure, reducing the time and complexity required for managing anonymity sets. It enables anonymous signaling, such as voting, messaging, logging in, or endorsing, in various use cases like private organizations, GitHub repository contributors, and groups of wallets holding a specific NFT. ### Features @@ -21,7 +26,7 @@ Bandada offers a plug-and-play infrastructure, reducing the time and complexity ### Background -In Spanish, "Bandada" means "flock" or "group” of birds or animals moving together in a coordinated manner. Groups are an important concept when we speak about privacy and zero-knowledge technologies, they can be thought of as anonymity sets. Credentials are a way to establish necessary trust between a set of participants while letting users keep control over how their identities are stored and used. +In Spanish, "Bandada" means "flock" or "group” of birds or animals moving together in a coordinated manner. Groups are an important concept when we speak about privacy and zero-knowledge technologies, they can be thought of as anonymity sets. Credentials are a way to establish necessary trust between a set of participants while letting users keep control over how their identities are stored and used. Bandada allows you to create groups and establish trust within the participants by ensuring that everyone who joins the group must meet the credential requirements. @@ -59,7 +64,7 @@ Bandada also provides a preset of credential validators that can be extended wit export const bandada: ProjectInterface = { id: "bandada", - section: "pse", + category: ProjectCategory.APPLICATION, content, projectStatus: ProjectStatus.ACTIVE, image: "bandada.webp", diff --git a/data/projects/channel-4.ts b/data/projects/channel-4.ts index d8569e9..b1576e1 100644 --- a/data/projects/channel-4.ts +++ b/data/projects/channel-4.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const channel4: ProjectInterface = { id: "channel-4", - section: "archived", content, projectStatus: ProjectStatus.INACTIVE, image: "channel4.svg", diff --git a/data/projects/chiquito.ts b/data/projects/chiquito.ts index 286d93f..9031e67 100644 --- a/data/projects/chiquito.ts +++ b/data/projects/chiquito.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const chiquito: ProjectInterface = { id: "chiquito", - section: "pse", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/coco.ts b/data/projects/coco.ts index 6e238f4..23502f1 100644 --- a/data/projects/coco.ts +++ b/data/projects/coco.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const Coco: ProjectInterface = { id: "coco", - section: "archived", image: "coco.svg", name: "COCO", projectStatus: ProjectStatus.INACTIVE, diff --git a/data/projects/cryptkeeper.ts b/data/projects/cryptkeeper.ts index cb799b6..c912025 100644 --- a/data/projects/cryptkeeper.ts +++ b/data/projects/cryptkeeper.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const cryptkeeper: ProjectInterface = { id: "cryptkeeper", - section: "archived", projectStatus: ProjectStatus.INACTIVE, content, image: "cryptkeeper.webp", diff --git a/data/projects/discreetly.ts b/data/projects/discreetly.ts index 2f3ed56..d50f260 100644 --- a/data/projects/discreetly.ts +++ b/data/projects/discreetly.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const discreetly: ProjectInterface = { id: "discreetly", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "discreetly.svg", diff --git a/data/projects/dsl-working-group.ts b/data/projects/dsl-working-group.ts index 44a9307..1da1420 100644 --- a/data/projects/dsl-working-group.ts +++ b/data/projects/dsl-working-group.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const dslWorkingGroup: ProjectInterface = { id: "dsl-working-group", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/ecip-halo2.ts b/data/projects/ecip-halo2.ts index 4abf86b..2b5a877 100644 --- a/data/projects/ecip-halo2.ts +++ b/data/projects/ecip-halo2.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,8 +14,8 @@ const content: ProjectContent = { export const ECIPHalo2: ProjectInterface = { id: "ecip-halo2", - section: "pse", image: "", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, content, imageAlt: "ECIP + Halo 2", diff --git a/data/projects/eigen-trust.ts b/data/projects/eigen-trust.ts index 5a75d24..463773b 100644 --- a/data/projects/eigen-trust.ts +++ b/data/projects/eigen-trust.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const eigenTrust: ProjectInterface = { id: "eigen-trust", - section: "archived", projectStatus: ProjectStatus.INACTIVE, content, image: "", diff --git a/data/projects/excubiae.ts b/data/projects/excubiae.ts index 1e0568a..d79a681 100644 --- a/data/projects/excubiae.ts +++ b/data/projects/excubiae.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -21,7 +26,7 @@ We're actively developing on the official [Excubiae repository](https://github.c export const excubiae: ProjectInterface = { id: "excubiae", - section: "pse", + category: ProjectCategory.APPLICATION, content, projectStatus: ProjectStatus.ACTIVE, image: "", diff --git a/data/projects/interep.ts b/data/projects/interep.ts index d8bd7f6..4fc0be2 100644 --- a/data/projects/interep.ts +++ b/data/projects/interep.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const Interep: ProjectInterface = { id: "interep", - section: "archived", image: "interep.svg", name: "Interep", projectStatus: ProjectStatus.INACTIVE, diff --git a/data/projects/jubmoji.ts b/data/projects/jubmoji.ts index 3b907e1..e60a0cc 100644 --- a/data/projects/jubmoji.ts +++ b/data/projects/jubmoji.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const jubmoji: ProjectInterface = { id: "jubmoji", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/maci-platform.ts b/data/projects/maci-platform.ts index dc52811..25dcb95 100644 --- a/data/projects/maci-platform.ts +++ b/data/projects/maci-platform.ts @@ -1,11 +1,16 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { tldr: "Run a voting round in your community! Forked from EasyRetroPGF and enhanced with MACI for privacy, anti-bribery and anti-collusion", description: `### Overview -[MACI Platform](https://github.com/privacy-scaling-explorations/maci-platform/tree/main) is an implementation of EasyRetroPGF with MACI. +[MACI Platform](https://github.com/privacy-scaling-explorations/maci-platform/tree/main) is an implementation of EasyRetroPGF with MACI. This project enables any community, organization or ecosystem to run a voting round. It is highly configurable to enable different voting mechanisms (quadratic voting, quadratic funding, etc), gating mechanisms (token based, attestation based, hats-based, etc) and an easy-to-use UI for both round organizers and voters. @@ -22,7 +27,7 @@ With MACI Platform, you can run different kind of voting rounds for your communi export const maciPlatform: ProjectInterface = { id: "maci-platform", - section: "pse", + category: ProjectCategory.APPLICATION, projectStatus: ProjectStatus.ACTIVE, content, image: "maci-platform.png", diff --git a/data/projects/maci.ts b/data/projects/maci.ts index 28c7a15..2753155 100644 --- a/data/projects/maci.ts +++ b/data/projects/maci.ts @@ -1,17 +1,22 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { tldr: "An on-chain voting solution that protects privacy and minimizes the risk of collusion and bribery", description: `### Overview -[MACI](https://github.com/privacy-scaling-explorations/maci/tree/dev) is a protocol designed to provide a highly secure e-voting solution. +[MACI](https://github.com/privacy-scaling-explorations/maci/tree/dev) is a protocol designed to provide a highly secure e-voting solution. -It enables organisations to conduct on-chain voting processes with a significantly reduced risk of cheating, such as bribery or collusion. +It enables organisations to conduct on-chain voting processes with a significantly reduced risk of cheating, such as bribery or collusion. -MACI uses zero-knowledge proofs to implement a receipt-free voting scheme, making it impossible for anyone other than the vote coordinator to verify how a specific user voted. This ensures the correct execution of votes and allows anyone to verify the results. +MACI uses zero-knowledge proofs to implement a receipt-free voting scheme, making it impossible for anyone other than the vote coordinator to verify how a specific user voted. This ensures the correct execution of votes and allows anyone to verify the results. -It's particularly beneficial for governance and funding events, where its anti-collusion mechanisms help ensure fair and transparent outcomes. +It's particularly beneficial for governance and funding events, where its anti-collusion mechanisms help ensure fair and transparent outcomes. Please refer to MACI's [documentation](https://maci.pse.dev) for more details. @@ -27,7 +32,7 @@ With MACI, you can take on chain voting to the next level: export const maci: ProjectInterface = { id: "maci", - section: "pse", + category: ProjectCategory.APPLICATION, projectStatus: ProjectStatus.ACTIVE, content, image: "maci.png", diff --git a/data/projects/mopro.ts b/data/projects/mopro.ts index fe6752d..40e18e7 100644 --- a/data/projects/mopro.ts +++ b/data/projects/mopro.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -34,7 +39,7 @@ Developer Capabilities: export const mopro: ProjectInterface = { id: "mopro", content, - section: "pse", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, image: "mopro.png", license: "MIT", diff --git a/data/projects/mpc-stats.ts b/data/projects/mpc-stats.ts index a3c2500..2f549fd 100644 --- a/data/projects/mpc-stats.ts +++ b/data/projects/mpc-stats.ts @@ -1,10 +1,10 @@ -import { ProjectInterface, ProjectStatus } from "@/lib/types" +import { ProjectCategory, ProjectInterface, ProjectStatus } from "@/lib/types" export const mpcStats: ProjectInterface = { id: "mpc-stats", image: "mpc-stats.png", name: "MPCStats", - section: "pse", + category: ProjectCategory.APPLICATION, projectStatus: ProjectStatus.ACTIVE, content: { en: { @@ -32,4 +32,4 @@ MPCStats is a framework that enables data consumers to query statistical computa types: ["Legos/dev tools", "Lego sets/toolkits"], builtWith: ["MP-SPDZ", "tlsn", "python"], }, -} \ No newline at end of file +} diff --git a/data/projects/mpc.ts b/data/projects/mpc.ts index 0becc61..4dbe45c 100644 --- a/data/projects/mpc.ts +++ b/data/projects/mpc.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -21,7 +26,7 @@ You can find the detail of the protocol [here](https://eprint.iacr.org/2024/264) export const mpc: ProjectInterface = { id: "MPC", - section: "pse", + category: ProjectCategory.RESEARCH, projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/nfctap.ts b/data/projects/nfctap.ts index aafca62..ce93b30 100644 --- a/data/projects/nfctap.ts +++ b/data/projects/nfctap.ts @@ -11,7 +11,6 @@ NFC activations at SBC and FtC residency export const nfctap: ProjectInterface = { id: "nfctap", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/openpassport.ts b/data/projects/openpassport.ts index 764acb3..367d028 100644 --- a/data/projects/openpassport.ts +++ b/data/projects/openpassport.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const OpenPassport: ProjectInterface = { id: "openpassport", - section: "grant", + category: ProjectCategory.APPLICATION, projectStatus: ProjectStatus.ACTIVE, content, image: "openpassport.jpg", diff --git a/data/projects/p0tion.ts b/data/projects/p0tion.ts index 0ce5d16..5b29a17 100644 --- a/data/projects/p0tion.ts +++ b/data/projects/p0tion.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const p0tion: ProjectInterface = { id: "p0tion", - section: "pse", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, content, image: "p0tion.png", diff --git a/data/projects/p256.ts b/data/projects/p256.ts index 82a7405..e2bc0d8 100644 --- a/data/projects/p256.ts +++ b/data/projects/p256.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const p256: ProjectInterface = { id: "p256", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/pollen-labs.ts b/data/projects/pollen-labs.ts index 743984c..01f022b 100644 --- a/data/projects/pollen-labs.ts +++ b/data/projects/pollen-labs.ts @@ -24,7 +24,6 @@ const content: ProjectContent = { export const pollenLabs: ProjectInterface = { id: "pollen-labs", content, - section: "archived", projectStatus: ProjectStatus.INACTIVE, image: "pollen-labs.svg", name: "Pollen Labs", diff --git a/data/projects/powers-of-tau.ts b/data/projects/powers-of-tau.ts index 2e1b16c..3f9f980 100644 --- a/data/projects/powers-of-tau.ts +++ b/data/projects/powers-of-tau.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const PerpetualPowersOfTau: ProjectInterface = { id: "perpetual-powers-of-tau", - section: "pse", + category: ProjectCategory.DEVTOOLS, image: "powers-of-tau.png", name: "Perpetual Powers of Tau", projectStatus: ProjectStatus.ACTIVE, diff --git a/data/projects/pse-security.ts b/data/projects/pse-security.ts index 39e052b..1033d38 100644 --- a/data/projects/pse-security.ts +++ b/data/projects/pse-security.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const pseSecurity: ProjectInterface = { id: "pse-security", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "pse-security.png", diff --git a/data/projects/rln.ts b/data/projects/rln.ts index 8f3a107..ad4b32f 100644 --- a/data/projects/rln.ts +++ b/data/projects/rln.ts @@ -12,7 +12,6 @@ Rate-Limiting Nullifier (RLN) is a protocol designed to combat spam and denial o export const rln: ProjectInterface = { id: "rln", content, - section: "pse", projectStatus: ProjectStatus.ACTIVE, image: "rln.svg", name: "Rate-Limiting Nullifier", diff --git a/data/projects/semaphore.ts b/data/projects/semaphore.ts index 0ef9df0..5205798 100644 --- a/data/projects/semaphore.ts +++ b/data/projects/semaphore.ts @@ -1,17 +1,22 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { tldr: "A zero-knowledge protocol for anonymous interactions.", description: `### Overview -[Semaphore](https://semaphore.pse.dev/) is a generic privacy layer. Leveraging zero-knowledge technology, users can prove their membership in groups and send messages (extending from votes to endorsements) +[Semaphore](https://semaphore.pse.dev/) is a generic privacy layer. Leveraging zero-knowledge technology, users can prove their membership in groups and send messages (extending from votes to endorsements) off-chain or across EVM-compatible blockchains, all without revealing their personal identity. Use cases include private voting, whistleblowing, anonymous DAOs, and mixers. Semaphore is designed to be a simple and generic privacy layer for decentralized applications (dApps). It encourages modular application design, allowing dApp developers to choose and customize the on-chain and off-chain components they need. -The core of the protocol is the circuit logic. In addition to circuits, Semaphore provides [Solidity contracts](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts) and +The core of the protocol is the circuit logic. In addition to circuits, Semaphore provides [Solidity contracts](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts) and [JavaScript libraries](https://github.com/semaphore-protocol/semaphore/tree/main#-packages) that allow developers to generate zero-knowledge proofs and verify them with minimal effort. ### Features @@ -41,7 +46,7 @@ As a Semaphore contributor, you'll be able to claim a special GitPOAP per year export const semaphore: ProjectInterface = { id: "semaphore", - section: "pse", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, content, image: "semaphore.webp", diff --git a/data/projects/summa.ts b/data/projects/summa.ts index fdefbb5..57ce07e 100644 --- a/data/projects/summa.ts +++ b/data/projects/summa.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const summa: ProjectInterface = { id: "summa", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "summa.svg", diff --git a/data/projects/tlsn.ts b/data/projects/tlsn.ts index be21d7b..b4649f7 100644 --- a/data/projects/tlsn.ts +++ b/data/projects/tlsn.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -11,8 +16,8 @@ const content: ProjectContent = { export const tlsn: ProjectInterface = { id: "tlsn", - section: "pse", projectStatus: ProjectStatus.ACTIVE, + category: ProjectCategory.DEVTOOLS, content, image: "tlsn.webp", name: "TLSNotary", diff --git a/data/projects/trusted-setups.ts b/data/projects/trusted-setups.ts index c63d170..37d2b5b 100644 --- a/data/projects/trusted-setups.ts +++ b/data/projects/trusted-setups.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const trustedSetups: ProjectInterface = { id: "trusted-setups", - section: "pse", + category: ProjectCategory.DEVTOOLS, projectStatus: ProjectStatus.ACTIVE, content, image: "trusted-setups.svg", diff --git a/data/projects/unirep-protocol.ts b/data/projects/unirep-protocol.ts index 00a49ad..8a95815 100644 --- a/data/projects/unirep-protocol.ts +++ b/data/projects/unirep-protocol.ts @@ -39,7 +39,6 @@ Key UniRep features include: export const unirepProtocol: ProjectInterface = { id: "unirep-protocol", content, - section: "archived", projectStatus: ProjectStatus.INACTIVE, image: "unirep.svg", license: "MIT", diff --git a/data/projects/voice-deck.ts b/data/projects/voice-deck.ts index dc86ddf..97b71f8 100644 --- a/data/projects/voice-deck.ts +++ b/data/projects/voice-deck.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const voicedeck: ProjectInterface = { id: "voice-deck", - section: "collaboration", projectStatus: ProjectStatus.ACTIVE, content, image: "voiceDeck.svg", diff --git a/data/projects/wax.ts b/data/projects/wax.ts index d7aebde..946b652 100644 --- a/data/projects/wax.ts +++ b/data/projects/wax.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -11,8 +16,8 @@ const content: ProjectContent = { export const wax: ProjectInterface = { id: "wax", - section: "pse", projectStatus: ProjectStatus.ACTIVE, + category: ProjectCategory.DEVTOOLS, content, image: "wax.webp", name: "Wallet Account eXperiments - WAX", diff --git a/data/projects/zk-email.ts b/data/projects/zk-email.ts index 8a5ca27..c3d81dd 100644 --- a/data/projects/zk-email.ts +++ b/data/projects/zk-email.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,7 +14,7 @@ const content: ProjectContent = { export const zkemail: ProjectInterface = { id: "zk-email", - section: "collaboration", + category: ProjectCategory.APPLICATION, projectStatus: ProjectStatus.ACTIVE, content, image: "zk-email.jpeg", diff --git a/data/projects/zk-id.ts b/data/projects/zk-id.ts index 3964710..1e02a77 100644 --- a/data/projects/zk-id.ts +++ b/data/projects/zk-id.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const zkID: ProjectInterface = { id: "zk-id", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "", diff --git a/data/projects/zk-kit.ts b/data/projects/zk-kit.ts index 97ca893..b8570f1 100644 --- a/data/projects/zk-kit.ts +++ b/data/projects/zk-kit.ts @@ -1,40 +1,45 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { tldr: "A set of reusable libraries for zero-knowledge technologies.", description: `### Overview -ZK-Kit is an innovative toolkit that provides reference implementations of cryptographic primitives across multiple -programming languages. It is designed to streamline the development of production-level projects involving zero-knowledge +ZK-Kit is an innovative toolkit that provides reference implementations of cryptographic primitives across multiple +programming languages. It is designed to streamline the development of production-level projects involving zero-knowledge proofs (ZKPs), offering developers a robust foundation for building secure and efficient applications. - + ### Motivations -One of the primary motivations behind ZK-Kit is to address a common challenge in the cryptographic development space: -the tendency to reinvent the wheel with each new project. Cryptographic primitives, especially those related to zero-knowledge -proofs, are complex and require deep expertise to implement correctly. By providing ready-to-use, well-tested implementations, -ZK-Kit allows developers to focus on their specific application logic rather than spending valuable time and resources on +One of the primary motivations behind ZK-Kit is to address a common challenge in the cryptographic development space: +the tendency to reinvent the wheel with each new project. Cryptographic primitives, especially those related to zero-knowledge +proofs, are complex and require deep expertise to implement correctly. By providing ready-to-use, well-tested implementations, +ZK-Kit allows developers to focus on their specific application logic rather than spending valuable time and resources on recreating fundamental building blocks. -It also aims to foster a collaborative community where developers can engage in open discussions, share insights, -and tackle complex challenges in cryptography. By creating an environment that encourages knowledge exchange and -innovation, ZK-Kit aspires to become a hub for cryptographic advancement, empowering developers to experiment, +It also aims to foster a collaborative community where developers can engage in open discussions, share insights, +and tackle complex challenges in cryptography. By creating an environment that encourages knowledge exchange and +innovation, ZK-Kit aspires to become a hub for cryptographic advancement, empowering developers to experiment, contribute, and drive progress in privacy-focused technologies. ### Key aspects -One of ZK-Kit's standout features is its commitment to providing a consistent developer experience -across various programming languages. By maintaining a common API structure, ZK-Kit enables developers to switch -languages effortlessly. -Additionally, ZK-Kit emphasizes code quality and reliability through rigorous code checks, integrating linters, +One of ZK-Kit's standout features is its commitment to providing a consistent developer experience +across various programming languages. By maintaining a common API structure, ZK-Kit enables developers to switch +languages effortlessly. +Additionally, ZK-Kit emphasizes code quality and reliability through rigorous code checks, integrating linters, formatters, comprehensive testing, and regular audits, ensuring robust and maintainable code throughout development.`, }, } export const ZKKit: ProjectInterface = { id: "zk-kit", - section: "pse", + category: ProjectCategory.DEVTOOLS, image: "zk-kit.svg", name: "ZK-Kit", projectStatus: ProjectStatus.ACTIVE, diff --git a/data/projects/zkevm-community.ts b/data/projects/zkevm-community.ts index 4939f60..3540c65 100644 --- a/data/projects/zkevm-community.ts +++ b/data/projects/zkevm-community.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const zkevmCommunity: ProjectInterface = { id: "zkevm-community", - section: "pse", projectStatus: ProjectStatus.ACTIVE, content, image: "zkevm.jpg", diff --git a/data/projects/zkitter.ts b/data/projects/zkitter.ts index 4a459f7..f9f18b2 100644 --- a/data/projects/zkitter.ts +++ b/data/projects/zkitter.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const zkitter: ProjectInterface = { id: "zkitter", - section: "archived", projectStatus: ProjectStatus.INACTIVE, content, image: "zkitter.webp", diff --git a/data/projects/zkml.ts b/data/projects/zkml.ts index 6df409e..8293a80 100644 --- a/data/projects/zkml.ts +++ b/data/projects/zkml.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const zkml: ProjectInterface = { id: "zkml", - section: "pse", projectStatus: ProjectStatus.ACTIVE, image: "zkml.png", name: "ZKML", diff --git a/data/projects/zkopru.ts b/data/projects/zkopru.ts index a67099b..a2ea98e 100644 --- a/data/projects/zkopru.ts +++ b/data/projects/zkopru.ts @@ -9,7 +9,6 @@ const content: ProjectContent = { export const Zkopru: ProjectInterface = { id: "zkopru", - section: "archived", image: "zkopru.svg", name: "ZKOPRU", projectStatus: ProjectStatus.INACTIVE, diff --git a/data/projects/zkp2p.ts b/data/projects/zkp2p.ts index 0ba9798..8987b09 100644 --- a/data/projects/zkp2p.ts +++ b/data/projects/zkp2p.ts @@ -1,4 +1,9 @@ -import { ProjectContent, ProjectInterface, ProjectStatus } from "@/lib/types" +import { + ProjectCategory, + ProjectContent, + ProjectInterface, + ProjectStatus, +} from "@/lib/types" const content: ProjectContent = { en: { @@ -9,8 +14,8 @@ const content: ProjectContent = { export const zkp2p: ProjectInterface = { id: "zkp2p", - section: "grant", projectStatus: ProjectStatus.ACTIVE, + category: ProjectCategory.APPLICATION, content, image: "zkp2p.webp", name: "ZKP2P", diff --git a/lib/types.ts b/lib/types.ts index 9cf834a..181388f 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,5 +1,12 @@ import { ReactNode } from "react" +export enum ProjectCategory { + APPLICATION = "APPLICATION", + DEVTOOLS = "DEVTOOLS", + RESEARCH = "RESEARCH", +} + +export const ProjectCategories = Object.values(ProjectCategory) as string[] // list of project groups export const ProjectSections = [ "pse", @@ -18,6 +25,12 @@ export interface Faq { answer: ReactNode } +export const ProjectCategoryLabelMapping: Record = { + [ProjectCategory.APPLICATION]: "DEVTOOLS", + [ProjectCategory.DEVTOOLS]: "APPLICATIONS", + [ProjectCategory.RESEARCH]: "RESEARCH", +} + export const ProjectSectionLabelMapping: Record = { pse: "PSE projects", grant: "Grants", @@ -96,8 +109,8 @@ export interface ProjectInterface { id: string hasWiki?: boolean // show project with wiki page template license?: string - content: ProjectContent // project tldr and description with support for multiple language - section: ProjectSection + content: ProjectContent // project tldr and description with support for multiple language + category?: ProjectCategory // project category used as filter to replace section image: string previousBrandImage?: string imageAlt?: string diff --git a/state/useProjectFiltersState.ts b/state/useProjectFiltersState.ts index c04ae96..b0156cd 100644 --- a/state/useProjectFiltersState.ts +++ b/state/useProjectFiltersState.ts @@ -3,7 +3,7 @@ import Fuse from "fuse.js" import i18next from "i18next" import { create } from "zustand" -import { ProjectInterface } from "@/lib/types" +import { ProjectCategory, ProjectInterface } from "@/lib/types" import { uniq } from "@/lib/utils" import { LocaleTypes, fallbackLng } from "@/app/i18n/settings" @@ -55,7 +55,7 @@ interface ProjectStateProps { filters: FiltersProps activeFilters: Partial queryString: string - currentSection: string | null + currentCategory: ProjectCategory | null } interface SearchMatchByParamsProps { @@ -76,7 +76,7 @@ interface ProjectActionsProps { onFilterProject: (searchPattern: string) => void onSelectTheme: (theme: string, searchPattern?: string) => void sortProjectBy: (sortBy: ProjectSortBy) => void - setCurrentSection: (section: string | null) => void + setCurrentCategory: (section: ProjectCategory | null) => void } const createURLQueryString = (params: Partial): string => { @@ -207,7 +207,7 @@ const sortProjectByFn = ( export const useProjectFiltersState = create< ProjectStateProps & ProjectActionsProps >()((set) => ({ - currentSection: null, + currentCategory: null, sortBy: DEFAULT_PROJECT_SORT_BY, projects: sortProjectByFn(projects, DEFAULT_PROJECT_SORT_BY), queryString: "", @@ -298,15 +298,15 @@ export const useProjectFiltersState = create< } }) }, - setCurrentSection(section: string | null) { + setCurrentCategory(category: ProjectCategory | null) { set((state: any) => { return { ...state, projects: projects.filter((project) => { - if (section == null) return true // return all projects - return project?.section?.toLowerCase() === section + if (category == null) return true // return all projects + return project?.category === category }), - currentSection: section, + currentCategory: category, } }) },