Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
50 changes: 50 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
21 changes: 21 additions & 0 deletions app/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "stone",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
29 changes: 29 additions & 0 deletions app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-explicit-any': false,
},
},
);
13 changes: 13 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/ario.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>VAOT Multisig</title>
</head>
<body class="bg-stone-950 overflow-hidden">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
60 changes: 60 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "voat",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "NODE_OPTIONS=--max-old-space-size=32768 vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@ar.io/sdk": "^3.6.0-alpha.4",
"@headlessui/react": "^2.2.0",
"@monaco-editor/react": "^4.7.0",
"@permaweb/aoconnect": "0.0.65",
"@project-kardeshev/ao-wallet-kit": "^1.0.2-alpha.6",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-radio-group": "^1.2.3",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@tailwindcss/vite": "^4.0.6",
"@tanstack/react-query": "^5.66.0",
"@tanstack/react-router": "^1.102.5",
"@tanstack/react-table": "^8.21.2",
"arweave": "^1.15.5",
"class-variance-authority": "^0.7.1",
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"lottie-react": "^2.4.1",
"lucide-react": "^0.475.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "^2.5.1",
"react-json-view": "^1.21.3",
"react-resizable-panels": "^2.1.7",
"react-router-dom": "^7.1.5",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.6",
"tailwindcss-animate": "^1.0.7",
"zustand": "5.0.0"
},
"devDependencies": {
"@eslint/js": "^9.19.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"typescript": "~5.7.2",
"typescript-eslint": "^8.22.0",
"vite": "^6.1.0",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-svgr": "^4.3.0"
}
}
9 changes: 9 additions & 0 deletions app/public/ario.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { RouterProvider, createHashRouter } from 'react-router-dom';
import Layout from './components/pages/Layout';
import Home from './components/pages/Home';
import NotFound from './components/pages/NotFound';
import Dashboard from './components/pages/Dashboard';

function App() {
const router = createHashRouter([
{
path: '/',
element: <Layout />,
errorElement: <NotFound />,
children: [
{ index: true, element: <Home /> },
{ path: '/:id', element: <Dashboard /> },
],
},
]);

return (
<>
<RouterProvider router={router} />
</>
);
}

export default App;
1 change: 1 addition & 0 deletions app/src/assets/react.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/components/animations/ario-spinner.json

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions app/src/components/buttons/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { CopyCheckIcon, CopyIcon } from 'lucide-react';
import { MouseEvent, useState } from 'react';

const CopyButton = ({ textToCopy }: { textToCopy: string }) => {
const [copiedVisible, setCopiedVisible] = useState(false);
const [timeoutId, setTimeoutId] = useState<any>();

const copyAction = (e: MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
setCopiedVisible(true);
navigator.clipboard.writeText(textToCopy);

clearTimeout(timeoutId);
const newTimeoutId = setTimeout(() => {
setCopiedVisible(false);
}, 1000);
setTimeoutId(newTimeoutId);
};

return (
<div className="relative">
<div
className={`${copiedVisible ? 'visible' : 'invisible'} bg-stone-600 absolute -left-7 -top-12 z-50 rounded-lg border border-grey-500 border-stone-500 p-2`}
>
Copied!
<div
className={`absolute bottom-[-.3125rem] left-[1.875rem] size-2.5 rotate-45 border border-grey-500 bg-stone-500 [clip-path:polygon(0%_100%,100%_0,100%_100%)]`}
/>
</div>
<button onClick={copyAction}>
{copiedVisible ? (
<CopyCheckIcon className="size-4 opacity-65" />
) : (
<CopyIcon className="size-4 opacity-65" />
)}
</button>
</div>
);
};

export default CopyButton;
54 changes: 54 additions & 0 deletions app/src/components/cards/ProcessInfoCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { useProcessInfo } from '@/hooks/useProcessInfo';
import ArIOSpinner from '../loading/ArIOSpinner';
import ReactJsonView from 'react-json-view';
import { isArweaveTransactionID } from '@/utils';

function ProcessInfoCard({ processId }: { processId?: string }) {
const {
data: processInfo,
isLoading: isLoadingProcessInfo,
error,
refetch,
} = useProcessInfo(processId);

return (
<div className="flex flex-col justify-center items-center bg-stone-900 rounded p-2 min-h-[200px]">
{!isArweaveTransactionID(processId) && (
<div className="text-red-600">Invalid Process ID</div>
)}
{isLoadingProcessInfo && (
<div className="flex flex-col items-center">
<ArIOSpinner width={'50px'} height={'50px'} className="size-20" />
<span> Loading Process Info... </span>
</div>
)}
{error && (
<span className="text-red-600">
Error loading Process Info: {error.message}{' '}
<button onClick={() => refetch()}>Retry</button>
</span>
)}

{processInfo && (
<div className="flex flex-col size-full max-h-[250px]">
<ReactJsonView
src={processInfo}
theme="summerfruit"
style={{
width: '100%',
height: '100%',
overflow: 'auto', // Ensures scrolling when needed
textAlign: 'left', // Ensures left-aligned text
}}
name={null}
indentWidth={2}
displayDataTypes={false}
displayObjectSize={false}
/>
</div>
)}
</div>
);
}

export default ProcessInfoCard;
35 changes: 35 additions & 0 deletions app/src/components/data-display/Resizable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from '@/components/ui/resizable';
import React, { ReactNode } from 'react';

export function ResizablePanels({
children,
showHandle = true,
direction = 'horizontal',
className,
size,
}: {
children: ReactNode[];
showHandle?: boolean;
direction?: 'horizontal' | 'vertical';
className?: string;
size?: (index: number) => number;
}) {
return (
<ResizablePanelGroup direction={direction} className={className}>
{children.map((child, index) => (
<React.Fragment key={index}>
<ResizablePanel defaultSize={size?.(index) ?? 50}>
{child}
</ResizablePanel>
{showHandle && index < children.length - 1 && (
<ResizableHandle withHandle={showHandle} />
)}
</React.Fragment>
))}
</ResizablePanelGroup>
);
}
Loading