diff --git a/.eslintrc.js b/.eslintrc.js index 76dceafe..d480dd15 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,8 +50,13 @@ module.exports = { 'react/prop-types': 'off', // disable prop-types 'react/require-default-props': 'off', // disable require default props 'react/react-in-jsx-scope': 'off', // react in jsx scope - 'react/jsx-filename-extension': [2, { extensions: ['.ts', '.tsx'] }], + 'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }], 'react/function-component-definition': 'off', + "react/no-array-index-key": "off", + "react/jsx-props-no-spreading": "off", + "no-use-before-define": "off", + "import/no-default-export": "off", + "import/prefer-named-exports": "off", // TS '@typescript-eslint/no-explicit-any': 'warn', // disable explicit any diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 6b9d2313..ba8076c4 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -50,7 +50,7 @@ "deploy-factory": "hardhat run scripts/deploy-factory.ts --network", "deploy-spoils-manager": "hardhat run scripts/deploy-spoils-manager.ts --network", "deploy-zap": "hardhat run scripts/deploy-zap.ts --network", - "flatten-all": "yarn flatten-factory && yarn flatten-instant && yarn flatten-escrow && yarn flatten-updatable && yarn flatten-spoils && yarn flatten-zap && yarn flatten-dao-zap", + "flatten-all": "mkdir -p flat && yarn flatten-factory && yarn flatten-instant && yarn flatten-escrow && yarn flatten-updatable && yarn flatten-spoils && yarn flatten-zap && yarn flatten-dao-zap", "flatten-dao-zap": "hardhat flatten contracts/SafeSplitsDaoEscrowZap.sol > flat/SafeSplitsDaoEscrowZap.sol", "flatten-escrow": "hardhat flatten contracts/SmartInvoiceEscrow.sol > flat/SmartInvoiceEscrow.sol", "flatten-factory": "hardhat flatten contracts/SmartInvoiceFactory.sol > flat/SmartInvoiceFactory.sol", diff --git a/packages/docs/.eslintrc.js b/packages/docs/.eslintrc.js deleted file mode 100644 index bcd821e6..00000000 --- a/packages/docs/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - extends: '../../.eslintrc.js', - ignorePatterns: ['**/node_modules/*', 'dist/*', 'build/*'], - overrides: [ - { - // assuming docusaurus application - files: '**/pages/**/*.{ts,tsx,js,jsx}', - rules: { - 'import/no-default-export': 'off', // pages have to have a default export - 'import/prefer-default-export': 'error', - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['.tsx', '.jsx'], - }, - ], - }, - }, - ], -}; diff --git a/packages/docs/.firebaserc b/packages/docs/.firebaserc deleted file mode 100644 index e03996a1..00000000 --- a/packages/docs/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "smart-invoice-docs" - } -} diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md deleted file mode 100644 index 0d4b7203..00000000 --- a/packages/docs/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -# @smartinvoicexyz/docs - -## 0.1.17 - -### Patch Changes - -- updated useEscrowZap for DM - -## 0.1.7 - -### Patch Changes - -- - -## 0.1.6 - -### Patch Changes - -- fixed invoice pdf - -## 0.1.5 - -### Patch Changes - -- refactored chains - -## 0.1.4 - -### Patch Changes - -- view invoices without wallet - -## 0.1.3 - -### Patch Changes - -- publishing to npm - -## 0.1.2 - -### Patch Changes - -- using latest metadata schema - -## 0.1.1 - -### Patch Changes - -- Setting up changeset diff --git a/packages/docs/README.md b/packages/docs/README.md deleted file mode 100644 index 98e89930..00000000 --- a/packages/docs/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Smart Invoice Docs - -The Smart Invoice Docs package is a documentation site built with Docusaurus. It provides detailed guides, API references, and user instructions for the Smart Invoice protocol, helping developers and users understand and interact with the platform effectively. - -## Installation - -To set up the Smart Invoice documentation site locally, follow these steps: - -1. Clone the repository: - - ```bash - git clone https://github.com/SmartInvoiceXYZ/smart-invoice.git - cd smart-invoice/packages/docs - ``` - -2. Install the dependencies: - ```bash - pnpm install - ``` - -## Development - -To start the documentation site locally, run: - -```bash -pnpm start -``` - -This command starts the Docusaurus development server on `http://localhost:3000` and watches for file changes. - -## Building for Production - -To build the documentation site for production, run: - -```bash -pnpm build -``` - -This command generates an optimized static site in the `build` directory, ready to be deployed. - -## Deployment - -To deploy the documentation site, use the following command: - -```bash -pnpm deploy -``` - -This command builds the site and deploys it according to the configuration set in Docusaurus. - -## Cleaning Up - -To clear the Docusaurus cache and artifacts, run: - -```bash -pnpm clear -``` - -## Customization - -Docusaurus provides a `swizzle` command to customize components and themes. To use it: - -```bash -pnpm swizzle -``` - -This command allows you to extend or override the default components to better fit your needs. diff --git a/packages/docs/babel.config.js b/packages/docs/babel.config.js deleted file mode 100644 index e00595da..00000000 --- a/packages/docs/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], -}; diff --git a/packages/docs/docs/FAQ.md b/packages/docs/docs/FAQ.md deleted file mode 100644 index a1090a6e..00000000 --- a/packages/docs/docs/FAQ.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: FAQ ---- - -

- What is Lock? (CLIENT/PROVIDER) - -

 

- -###### Lock is a feature that allows clients and providers to lock the funds deposited into their smart invoice, triggering arbitration. - -###### If the client loses confidence in the provider at any time or the provider under delivers on their promise, the client may lock any remaining funds in smart invoice so they cannot be released or withdrawn. - -###### Alternatively, if the client has not released funds after a milestone is complete, the provider may lock any remaining funds in smart invoice. - -

- -

- What is Arbitration? (CLIENT/PROVIDER) - -

 

- -###### Arbitration is triggered by either the client or provider locking funds held by their smart invoice. Arbitration is the process of resolving a dispute between a client and a provider, and it is facilitated by a third-party adjudicator. - -

- -

- How does the dispute resolution process work? (CLIENT/PROVIDER) - -

 

- -###### Lock triggers the arbitration provider (i.e., LexDAO or Custom) to review and resolve the dispute. - -###### Based on their review, the arbitration provider will determine which party should receive "x" amount of funds, and will send a transaction to smart invoice that transfers the appropriate amount to each party. - -

- -

-How is Deposit different from Release? (CLIENT/PROVIDER) - -

 

- -###### Deposit is a function that allows the client to deposit funds into the milestone(s), and before or after the milestone is completed, the client can use the release function to release the funds to the provider for their service. In order to release funds, the client must first make a deposit! - -

- -

-Why can't I release or withdraw my payment? (CLIENT) - -

 

- -###### In order to release or withdraw your payment, first you will want to navigate to "view existing invoice" and check the status shown in the right column next to your smart invoice. If the status of your smart invoice shows: - -1. Awaiting deposit - this means you need to make a deposit, following your deposit you will be able to release payment -2. In dispute - You will not be able to release/withdraw payment until the dispute is resolved -3. Safety valve withdrawal date passed - -

- -

-Can I make multiple payments? (through “deposit” or “release”) to the provider with one transaction? (CLIENT) - -

 

- -###### Yes, you can execute one transaction for all milestone deposits and releases respectivley. - -

- -

-What statuses can an invoice have? (CLIENT/PROVIDER) - -

 

- -1. Awaiting Deposit -2. Funded -3. Completed -4. Expired -5. In dispute - -

- -

-What are the supported networks on Smart Invoice? (CLIENT/PROVIDER) - -

 

- -1. Ethereum Mainnet -2. Gnosis Chain -3. Polygon - -

- -##### Have additional questions? Drop into our discord where we will be happy to help you! https://discord.gg/M2QaDPgKFR diff --git a/packages/docs/docs/complete-invoice.md b/packages/docs/docs/complete-invoice.md deleted file mode 100644 index 6ca45ff9..00000000 --- a/packages/docs/docs/complete-invoice.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Complete Invoice (Provider) ---- - -Finally, you have submitted a transaction to complete your smart invoice Registration! We ask that you wait patiently for the transaction to be processed. - -![](https://i.imgur.com/YV1NGoE.png) - -After your transaction has processed, you should see the invoice has been registered. You can check to see the transaction by clicking just below the “Invoice Registered” header. - -![](https://i.imgur.com/Z4cIklf.png) - -Following submission, you will see a copyable link to your Invoice ID as well as a link to your invoice agreement. - -As a provider, send your `Invoice ID` or inform the client that they can input their wallet address into the “View Existing Invoice” tab on smartinvoice.xyz. This will enable the client to view the smart invoice and make payments to the provider. - -###### Note: The Invoice ID can be used to look up your invoice if you do not have access to the Client's Wallet Address provided intitailly. diff --git a/packages/docs/docs/creating-a-smart-invoice.md b/packages/docs/docs/creating-a-smart-invoice.md deleted file mode 100644 index 5e7c58da..00000000 --- a/packages/docs/docs/creating-a-smart-invoice.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Creating a Smart Invoice (Provider) ---- - -## Step 1: Project Details - -Here you will enter your project's details in sequential order: - -1. Project Name or ID -2. Link to Project Agreement -3. Project Description -4. Project Start / End / Safety Valve Withdrawal (Date) - -![](https://i.imgur.com/bwcIPM5.png) - -

- Mini Glossary - -

 

- -###### Project Name or ID - The name of your project - -###### Link to Project Agreement - Link to supporting documents or website - -###### Project Description - This acts as a brief explainer for your project - -###### Project Start / End / Safety Valve - These are the dates you will start, finish, and allow the client to withdraw all funds by. - -

- -

- What is Safety Valve and Why is it Important? -

 

- -###### Safety Valve is a built in function that allows the client to withdraw funds from the contract on the date specified in the date entry field. This can be a useful feature in the scenario that a provider goes unresponsive or bails on the project, in which case the client can withdraw all funds deposited into smart invoice on or after the Safety Valve date. - -

- -## Step 2: Payment Details - -In this step you will enter the following payment details: - -1. Client Address -2. Service Provider Address -3. Total Payment Due -4. Payment Token -5. Number of Payments -6. Arbitration Provider -7. Max Dispute Fee -8. Terms-of-Service - -![](https://i.imgur.com/1xe9znr.png) - -

- Mini Glossary - -

 

- -###### Client Address - Address the client will use to send funds to smart invoice - -###### Service Provider Address - Address the provider will use to receive funds from smart invoice - -###### Total Payment Due - Total amount your requesting for completing the project - -###### Payment Token - The token you wish to accept payment in - -###### Number of Payments - The count of payments broken down by milestone - -###### Arbitration Provider - This is the third party adjudicator responsible for providing a resoution if a dispute is raised - -###### Max Dispute Fee - This is the maximum fee the arbitration provider will charge on the remaining funds held in smart invoice - -###### Terms-of-Service - An agreement outlining the usage of the arbitration provider - -

- -## Step 3: Payment Chunks - -1. Enter Payment amount per milestone -2. Enter Amount up until total amount is paid - -![](https://i.imgur.com/gKrQLG5.png) - -## Step 4: Create Invoice - -Review that all of the details of your invoice are correct, if they are not you will want to re-enter the correct information in each of the fields you filled out incorrectly. - -![](https://i.imgur.com/zd5A8hZ.png) - -###### Note: If you enter the incorrect client address or if any of the information you provide in the smart invoice form is wrong, you will not be able to edit or change that information later. This is because every completed smart invoice form executes on-chain, meaning it cannot be reversed and is immutable. Therefore, take extra caution and make sure to double or triple check that the details you enter are correct. - -###### Note: By clicking on the “back” tab, you can navigate between previously completed steps in order to review or change any incorrect information inputted into the smart invoice form. (Do not click the back-arrow in the search engine or your previous entries will be lost) diff --git a/packages/docs/docs/deposit-or-release.md b/packages/docs/docs/deposit-or-release.md deleted file mode 100644 index 9dd81f57..00000000 --- a/packages/docs/docs/deposit-or-release.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Making Payment (Client) ---- - -If you are a client and would like to **make a deposit**, simply click the deposit button and select each of the milestones that you would like to make a deposit for, then click the deposit button that appears in the pop up. This will redirect you to your WalletConnect or your MetaMask to approve the transaction. - -![](https://i.imgur.com/a4Ofgf0.png) - -![](https://i.imgur.com/Qk0v8Z6.png) - -After you complete the transaction, you will see `Deposited` and the `Date` indicating that your deposit has been received by smart invoice. This does not indicate that the provider has received payment from you, but rather that smart invoice holds the funds you deposited, enabling you to release the funds when the first milestone is reached or lock the funds if you feel the provider hasn't delivered. - -![](https://i.imgur.com/EWcmDYb.png) - -After depositing, if you would like to **release payment** to the provider, you can click the release button, which will redirect you to your WalletConnect or MetaMask where you will be asked to approve the transaction. Once the transaction is complete, you will see `Released` and the `Date` indicating that your payment has been received by the provider wallet address. - -![](https://i.imgur.com/O5vsTwn.png) - -If for some reason you need to **lock** the funds you deposited into your smart invoice, click the lock button and approve the transaction with either your WalletConnect or MetaMask wallet. Then after the transaction approves, you can see in the status bar if you navigate back to `View Existing Invoice` that it is currently `In Dispute`. diff --git a/packages/docs/docs/glossary.md b/packages/docs/docs/glossary.md deleted file mode 100644 index 5254605e..00000000 --- a/packages/docs/docs/glossary.md +++ /dev/null @@ -1,10 +0,0 @@ -

- Mini Glossary - -

 

- -###### Lock triggers the arbitration provider (i.e., LexDAO or Custom) to review and resolve the dispute. - -###### Based on their review, the arbitration provider will determine which party should receive "x" amount of funds, and will send a transaction to smart invoice that transfers the appropriate amount to each party. - -

diff --git a/packages/docs/docs/how-does-it-work.md b/packages/docs/docs/how-does-it-work.md deleted file mode 100644 index 864e5200..00000000 --- a/packages/docs/docs/how-does-it-work.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: How Does it Work? ---- - -Smart Invoice leverages smart contracts built on Ethereum to create a framework by which service providers can rapidly create invoices and deploy them to xDai sidechain. - -After the provider has setup the smart invoice, the client can deposit their payment to smart invoice in the form of milestones. Milestones allow payment to be released by the client as work is completed by the provider. - -When a client deposits funds into a milestone or milstone(s), payment is sent to and held by smart invoice, and when the client releases those funds, they are sent to the service provider's wallet address. - -In the case either a client or provider decides to lock funds in smart invoice, a submission is made to a third party arbitration provider who will help by resolving the dispute. - -As a client or provider of Smart-Invoice, first you will need to visit https://smartinvoice.xyz - -Once you arrive at the landing page, you will have the option to select between “Create a New Smart Invoice” and “View Existing Invoice”. - -![](https://i.imgur.com/os8MWzA.png) diff --git a/packages/docs/docs/introducing-smart-invoice.md b/packages/docs/docs/introducing-smart-invoice.md deleted file mode 100644 index 8404ea52..00000000 --- a/packages/docs/docs/introducing-smart-invoice.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: What is Smart Invoice? ---- - -Smart Invoice is a sophisticated invoicing tool that facilitates payments between organizations or `Clients`, and freelancers or `Providers`. Smart Invoice establishes a set of shared expectations between a client and a provider who are engaged in business with one another. v1 features are as follows: - -1. Each invoice is its own contract -2. Deposits may come from any address -3. Client can make deposits by milestone -4. Milestone payments can be variable in size -5. Custom arbitration can be set (LexDAO or any Ethereum Address) -6. Client can deposit more than the total amount (for gratuity) -7. Tokens accidentally sent directly to invoice can be recovered - -

- Who Should Use Smart Invoice? -

 

- -##### An example of two parties using Smart Invoice could be a service provider and a consumer/client who want: - -###### 1. Streamlined Experience: A simple interface to create and view payments - -###### 2. Information Access: Reliable, auditable, and immutable information flows - -###### 3. Contractual Enforcement: Serviced through Impartial third-party dispute resolution - -

diff --git a/packages/docs/docs/view-existing-invoice.md b/packages/docs/docs/view-existing-invoice.md deleted file mode 100644 index 6c61ef33..00000000 --- a/packages/docs/docs/view-existing-invoice.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: View Existing Invoice(s) ---- - -1. Go to the Smart Invoice Landing Page -2. Click on "View Existing Invoices" -3. Enter Invoice ID or Client Wallet Address -4. Click on the invoice you want to select - -![](https://i.imgur.com/5WnmZQI.png) - -Now you can see the Invoice name on the left hand side, above the arbitration provider address and the project description. To the right, you can see payment details such as milestones, amount deposited, amount released, as well as remaining amount due. - -![](https://i.imgur.com/7yrrdJY.png) - -In the next section we will cover depositing, releasing, and locking payments to the provider. diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js deleted file mode 100644 index 2f1601ca..00000000 --- a/packages/docs/docusaurus.config.js +++ /dev/null @@ -1,84 +0,0 @@ -/** @type {import('@docusaurus/types').DocusaurusConfig} */ -module.exports = { - title: 'Smart Invoice FAQ', - tagline: 'Your #1 Guide to Smart Invoice', - url: 'https://your-docusaurus-test-site.com', - baseUrl: '/', - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', - favicon: 'img/logo.png', - organizationName: 'raid-guild', - projectName: 'smart-invoice', - themeConfig: { - navbar: { - title: 'Smart Invoice', - logo: { - alt: 'RaidGuild Logo', - src: 'img/logo.png', - }, - items: [ - { - href: 'https://smartinvoice.xyz', - label: 'Dapp', - position: 'right', - }, - { - href: 'https://github.com/raid-guild/smart-invoice', - label: 'GitHub', - position: 'right', - }, - ], - }, - footer: { - style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Getting Started', - to: 'docs/introducing-smart-invoice', - position: 'left', - }, - { - label: 'GitHub', - href: 'https://github.com/raid-guild/smart-invoice', - position: 'left', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Discord', - href: 'https://discord.gg/CanD2WcK7W', - position: 'right', - }, - { - label: 'Twitter', - href: 'https://twitter.com/RaidGuild', - position: 'right', - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} RaidGuild, DAO`, - }, - }, - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - sidebarPath: require.resolve('./sidebars.js'), - editUrl: - 'https://github.com/raid-guild/smart-invoice/edit/master/packages/docs/', - }, - theme: { - customCss: require.resolve('./src/css/custom.css'), - }, - }, - ], - ], -}; diff --git a/packages/docs/package.json b/packages/docs/package.json deleted file mode 100644 index 033d4767..00000000 --- a/packages/docs/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@smartinvoicexyz/docs", - "description": "Documentation site for the Smart Invoice protocol, built with Docusaurus to provide comprehensive guides, API references, and user instructions.", - "version": "0.1.17", - "browserslist": { - "production": [ - ">0.5%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "dependencies": { - "@docusaurus/core": "^2.0.0", - "@docusaurus/preset-classic": "^2.0.0", - "@mdx-js/react": "^1.6.21", - "clsx": "^1.1.1", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "eslint-plugin-import": "^2.29.1" - }, - "private": true, - "scripts": { - "build": "docusaurus build", - "clear": "docusaurus clear", - "deploy": "docusaurus deploy", - "docusaurus": "docusaurus", - "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"", - "serve": "docusaurus serve", - "start": "docusaurus start", - "swizzle": "docusaurus swizzle", - "write-heading-ids": "docusaurus write-heading-ids", - "write-translations": "docusaurus write-translations" - } -} diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js deleted file mode 100644 index dba9e14b..00000000 --- a/packages/docs/sidebars.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = { - docs: [ - { - type: 'category', - label: 'Overview', - items: [ - 'introducing-smart-invoice', - 'how-does-it-work', - 'creating-a-smart-invoice', - 'complete-invoice', - 'view-existing-invoice', - 'deposit-or-release', - 'FAQ', - ], - }, - ], -}; diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.css deleted file mode 100644 index 67231f9f..00000000 --- a/packages/docs/src/css/custom.css +++ /dev/null @@ -1,25 +0,0 @@ -/* stylelint-disable docusaurus/copyright-header */ -/** - * Any CSS included here will be global. The classic template - * bundles Infima by default. Infima is a CSS framework designed to - * work well for content-centric websites. - */ - -/* You can override the default Infima variables here. */ -:root { - --ifm-color-primary: #f53862; - --ifm-color-primary-dark: rgb(224, 52, 89); - --ifm-color-primary-darker: rgb(191, 44, 76); - --ifm-color-primary-darkest: rgb(153, 35, 61); - --ifm-color-primary-light: rgb(243, 68, 109); - --ifm-color-primary-lighter: rgb(239, 89, 122); - --ifm-color-primary-lightest: rgb(239, 120, 147); - --ifm-code-font-size: 95%; -} - -.docusaurus-highlight-code-line { - background-color: rgb(72, 77, 91); - display: block; - margin: 0 calc(-1 * var(--ifm-pre-padding)); - padding: 0 var(--ifm-pre-padding); -} diff --git a/packages/docs/src/pages/index.jsx b/packages/docs/src/pages/index.jsx deleted file mode 100644 index 02445f4b..00000000 --- a/packages/docs/src/pages/index.jsx +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint-disable import/no-unresolved */ -import Link from '@docusaurus/Link'; -import useBaseUrl from '@docusaurus/useBaseUrl'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import clsx from 'clsx'; -import React from 'react'; - -import getHashCode from '../util/getHashCode'; -import styles from './styles.module.css'; - -const features = [ - { - title: 'Streamlined Experience', - imageUrl: 'img/undraw_docusaurus_mountain.svg', - description: <>Enabling a simple interface to create and view payments, - }, - { - title: 'Information Access', - imageUrl: 'img/undraw_docusaurus_tree.svg', - description: ( - <>Providing reliable, auditable, and immutable information flows. - ), - }, - { - title: 'Contractual Enforcement', - imageUrl: 'img/undraw_docusaurus_react.svg', - description: <>Through Impartial third-party dispute resolution, - }, -]; - -function Feature({ imageUrl, title, description }) { - const imgUrl = useBaseUrl(imageUrl); - return ( -
- {imgUrl && ( -
- {title} -
- )} -

{title}

-

{description}

-
- ); -} - -export default function Home() { - const context = useDocusaurusContext(); - const { siteConfig = {} } = context; - return ( - -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

-
- - Get Started - -
-
-
-
- {features && features.length > 0 && ( -
-
-
- {features.map(props => ( - // eslint-disable-next-line react/jsx-props-no-spreading - - ))} -
-
-
- )} -
-
- ); -} diff --git a/packages/docs/src/pages/styles.module.css b/packages/docs/src/pages/styles.module.css deleted file mode 100644 index c1aa8512..00000000 --- a/packages/docs/src/pages/styles.module.css +++ /dev/null @@ -1,37 +0,0 @@ -/* stylelint-disable docusaurus/copyright-header */ - -/** - * CSS files with the .module.css suffix will be treated as CSS modules - * and scoped locally. - */ - -.heroBanner { - padding: 4rem 0; - text-align: center; - position: relative; - overflow: hidden; -} - -@media screen and (max-width: 966px) { - .heroBanner { - padding: 2rem; - } -} - -.buttons { - display: flex; - align-items: center; - justify-content: center; -} - -.features { - display: flex; - align-items: center; - padding: 2rem 0; - width: 100%; -} - -.featureImage { - height: 200px; - width: 200px; -} diff --git a/packages/docs/src/util/getHashCode.js b/packages/docs/src/util/getHashCode.js deleted file mode 100644 index f019425a..00000000 --- a/packages/docs/src/util/getHashCode.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable no-bitwise */ -function getHashCode(string) { - let hash = 0; - - if (string.length === 0) return hash; - - for (let i = 0; i < string.length; i += 1) { - const char = string.charCodeAt(i); - hash &= (hash << 5) - hash + char; - } - - return hash; -} - -module.exports = getHashCode; diff --git a/packages/docs/static/.nojekyll b/packages/docs/static/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/docs/static/img/logo.png b/packages/docs/static/img/logo.png deleted file mode 100644 index ddae4e59..00000000 Binary files a/packages/docs/static/img/logo.png and /dev/null differ diff --git a/packages/docs/static/img/undraw_docusaurus_mountain.svg b/packages/docs/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index c22be866..00000000 --- a/packages/docs/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/docs/static/img/undraw_docusaurus_react.svg b/packages/docs/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index 6495c84f..00000000 --- a/packages/docs/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/docs/static/img/undraw_docusaurus_tree.svg b/packages/docs/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index c9b6ffaf..00000000 --- a/packages/docs/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1 +0,0 @@ -docu_tree diff --git a/packages/website/.eslintrc.json b/packages/website/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/packages/website/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/packages/website/.gitignore b/packages/website/.gitignore new file mode 100644 index 00000000..c87c9b39 --- /dev/null +++ b/packages/website/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/packages/website/README.md b/packages/website/README.md new file mode 100644 index 00000000..b12f3e33 --- /dev/null +++ b/packages/website/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/packages/website/components/about/Hero.jsx b/packages/website/components/about/Hero.jsx new file mode 100644 index 00000000..c486060c --- /dev/null +++ b/packages/website/components/about/Hero.jsx @@ -0,0 +1,40 @@ +import { Flex, Heading, Text, VStack } from '@chakra-ui/react'; +import React from 'react'; + +export function HeroSection({ ...props }) { + return ( + + + + Get to know Smart Invoice + + + About Us + + + + ); +} diff --git a/packages/website/components/about/Story.jsx b/packages/website/components/about/Story.jsx new file mode 100644 index 00000000..c422d3ff --- /dev/null +++ b/packages/website/components/about/Story.jsx @@ -0,0 +1,184 @@ +import { Flex, Grid, GridItem, Heading, Link, Text } from '@chakra-ui/react'; +import NextImage from 'next/image'; +import { useEffect, useState } from 'react'; + +import asset2 from '../../public/assets/about/escrow-invoice-original-2.svg'; +import asset1 from '../../public/assets/about/rg-laptop-1.svg'; +import asset3 from '../../public/assets/product-about-3.svg'; + +export function Story({ ...props }) { + const [columns, setColumns] = useState(2); + + useEffect(() => { + if (window) { + adjustColumns(); + window.addEventListener('resize', adjustColumns); + } + }); + + function adjustColumns() { + if (window.innerWidth < 800) { + setColumns(1); + } else { + setColumns(2); + } + } + + return ( + + + Our Story + + + + In October 2020, a development service DAO by the name of{' '} + + RaidGuild + {' '} + realized they had a problem: there was no easy, or affordable, way + to safely transact with their web3 clients. + + + Without the safeguards of the traditional banking system, a simple + mistake when transferring cryptocurrencies could result in all + funds being lost forever. Not ideal for the DAO, or the client. + + + An invoicing system was needed. + + But that wasn’t enough. + + In the web3 world, it’s normal to “do business” with people you + don’t know, and who don’t share their real identity with you. + + + So there needed to be a way to ensure the service provider didn’t + run away with the money, and the client didn’t run away without + paying. + + + An escrow system was needed. + + But that still wasn’t enough. + + What if there was a dispute? How would the funds get released from + escrow? Who would make that decision, and would they be unbiased? + + + + + + + + + + + Integrated arbitration was needed. + + But that still wasn’t enough. + + Who would control this invoicing, escrow, and arbitration tool? + Would there be a conflict of interest if the DAO controlled the + technology behind the payment system, and was the service + provider? + + + Smart contracts were needed. + + + So a team of RaidGuild developers began building a tool that + combined cryptocurrency invoicing, escrow, arbitration, and smart + contracts. + + + The result was an internal tool called Smart Escrow. + + + It solved the DAO’s biggest challenges when transacting with web3 + clients, and was provably safe to use. This tool proved to be so + effective and popular with clients, that the DAO decided to create + a public version that anyone online could use, even if they were + not part of the RaidGuild DAO. + + And so… Smart Invoice was born. + + + + As time went by, several members of the DAO realized Smart Invoice + was just a bit too difficult to use by non-developers. And that it + didn’t provide similar functionality to the web2 software most + freelancers already used. + + + So this new team of 4 decided to reboot Smart Invoice to make it + even more powerful and easier to use, so that any freelancer, + anywhere, could safely get paid for their work with + cryptocurrency. + + + MolochDAO supported the team’s vision and awarded them with a + grant so they could build the ultimate crypto invoicing and escrow + tool as a public good. + + + Since then, the team has been working hard to build the Smart + Invoice you see today. + + + + + + + + + ); +} diff --git a/packages/website/components/about/Supporters.jsx b/packages/website/components/about/Supporters.jsx new file mode 100644 index 00000000..12fbcd3c --- /dev/null +++ b/packages/website/components/about/Supporters.jsx @@ -0,0 +1,68 @@ +import { Box, Flex, Heading, Text, VStack } from '@chakra-ui/react'; +import NextImage from 'next/image'; +import NextLink from 'next/link'; +import { useEffect, useState } from 'react'; + +import mdLogo from '../../public/logos/molochdao.svg'; +import rgLogo from '../../public/logos/raidguild.svg'; + +export function Supporters({ ...props }) { + const [flexDirection, setFlexDirection] = useState('row'); + const [alignment, setAlignment] = useState('flex-start'); + + useEffect(() => { + if (window) { + changeFlexDirection(); + window.addEventListener('resize', changeFlexDirection); + } + }); + + function changeFlexDirection() { + if (window.innerWidth < 800) { + setFlexDirection('column'); + setAlignment('center'); + } else { + setFlexDirection('row'); + setAlignment('flex-start'); + } + } + + return ( + + + Our Supporters + Meet the organizations helping Smart Invoice succeed. + + + + + + + In October 2020, several members of Raid Guild DAO began + developing the initial version of Smart Invoice as an internal + tool to handle invoicing and escrow for the contract work the DAO + provided to clients. + + + + + + + + In May 2022, the MolochDAO community passed an $82,000 grant + proposal to support the continued development of Smart Invoice as + a public good. + + + + + + ); +} diff --git a/packages/website/components/about/Team.jsx b/packages/website/components/about/Team.jsx new file mode 100644 index 00000000..44f36f0a --- /dev/null +++ b/packages/website/components/about/Team.jsx @@ -0,0 +1,173 @@ +import { Box, Flex, Grid, GridItem, Heading, Text } from '@chakra-ui/react'; +import NextImage from 'next/image'; +import NextLink from 'next/link'; + +import facebookIcon from '../../public/icons/socials/facebook.svg'; +import githubIcon from '../../public/icons/socials/github.svg'; +import linkedinIcon from '../../public/icons/socials/linkedin.svg'; +import twitterIcon from '../../public/icons/socials/twitter.svg'; +import websiteIcon from '../../public/icons/socials/website.svg'; +import bingoPfp from '../../public/pfp/bingo.svg'; +import dan13ramPfp from '../../public/pfp/dan13ram.svg'; +import georgehPfp from '../../public/pfp/georgeh.svg'; +import jaqiPfp from '../../public/pfp/jaqi.svg'; +import launchninjaPfp from '../../public/pfp/launchninja.svg'; +import manoPfp from '../../public/pfp/manolingam.svg'; +import plorPfp from '../../public/pfp/plor.svg'; +import spengrahPfp from '../../public/pfp/spengrah.svg'; +import tufnelPfp from '../../public/pfp/tufnel.svg'; + +// TODO: update team to 2025 +export function TeamSection() { + const teamMembers = [ + { + name: 'launchninja', + position: 'Product Lead', + pfp: launchninjaPfp, + twitter: 'https://twitter.com/launchninja0x', + }, + { + name: 'plor', + position: 'Project Manager', + pfp: plorPfp, + twitter: 'https://twitter.com/plor', + github: 'https://github.com/plor', + }, + { + name: 'Tufnel_Enterprises', + position: 'Developer', + pfp: tufnelPfp, + github: 'https://github.com/psparacino', + }, + { + name: 'georgeh', + position: 'Developer', + pfp: georgehPfp, + github: 'https://github.com/geovgy', + }, + { + name: 'spengrah', + position: 'Developer', + pfp: spengrahPfp, + twitter: 'https://twitter.com/spengrah', + }, + { + name: 'dan13ram', + position: 'Developer', + pfp: dan13ramPfp, + twitter: 'https://twitter.com/dan13ram', + }, + { + name: 'manolingam', + position: 'Developer', + pfp: manoPfp, + twitter: 'http://twitter.com/saimano1996', + }, + { + name: 'Jaqi', + position: 'Designer', + pfp: jaqiPfp, + twitter: 'https://twitter.com/jaclynlenee', + linkedin: 'https://www.linkedin.com/in/jaclynlenee/', + website: 'https://www.jaclynlenee.com/', + }, + { + name: 'Bingo', + position: 'Designer', + pfp: bingoPfp, + website: 'https://www.bingothedesigner.com/', + }, + ]; + + return ( + + + A team of exceptional people + + + Meet the team, past and present, that’s worked to make crypto invoicing + and escrow free for all web3 freelancers. + + + + {teamMembers.map(member => ( + + + + {member.name} + + + {member.position} + + + {member.facebook && ( + + + + )} + {member.twitter && ( + + + + )} + {member.linkedin && ( + + + + )} + {member.github && ( + + + + )} + {member.website && ( + + + + )} + + + ))} + + + + ); +} diff --git a/packages/website/components/about/Testimonials.jsx b/packages/website/components/about/Testimonials.jsx new file mode 100644 index 00000000..f6168cd9 --- /dev/null +++ b/packages/website/components/about/Testimonials.jsx @@ -0,0 +1,89 @@ +import { + Box, + Button, + Flex, + Grid, + GridItem, + Heading, + Text, +} from '@chakra-ui/react'; +import NextImage from 'next/image'; +import NextLink from 'next/link'; + +import quoteIcon from '../../public/quote-icon.svg'; + +export function Testimonials({ ...props }) { + const testimonials = [ + { + id: 1, + quote: + "This is the best invoicing tool we've ever used to accept crypto payments. It rocks!", + name: 'John Smith', + title: 'Title', + company: 'Company', + }, + { + id: 2, + quote: 'Another testimonial statement.', + name: 'Jane Doe', + title: 'Title', + company: 'Company', + }, + { + id: 3, + quote: 'Hello world!', + name: 'Joe Jones', + title: 'Title', + company: 'Company', + }, + ]; + + return ( + + + + + What web3 freelancers are saying + + Here’s what a few freelancers have to say about Smart Invoice and + their experience. + + + + + + + + {testimonials.map(item => ( + + + + + {item.quote} + + + + + {item.name} + + {item.title} + + + ))} + + + + ); +} diff --git a/packages/website/components/doc-layout/DocLayout.jsx b/packages/website/components/doc-layout/DocLayout.jsx new file mode 100644 index 00000000..95b925ee --- /dev/null +++ b/packages/website/components/doc-layout/DocLayout.jsx @@ -0,0 +1,261 @@ +import { + Button, + Drawer, + DrawerBody, + DrawerCloseButton, + DrawerContent, + DrawerFooter, + DrawerHeader, + DrawerOverlay, + Flex, + Link, + Text, + useBreakpointValue, + useDisclosure, + VStack, +} from '@chakra-ui/react'; +import Head from 'next/head'; +import { useRouter } from 'next/router'; +import Script from 'next/script'; +import React, { useEffect, useState } from 'react'; + +import { docV3Menu } from '../../sidebars'; +import { Footer } from '../layout/Footer'; +import { NavBar } from '../layout/NavBar'; + +export function DocLayout({ children, title, active }) { + const [category, setCategory] = useState(''); + const [isLoaded, setIsLoaded] = useState(false); + const router = useRouter(); + + const { isOpen, onOpen, onClose } = useDisclosure(); + const mobile = useBreakpointValue({ base: true, lg: false }); + const mobileMenuBtnRef = React.useRef(); + + useEffect(() => { + const docMenuItem = docV3Menu.find(item => + router.pathname.includes(item.path), + ); + setCategory(docMenuItem.category); + setIsLoaded(true); + }, [router.pathname]); + + return ( + + + + + {title} | Smart Invoice Documentation + + + + + + + + + + + + + + +