Skip to content

Commit

Permalink
Merge branch 'main' into feature/dialog-chakra
Browse files Browse the repository at this point in the history
  • Loading branch information
yawn-c111 committed Nov 25, 2024
2 parents 47605ca + dbf563d commit 8fc0d2c
Show file tree
Hide file tree
Showing 20 changed files with 6,445 additions and 110 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy-document.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy document to GitHub Pages

on:
push:
branches:
- main

jobs:
# build job
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn install --immutable

- name: Build Document
run: yarn document build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: pkgs/document/build
# deploy job
deploy:
name: Deploy to GitHub Pages
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy Document
id: deployment
uses: actions/deploy-pages@v4

concurrency:
group: "pages"
cancel-in-progress: false
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Test Contracts](https://github.com/hackdays-io/toban/actions/workflows/test-contract.yml/badge.svg)](https://github.com/hackdays-io/toban/actions/workflows/test-contract.yml)

[![Deploy document to GitHub Pages](https://github.com/hackdays-io/toban/actions/workflows/deploy-document.yml/badge.svg)](https://github.com/hackdays-io/toban/actions/workflows/deploy-document.yml)

![](./docs/img/header.png)

## About This Project
Expand Down Expand Up @@ -36,6 +38,10 @@ Core features are

These solutions were combined with ideas from [Hats Protocol](https://www.hatsprotocol.xyz/), [Splits](https://splits.org), and [Protocol Guild](https://protocol-guild.readthedocs.io/en/latest/).

## Document

[GitHub Pages Toban](https://hackdays-io.github.io/toban/)

## Slide

[Canva - Toban](https://www.canva.com/design/DAGOcvbwfFk/yKhJwHvZ9sC69AFEb0vnRg/view?utm_content=DAGOcvbwfFk&utm_campaign=designshare&utm_medium=link&utm_source=editor)
Expand Down Expand Up @@ -108,6 +114,20 @@ These solutions were combined with ideas from [Hats Protocol](https://www.hatspr
yarn
```
- ### whitepaper(Docusaurus)
- #### build
```bash
yarn document build
```
- #### start
```bash
yarn document start
```
- ### frontend
- #### **build frontend**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"scripts": {
"frontend": "yarn workspace frontend",
"contract": "yarn workspace contract",
"cli": "yarn workspace cli"
"cli": "yarn workspace cli",
"document": "yarn workspace document"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
20 changes: 20 additions & 0 deletions pkgs/document/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions pkgs/document/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
51 changes: 51 additions & 0 deletions pkgs/document/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: About Toban
---

# Concept

Toban is a simplest way to record contribution and distribute rewards.

![](./../static/img/banner.png)

Projects that involve a diverse people, such as open source development, collaborative works by multiple creators, and volunteer activities, and in which the people involved change one after another, can be very exciting, but they also have their own unique difficulties.

# For example

- **Annoying to Track Works**:

- It's very tedious to report what you've accomplished for each task

- Nobody are running a community to measure contributions by weighting each task.

- We always forget anyway lol

- **Rewards are required for Long term Contribution**:

- There is no long-term contribution, just a volunteer spirit

- There is no money to give out of the blue, and no one starts because of money.

- Someone needs to do the housework and chores

- **Ladder for Onboarding to the Community**:

- Few people can participate on their own

- It is difficult to understand the community enough to actually be able to do something

- It's important to have a starting point that makes it easy to contribute something

Therefore, we created Role Based Rewards Distribution system to track contributions and distribute rewards by role.

# Core features are

1. Manage responsibilities and rights on rolls

2. Track little contributions with P2P token transfer

3. Determine the rewards rate based on roll and engaged period

4. Distribute rewards quickly to a large number of people

These solutions were combined with ideas from **Hats Protocol**, **Splits**, and **Protocol Guild**.
109 changes: 109 additions & 0 deletions pkgs/document/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes as prismThemes } from "prism-react-renderer";

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

const config: Config = {
title: "Toban",
tagline: "Toban",
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://hackdays-io.github.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/toban",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "hackdays-io", // Usually your GitHub org/user name.
projectName: "toban", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en", "ja"],
},

presets: [
[
"classic",
{
docs: {
sidebarPath: "./sidebars.ts",
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/hackdays-io/toban",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: "img/logo.png",
navbar: {
title: "Toban",
logo: {
alt: "Toban Logo",
src: "img/logo.png",
},
items: [
{ to: "/docs", label: "Docs", position: "left" },
{
href: "https://github.com/hackdays-io/toban",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Docs",
to: "/docs",
},
],
},
{
title: "Community",
items: [
{
label: "X",
href: "https://x.com/0xtoban",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/hackdays-io/toban",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Toban, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
47 changes: 47 additions & 0 deletions pkgs/document/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "document",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.6.1",
"@docusaurus/preset-classic": "3.6.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.6.1",
"@docusaurus/tsconfig": "3.6.1",
"@docusaurus/types": "3.6.1",
"typescript": "~5.6.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
21 changes: 21 additions & 0 deletions pkgs/document/sidebars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

export default sidebars;
Loading

0 comments on commit 8fc0d2c

Please sign in to comment.