Skip to content

Commit

Permalink
feat: creating community docs package
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrorezende committed Oct 10, 2023
1 parent a30e44b commit 0f86285
Show file tree
Hide file tree
Showing 19 changed files with 259 additions and 2 deletions.
22 changes: 21 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
"license": "GPL-3.0",
"workspaces": [
"packages/docs",
"packages/specs"
"packages/specs",
"packages/community"
],
"scripts": {
"dev:docs": "npm run dev --workspace=packages/docs",
"dev:specs": "npm run dev --workspace=packages/specs",
"dev:community": "npm run dev --workspace=packages/community",
"build:docs": "npm run build --workspace=packages/docs",
"build:specs": "npm run build --workspace=packages/specs",
"build:community": "npm run build --workspace=packages/community",
"build": "npm run build --workspaces"
},
"dependencies": {
Expand Down
64 changes: 64 additions & 0 deletions packages/community/components/Logo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { useEffect, useState } from "react";
import { useTheme } from "nextra-theme-docs";

export const Logo = () => {
const { resolvedTheme } = useTheme();
const [isDark, setDark] = useState(false);

useEffect(() => {
setDark(resolvedTheme === "dark");
}, [resolvedTheme]);

const fill = isDark ? "#ffff00" : "currentColor";

return (
<div>
<svg
className="nx-w-full nx-py-4"
style={{ maxWidth: "180px" }}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 644 153.4"
>
<g id="g148" transform="translate(-87 -48.3)">
<rect
fill={fill}
id="rect136"
width="28.7"
height="28.7"
x="164.7"
y="125"
/>
<path
fill={fill}
id="path138"
d="M136 96.3a28.7 28.7 0 0 1 28.7 28.7H136z"
/>
<polygon
fill={fill}
id="polygon140"
points="152.6 153.7 136 125 119.4 153.7"
/>
<circle fill={fill} id="circle142" cx="193.5" cy="110.7" r="14.3" />
<path
fill={fill}
id="path146"
d="M163.6 201.7c-20.5 0-39.7-8-54.2-22.5A76.2 76.2 0 0 1 86.9 125a76 76 0 0 1 22.5-54.2 76.2 76.2 0 0 1 54.2-22.5c20.5 0 39.8 8 54.3 22.5a76.2 76.2 0 0 1 22.4 54.2 76.2 76.2 0 0 1-76.7 76.7zm0-144A66.8 66.8 0 0 0 96.4 125a66.8 66.8 0 0 0 67.2 67.2 66.8 66.8 0 0 0 67.2-67.2 66.8 66.8 0 0 0-67.2-67.2Z"
/>
</g>
<text
id="text152"
x="191"
y="105.4"
fill={fill}
fontFamily='SpaceGrotesk-Medium,"Space Grotesk"'
fontSize="77.8"
fontWeight="500"
>
<tspan id="tspan150" x="191" y="105.4">
COMMUNITY
</tspan>
</text>
</svg>
</div>
);
};
28 changes: 28 additions & 0 deletions packages/community/components/PageHead.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export const PageHead = () => {
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
property="og:image"
content="https://specs.namada.net/opengraph.jpg"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@namada" />
<meta name="twitter:creator" content="@namada" />
<meta property="og:url" content="https://community.namada.net" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
/>
</>
);
};
1 change: 1 addition & 0 deletions packages/community/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500&display=swap");
1 change: 1 addition & 0 deletions packages/community/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "community";
5 changes: 5 additions & 0 deletions packages/community/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
13 changes: 13 additions & 0 deletions packages/community/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
latex: true,
defaultShowCopyCode: true,
});

module.exports = {
...withNextra(),
images: {
unoptimized: true,
},
};
22 changes: 22 additions & 0 deletions packages/community/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "namada-community",
"version": "0.0.1",
"description": "Namada Community Docs",
"license": "GPL-3.0",
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"start": "next start"
},
"dependencies": {
"next": "^13.4.8",
"nextra": "latest",
"nextra-theme-docs": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "18.11.10",
"typescript": "^4.9.3"
}
}
5 changes: 5 additions & 0 deletions packages/community/pages/_app.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "../global.css";

export default function Specs({ Component, pageProps }) {
return <Component {...pageProps} />;
}
5 changes: 5 additions & 0 deletions packages/community/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"index": "Introduction",
"trusted-setup": "Trusted Setup",
"validators": "Validators"
}
9 changes: 9 additions & 0 deletions packages/community/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Namada Community DOCS

## What is the Namada Community?

The Namada community is composed of ecosystems, communities, researchers, builders, creators, advocates, users of privacy, and just people – who want to see a future in which decentralized systems can serve as real alternatives to existing financial systems. To achieve this, privacy is paramount.

We are brought together by the Namada Vision. Together we make privacy as a public good a reality by building open-source tools, operating protocols, teaching people about privacy, using privacy, and funding privacy.

Do you want to join us?
22 changes: 22 additions & 0 deletions packages/community/pages/trusted-setup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Trusted setup

A key component of the Namada protocol is the MASP circuit, which enables the features of asset-agnostic shielded transfers and shielded set rewards. For the MASP to work, it needs two sets of parameters: the first set is phase I from Zcash’s Powers of Tau ceremony, conducted in 2018, and the second ones are the ones generated in Namada’s Trusted Setup ceremony, which was announced in November 2022 and coordinated by the Anoma Foundation with the help of devs at Heliax.

The ceremony encouraged everyone to participate, but specifically the ones who wanted to use privacy on Namada – because participants in the ceremony only need to trust themselves to have effectively destroyed the toxic waste. The ceremony started on the 19th of November 2022 and concluded on the 21st of December 2022 with no less than 2,510 participants – making it the largest trusted setup at the time (more details in the recap).

The Namada Community grew in size and diversity, everyone who participated contributed to the security of the privacy features on Namada. Participants in the Trusted Setup were requested to generate a seed phrase – and the next step will be the instructions for claiming the rewards for participating in the ceremony.

**Resources:**

- [Announcing the Namada Trusted Setup](https://namada.net/blog/announcing-the-namada-trusted-setup-ceremony)
- Trusted Setup coordinator [code](https://github.com/anoma/namada-trusted-setup)
- [Completion of the Namada Trusted Setup](https://namada.net/blog/completion-of-the-namada-trusted-setup)
- Dashboard with [all contributions](https://namada.net/trusted-setup) and tool to verify contributions
- [Zcash’s Powers of Tau](https://github.com/ZcashFoundation/powersoftau-attestations/)
- [MASP parameters](https://github.com/anoma/namada-masp-params) as a Rust crate

**Engage:**

- Join the community on Discord
- Join the weekly Private Library on [Discord](https://discord.gg/namada)
- Join the monthly community calls
20 changes: 20 additions & 0 deletions packages/community/pages/validators.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Validators

The development of Namada started in 2022, back then it went by the codename of “M1”. After months of development, throughout summer and fall we launched a series of [private testnets](https://github.com/anoma/namada-testnets/tree/main/namada-close-quarters-testnet-1) with the help of a handful of early validators who believed in the vision of bringing asset agnostic privacy. The community at this stage was composed by the core developers at Heliax and [the few validators](https://namada.net/blog/announcing-namada-public-testnets) (7 team members from Heliax and [11 validators](https://github.com/anoma/namada-testnets/tree/main/namada-close-quarters-testnet-5)) who joined and coordinated through the Validator Hangout on Element. The last private testnets ran until December 2022, the protocol version was `v0.11`.

In December 2022, the first [public testnet](https://namada.net/blog/announcing-namada-public-testnets) was launched with a few more validators joining forces ([29 in total](https://github.com/anoma/namada-testnets/tree/main/namada-public-testnet-1), with a few team-run nodes). Ever since, the core developers have published numerous protocol releases from `v0.12.0`, until the latest `v0.23.0` and more than 13 testnets launches/upgrades. The number of validators grew a lot, a total of [253 validators](https://github.com/anoma/namada-testnets/tree/main/namada-public-testnet-13) submitted their genesis keys for testnet 13.

Every testnet followed the same decentralized launch process as practice for mainnet, where a protocol version and a genesis proposal is published, and it is entirely up to the validators whether the network goes live or not.

**Resources:**

- [Announcing Namada Public Testnets](https://namada.net/blog/announcing-namada-public-testnets)
- The [Namada protocol](https://github.com/anoma/namada) and releases
- Namada testnet history and validator .toml [files](https://github.com/anoma/namada-testnets/tree/main)
- Validator [documentation](https://docs.namada.net/)

**Want to become a validator?**

- Become a validator in the public testnets
- Join the validator community on [Discord](https://discord.gg/namada)
- Join the biweekly validator calls
Binary file added packages/community/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/community/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/community/public/favicon.ico
Binary file not shown.
36 changes: 36 additions & 0 deletions packages/community/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";
import { Logo } from "./components/Logo";
import { DocsThemeConfig } from "nextra-theme-docs";
import { PageHead } from "./components/PageHead";

const description = `"Docs for Namada Community, a Proof-of-Stake L1 for interchain asset-agnostic privacy.`;

const config: DocsThemeConfig = {
primaryHue: 180,
useNextSeoProps() {
return {
titleTemplate: "%s | Community | Namada",
defaultDescription: description,
canonical: "https://community.namada.net",
description,
};
},
head: <PageHead />,
logo: <Logo />,
project: {
link: "https://github.com/anoma/namada",
},
chat: {
link: "https://discord.gg/namada",
},
sidebar: {
defaultMenuCollapseLevel: 1,
},
docsRepositoryBase:
"https://github.com/anoma/namada-docs/blob/master/packages/specs",
footer: {
text: "Namada",
},
};

export default config;
3 changes: 3 additions & 0 deletions packages/community/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.base.json"
}

0 comments on commit 0f86285

Please sign in to comment.