forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples/cbdc): migrate frontend to Typescript
* Closes hyperledger-cacti#2817 * Depends on hyperledger-cacti#2912 Signed-off-by: André Augusto <[email protected]>
- Loading branch information
1 parent
6a27b7c
commit 358861d
Showing
35 changed files
with
806 additions
and
730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
|
||
|
||
FROM node:16-alpine | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY ./examples/cbdc-bridging-fabric-evm-frontend/package.json ./ | ||
COPY package.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY ./examples/cbdc-bridging-fabric-evm-frontend/ . | ||
COPY . . | ||
|
||
EXPOSE 2000 | ||
|
||
CMD [ "npm", "start" ] | ||
CMD [ "npm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
# Available Scripts | ||
# Getting Started with Create React App | ||
|
||
In the project directory, you can run: | ||
## Run with Docker | ||
|
||
## `npm start` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
### Using a pre-built image | ||
|
||
The page will reload when you make changes.\ | ||
You may also see any lint errors in the console. | ||
`docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend` | ||
|
||
## `npm test` | ||
### Building the image | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
```docker build -t cbdc-app-frontend . | ||
docker run -p 2000:2000 cbdc-app-frontend``` | ||
## `npm run build` | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
## `npm start` | ||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
Runs the app in the development mode.\ | ||
Open [http://localhost:2000](http://localhost:2000) to view it in the browser. | ||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,39 @@ | ||
{ | ||
"name": "@hyperledger/cacti-example-cbdc-bridging-frontend", | ||
"version": "2.0.0-alpha.2", | ||
"description": "An example UI showing how to use Cacti when implementing a CBDC bridging application between Hyperledger Fabric and Hyperledger Besu.", | ||
"keywords": [ | ||
"Hyperledger", | ||
"Cacti", | ||
"ODAP", | ||
"Fabric", | ||
"Besu", | ||
"Blockchain", | ||
"CBDC" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/hyperledger/cacti/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/hyperledger/cacti.git" | ||
}, | ||
"license": "Apache-2.0", | ||
"contributors": [ | ||
{ | ||
"name": "Please add yourself to the list of contributors", | ||
"email": "[email protected]", | ||
"url": "https://example.com" | ||
}, | ||
{ | ||
"name": "Peter Somogyvari", | ||
"email": "[email protected]", | ||
"url": "https://accenture.com" | ||
}, | ||
{ | ||
"name": "André Augusto", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"name": "cbdc-app-frontend", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@emotion/react": "11.11.1", | ||
"@emotion/styled": "11.11.0", | ||
"@mui/material": "5.14.13", | ||
"@mui/styles": "5.14.13", | ||
"axios": "1.5.1", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"uuid": "9.0.1" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-react-app": "7.0.1", | ||
"react-scripts": "5.0.1" | ||
"@emotion/react": "^11.11.1", | ||
"@emotion/styled": "^11.11.0", | ||
"@mui/icons-material": "^5.14.19", | ||
"@mui/material": "^5.14.19", | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^13.4.0", | ||
"@testing-library/user-event": "^13.5.0", | ||
"@types/jest": "^27.5.2", | ||
"@types/node": "^16.18.66", | ||
"@types/react": "^18.2.39", | ||
"@types/react-dom": "^18.2.17", | ||
"axios": "^1.6.2", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-scripts": "5.0.1", | ||
"typescript": "^4.9.5", | ||
"uuid": "^9.0.1", | ||
"web-vitals": "^2.1.4" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": {}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
|
@@ -67,5 +45,8 @@ | |
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/uuid": "^9.0.7" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
examples/cactus-example-cbdc-bridging-frontend/src/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import HomePage from './pages/HomePage'; | ||
import { CssBaseline } from '@mui/material'; | ||
import './App.css'; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<CssBaseline /> | ||
<HomePage /> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.