Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
refactor: workspaces + dprint + misc. (#86)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreea Eftene <hi@pixelle.ro>
  • Loading branch information
harrysolovay and statictype authored Mar 14, 2023
1 parent f9f73c6 commit cc5a44b
Show file tree
Hide file tree
Showing 74 changed files with 2,181 additions and 1,377 deletions.
24 changes: 0 additions & 24 deletions .eslintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ dist-ssr
# Editor directories and files
.idea
.DS_Store

.env
tsconfig.tsbuildinfo
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

8 changes: 4 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"csstools.postcss",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint"
"csstools.postcss",
"dprint.dprint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
31 changes: 31 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"css.lint.unknownAtRules": "ignore",
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"target/**": true
},
"ltex.disabledRules": {
"en-US": [
"MORFOLOGIK_RULE_EN_US"
]
},
"markdownlint.config": {
"MD013": false,
"MD033": false,
"MD041": false
},
"prettier.printWidth": 2
}
49 changes: 49 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"dependsOn": ["watch:compile", "watch:server", "watch:www"],
"problemMatcher": []
},
{
"label": "watch:compile",
"type": "npm",
"script": "watch:compile",
"problemMatcher": ["$tsc"],
"isBackground": true,
"presentation": {
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "watch:server",
"type": "npm",
"script": "watch:server",
"problemMatcher": ["$tsc"],
"isBackground": true,
"presentation": {
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "watch:www",
"type": "npm",
"script": "watch:www",
"problemMatcher": "$tsc",
"isBackground": true,
"presentation": {
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
]
}
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,58 @@
# Capi Multisig App

"Multisig" (multiple signatories) is a term which describes an account that is governed by multiple actors, who operate this shared account by creating and collectively-approving proposals. There are many use cases to which multisigs are applicable; some use cases include corporate governance, security, spend tracking/management, and the definition and upholding of contractual obligations.
"Multisig" (multiple signatories) is a term which describes an account that is
governed by multiple actors, who operate this shared account by creating and
collectively-approving proposals. There are many use cases to which multisigs
are applicable; some use cases include corporate governance, security, spend
tracking/management, and the definition and upholding of contractual
obligations.

The Capi Multisig App simplifies the management of multisigs on Substrate networks.
The Capi Multisig App simplifies the management of multisigs on Substrate
networks.

In its first iteration, the Capi Multisig App connects to the Westend Testnet and provides functionality for creating a multisig setup which uses a `PureProxy` as vault (the account holding the funds).
In its first iteration, the Capi Multisig App connects to the Westend Testnet
and provides functionality for creating a multisig setup which uses a
`PureProxy` as vault (the account holding the funds).

## Usage Prerequisites

1. Have the Polkadot.js extension installed in your browser.
2. If you don't already have accounts, follow [this guide](https://www.youtube.com/watch?v=sy7lvAqyzkY). Ensure your accounts are marked as accessible to the Westend testnet.
3. Get some testnet tokens via the [Westend Faucet](https://matrix.to/#/#westend_faucet:matrix.org) by following [this guide](https://wiki.polkadot.network/docs/learn-DOT#getting-tokens-on-the-westend-testnet)

Note: The faucet can send tokens only once per day. Use [the accounts page](https://polkadot.js.org/apps/#/accounts) on Polkadot.js Apps or a wallet of your choice in order to split the tokens between your accounts in case you need to pay fees.
1. Have the Polkadot.js extension installed in your browser.
2. If you don't already have accounts, follow
[this guide](https://www.youtube.com/watch?v=sy7lvAqyzkY). Ensure your
accounts are marked as accessible to the Westend testnet.
3. Get some testnet tokens via the
[Westend Faucet](https://matrix.to/#/#westend_faucet:matrix.org) by following
[this guide](https://wiki.polkadot.network/docs/learn-DOT#getting-tokens-on-the-westend-testnet)

Note: The faucet can send tokens only once per day. Use
[the accounts page](https://polkadot.js.org/apps/#/accounts) on Polkadot.js Apps
or a wallet of your choice in order to split the tokens between your accounts in
case you need to pay fees.

## Tech stack

TypeScript, Capi, Preact, Tailwind, Vite, DynamoDB

## Run locally

Install dependencies

```
pnpm install
```

Start the dev server

```
pnpm run start
```

Build for production

```
pnpm run build
```

## References and Links

- [Wiki Multisig](https://wiki.polkadot.network/docs/learn-account-multisig)
Expand Down
1 change: 1 addition & 0 deletions common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const HI = "World"
5 changes: 5 additions & 0 deletions common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "common",
"private": true,
"type": "module"
}
7 changes: 7 additions & 0 deletions common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"outDir": "dist"
},
"extends": "../tsconfig.base.json",
"include": ["."]
}
9 changes: 4 additions & 5 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
],
"dictionaries": ["project-words"],
"ignorePaths": [
"pnpm-lock.yaml",
"src/assets/",
"public",
"**/tsconfig.tsbuildinfo",
".gitignore",
".prettierignore",
".prettierrc"
"pnpm-lock.yaml",
"www/public",
"www/src/assets/"
]
}
20 changes: 20 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"incremental": true,
"indentWidth": 2,
"lineWidth": 80,
"typescript": {
"quoteProps": "asNeeded",
"arrowFunction.useParentheses": "force",
"semiColons": "asi"
},
"markdown": {
"textWrap": "always"
},
"includes": ["**.{js,json,md,ts,tsx}"],
"excludes": ["build", "node_modules", "www/dist"],
"plugins": [
"https://plugins.dprint.dev/json-0.17.0.wasm",
"https://plugins.dprint.dev/markdown-0.15.2.wasm",
"https://plugins.dprint.dev/typescript-0.83.0.wasm"
]
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[redirects]]
from = "/*"
status = 200
to = "/index.html"
to = "/www/index.html"
44 changes: 16 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,36 @@
{
"name": "capi-multisig",
"name": "root",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"format": "prettier . --write",
"lint": "pnpm eslint --fix src"
},
"workspaces": [
"common",
"server",
"www"
],
"dependencies": {
"@headlessui/react": "^1.7.11",
"@hookform/resolvers": "^2.9.11",
"@preact/signals": "^1.1.3",
"@talisman-connect/wallets": "^1.1.3",
"capi": "0.1.0-beta.26",
"preact": "^10.12.1",
"react-hook-form": "^7.43.3",
"react-router-dom": "^6.8.1",
"scale-codec": "0.11.0-beta.1",
"tailwind-merge": "^1.10.0",
"vite-tsconfig-paths": "^4.0.5",
"zod": "^3.20.6"
"zod": "^3.21.4"
},
"resolutions": {
"react": "preact/compat",
"react-dom": "preact/compat"
},
"devDependencies": {
"@babel/core": ">=7.12.10 <8.0.0",
"@preact/preset-vite": "^2.5.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.4.2",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"autoprefixer": "^10.4.13",
"clsx": "^1.2.1",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"postcss": "^8.4.21",
"prettier": "^2.8.4",
"prettier-plugin-tailwindcss": "^0.2.3",
"tailwindcss": "^3.2.7",
"typescript": "^4.9.5",
"vite": "^4.1.4"
"typescript": "^4.9.5"
},
"scripts": {
"compile": "tsc -b",
"watch:compile": "npm run compile -- -w",
"watch:server": "npm run watch -w server",
"watch:www": "npm run watch -w www",
"build": "npm run compile && npm run build -w www"
}
}
Loading

0 comments on commit cc5a44b

Please sign in to comment.