Skip to content

Commit

Permalink
Init app
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed May 26, 2023
0 parents commit 3719d94
Show file tree
Hide file tree
Showing 69 changed files with 30,047 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_NODE_ADDRESS=wss://node-workshop.gear.rs:443
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',

// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md#when-not-to-use-it
// https://github.com/yannickcr/eslint-plugin-react/issues/3052#issuecomment-1017555974
'plugin:react/jsx-runtime',

'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'react/require-default-props': 'off', // we don't use prop-types

'import/prefer-default-export': 'off', // force named exports
'import/no-default-export': 'error',

'@typescript-eslint/no-unused-vars': 'warn', // 'error' is not convinient in development

'consistent-return': 'off', // we want functions to have different return behavior

'react/jsx-props-no-spreading': ['error', { exceptions: ['Input', 'FileInput', 'Textarea', 'Select'] }], // disable for form elements, cuz @mantine/form input props needs to be desctructured
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<p align="center">
<a href="https://gear-tech.io">
<img src="https://github.com/gear-tech/gear/blob/master/images/logo-grey.png" width="400" alt="GEAR">
</a>
</p>
<p align=center>
<a href="https://github.com/gear-tech/gear-js/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-GPL%203.0-success"></a>
</p>
<hr>

## Description

A ready-made application template with a well-thought-out infrastructure for quickly turning the application on Gear blockchain.

## Installation

Simply clone this repo to your local folder

```sh
git clone https://github.com/gear-dapps/react-app.git d-app
```
35 changes: 35 additions & 0 deletions _README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<p align="center">
<a href="https://gear-tech.io">
<img src="https://github.com/gear-tech/gear/blob/master/images/logo-grey.png" width="400" alt="GEAR">
</a>
</p>
<p align=center>
<a href="https://github.com/gear-tech/gear-js/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-GPL%203.0-success"></a>
</p>
<hr>

## Description

React application of [_wiki link_](#) based on [Rust smart-contract](#).

## Getting started

### Install packages:

```sh
yarn install
```

### Declare environment variables:

Create `.env` file, `.env.example` will let you know what variables are expected.

In order for all features to work as expected, the node and it's runtime version should be chosen based on the current `@gear-js/api` version.

In case of issues with the application, try to switch to another network or run your own local node and specify its address in the .env file. When applicable, make sure the smart contract(s) wasm files are uploaded and running in this network accordingly.

### Run the app:

```sh
yarn start
```
6 changes: 6 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const webpack = require('webpack');

module.exports = (config) => {
config.plugins.push(new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] }));
return config;
};
20 changes: 20 additions & 0 deletions gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Loading

0 comments on commit 3719d94

Please sign in to comment.