Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilSharma03 committed Dec 29, 2023
1 parent c65a0a7 commit 825f900
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 32 deletions.
40 changes: 13 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,78 +51,64 @@ src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&log

## Setup and Installation

First install ethereum dependencies
First install contract dependencies

```
make setup-eth-libs
make setup-contract-libs
```

After making changes to Smart Contract (Solidity), Compile solidity smart contract
After making changes to Smart Contract, Compile solidity smart contract

```
make compile-eth-contract
make compile-contract
```

After compiling, test solidity smart contract

```
make test-eth-contract
make test-contract
```

After tests runs successfully, you are set to deploy the application.

For that first add `Environment Variables` by creating a new `.env` file in `ethereum` folder and add the contents following `.env.example`
For that first add `Environment Variables` by creating a new `.env` file in `contract` folder and add the contents following `.env.example`

Once you have added correct credentials, deploy the smart contract

```
make deploy-eth-contract
make deploy-contract
```

Once you have successfully deployed the smart contract, you will find the address of your deployed smart contract in the terminal, copy that as it will be required in frontend to interact with your smart contract

The live application is using contract deployed at `0x0dcba90ec9a960d72fdee71aee694e975fffeeed`

<br>

Now, Lets start by installing frontend ui dependencies
Now, Lets start by installing ui dependencies

```
make setup-ui-libs
```

Now add `Environment Variables` by creating a new `.env` file in `frontend` folder and add the contents following `.env.example`

After adding `Environment Variables`, copy and paste the `.json` files from `ethereum/build` to `frontend/src/web3/campaign`
Now add `Environment Variables` by creating a new `.env` file in `ui` folder and add the contents following `.env.example`

Now, Run the ui

```
make run-ui
make run-ui-dev
```

now the application is running at `localhost:3000`

To build the frontend ui
To build the ui

```
make build-ui
```

<br>

If we want to use Docker, first go to `frontend` folder and build docker image,

```
docker build -t aeiou-ui .
```

Now, we can use the image

```
docker run -p 3000:3000 aeiou-ui
```

<br>

# License

<div align="center">
Expand Down
181 changes: 181 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"homepage": "https://nikhilsharma03.github.io/AEIOU/",
"name": "aeiou-ui",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
"dependencies": {
"@reduxjs/toolkit": "^1.8.1",
Expand Down Expand Up @@ -42,7 +45,8 @@
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"typescript": "^4.6.3",
"url": "^0.11.0"
"url": "^0.11.0",
"gh-pages": "^5.0.0"
},
"browserslist": {
"production": [
Expand Down
6 changes: 3 additions & 3 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
import { HashRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import 'tippy.js/dist/tippy.css';
import { store } from './redux/store/store';
Expand All @@ -14,9 +14,9 @@ const root = ReactDOM.createRoot(
root.render(
<React.StrictMode>
<Provider store={store}>
<BrowserRouter>
<HashRouter>
<App />
</BrowserRouter>
</HashRouter>
</Provider>
</React.StrictMode>
);
Expand Down

0 comments on commit 825f900

Please sign in to comment.