Skip to content

Commit cf274b7

Browse files
authored
Merge pull request #61 from Comcast/testnet
Merge Testnet into Main
2 parents 5fe2a26 + 7fa093f commit cf274b7

File tree

3 files changed

+90
-47
lines changed

3 files changed

+90
-47
lines changed

.env.sample

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
VUE_APP_DCL_API_NODE=https://<<YourHostName>>/api
2-
VUE_APP_DCL_RPC_NODE=https://<<YourHostName>>/rpc
3-
VUE_APP_DCL_WEBSOCKET_NODE=wss://<<YourHostName>>:443/websocket
4-
VUE_APP_DCL_CHAIN_ID=testnet-2.0
5-
VUE_APP_DCL_ADDR_PREFIX=cosmos
6-
VUE_APP_DCL_SDK_VERSION=Stargate
7-
VUE_APP_DCL_TX_API=/rpc/tx?hash=0x
8-
VUE_APP_DCL_REFRESH=500000
1+
VITE_APP_DCL_API_NODE=https://<<YourHostName>>/api
2+
VITE_APP_DCL_RPC_NODE=https://<<YourHostName>>/rpc
3+
VITE_APP_DCL_WEBSOCKET_NODE=wss://<<YourHostName>>:443/websocket
4+
VITE_APP_DCL_CHAIN_ID=testnet-2.0
5+
VITE_APP_DCL_CHAIN_NAME=dclchain-testnet
6+
VITE_APP_DCL_ADDR_PREFIX=cosmos
7+
VITE_APP_DCL_SDK_VERSION=Stargate
8+
VITE_APP_DCL_TX_API=/rpc/tx?hash=0x
9+
VITE_APP_DCL_REFRESH=500000

README.md

Lines changed: 74 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,99 @@
1-
# DCL UI Web based app for managing CSA-DCL
1+
# DCL UI Web-based App for Managing CSA-DCL
22

3-
DCL-UI is [Vue.js](https://vuejs.org/) - based web application for managing the CSA Distributed Compliance Ledger. This app provides a web interface to view and manage the data in the Ledger.
3+
DCL-UI is a [Vue.js](https://vuejs.org/)-based web application for managing the CSA Distributed Compliance Ledger. This app provides a web interface to view and manage data in the Ledger.
4+
5+
## Overview
6+
The DCL-UI provides features for:
7+
- Viewing and managing compliance records
8+
- Interacting with the distributed ledger
9+
- Managing user access and permissions
10+
- Monitoring ledger status and transactions
411

512
## Prerequisites
6-
You will need [Node.js](https://nodejs.org) version 20.x installed on your system.
13+
- [Node.js](https://nodejs.org) version 20.x
14+
- Git
15+
- Modern web browser (Chrome, Firefox, Safari, or Edge)
16+
- Basic knowledge of Vue.js and blockchain concepts
717

818
## Project Setup
919

10-
Get the code by cloning this repository using git
11-
12-
> git clone https://github.com/Comcast/dcl-ui.git
13-
14-
Once downloaded, open the terminal in the project directory, and continue with:
15-
20+
### Getting Started
21+
Clone the repository:
22+
```bash
23+
git clone https://github.com/Comcast/dcl-ui.git
24+
cd dcl-ui
1625
```
26+
27+
Install dependencies:
28+
```bash
1729
npm install
1830
```
1931

20-
### Compiles and hot-reloads for development
21-
```
32+
### Development
33+
Start the development server with hot-reload:
34+
```bash
2235
npm run dev
2336
```
2437

25-
### Compiles and minifies for production
26-
```
38+
Build for production:
39+
```bash
2740
npm run build
2841
```
2942

43+
### Project Structure
44+
```
45+
dcl-ui/
46+
├── src/ # Source code
47+
├── public/ # Static assets
48+
├── dist/ # Production build output
49+
├── tests/ # Test files
50+
└── vite.config.js # Vite configuration
51+
```
3052

31-
## Customize configuration
53+
## Configuration
54+
55+
### Development Environment
56+
The default configuration connects to the CSA Testnet Observer Node. The development environment uses a proxy server for CORS-disabled endpoints.
57+
58+
Environment variables (.env.development):
59+
```env
60+
VITE_APP_DCL_API_NODE=http://localhost:8080/api
61+
VITE_APP_DCL_RPC_NODE=http://localhost:8080/rpc
62+
VITE_APP_DCL_WEBSOCKET_NODE=ws://localhost:8080/websocket
63+
VITE_APP_DCL_CHAIN_ID=testnet-2.0
64+
VITE_APP_DCL_CHAIN_NAME=DCL-Chain-Testnet
65+
VITE_APP_DCL_ADDR_PREFIX=cosmos
66+
VITE_APP_DCL_SDK_VERSION=Stargate
67+
VITE_APP_DCL_TX_API=/rpc/tx?hash=0x
68+
VITE_APP_DCL_REFRESH=500000
69+
```
3270

33-
See [Configuration Reference](https://cli.vuejs.org/config/).
71+
### Production Deployment
3472

35-
### Configuring DCL-UI
36-
By default DCL UI connects to the CSA Testnet Observer Node when started in development mode. Since CORS is disabled on the CSA Observer Node (https://on.test-net.dcl.csa-iot.org) when the project is started in development mode it configures a http proxy server that takes the request for /api, /rpc and /websocket to the target CSA Observer Node. You can modify the configuration in vue.config.js file.
73+
1. Create a `.env` file for production settings (use `.env.sample` as reference)
74+
2. Build the application:
75+
```bash
76+
npm run build
77+
```
78+
3. Deploy the contents of the `/dist` folder to your web server
3779

38-
.env.development file contains the following environment variables (Since the default server starts on port 8080. Please update the ports is you are running the local server on different port.)
39-
```
40-
VUE_APP_DCL_API_NODE=http://localhost:8080/api
41-
VUE_APP_DCL_RPC_NODE=http://localhost:8080/rpc
42-
VUE_APP_DCL_WEBSOCKET_NODE=ws://localhost:8080/websocket
43-
VUE_APP_DCL_CHAIN_ID=testnet-2.0
44-
VUE_APP_DCL_CHAIN_NAME=DCL-Chain-Testnet
45-
VUE_APP_DCL_ADDR_PREFIX=cosmos
46-
VUE_APP_DCL_SDK_VERSION=Stargate
47-
VUE_APP_DCL_TX_API=/rpc/tx?hash=0x
48-
VUE_APP_DCL_REFRESH=500000
49-
```
80+
## Troubleshooting
5081

51-
## Deploying a minified SPA (Single Page Application)
82+
Common issues and solutions:
83+
1. **CORS Issues**: Ensure proxy settings are correct in development
84+
2. **Build Errors**: Check Node.js version and dependencies
85+
3. **API Connection**: Verify environment variables and network connectivity
5286

53-
### Configure for deployment
54-
Before the application can be deployed, please create a .env file and configure the the environment variables. You can take the .env.sample file as a reference.
87+
## Contributing
88+
1. Fork the repository
89+
2. Create a feature branch
90+
3. Submit a pull request
5591

92+
## Additional Resources
93+
- [Vue.js Documentation](https://vuejs.org/guide/introduction.html)
94+
- [Vite Documentation](https://vitejs.dev/guide/)
95+
- [CSA DCL](https://github.com/zigbee-alliance/distributed-compliance-ledger)
5696

57-
### Build the Application
58-
```
59-
npm run build
60-
```
61-
This will generate the compiled package in /dist folder. This folder contains the index.html file, that can be served from any web server.
6297

63-
For a more detailed explanation on how this application works, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
98+
## Support
99+
For issues and feature requests, please use the GitHub issue tracker.

src/AppMenu.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ const model = ref([
5050
{ label: 'Compliance', icon: 'pi pi-fw pi-check-circle', to: '/compliance' },
5151
{ label: 'PKI', icon: 'pi pi-fw pi-lock', to: '/pki' },
5252
{ label: 'Validators', icon: 'pi pi-fw pi-server', to: '/validators' },
53-
{ label: 'Upgrades', icon: 'pi pi-fw pi-history', to: '/upgrades' },
53+
{ label: 'Upgrades', icon: 'pi pi-fw pi-history', to: '/upgrades' }
54+
]
55+
},
56+
{
57+
label: 'Tools and Documentation',
58+
icon: 'pi pi-fw pi-book',
59+
items: [
5460
{ label: 'Transaction Blocks', icon: 'pi pi-fw pi-book', to: '/transactions/blocks' },
5561
{ label: 'Legacy Wallet', icon: 'pi pi-fw pi-wallet', to: '/legacy-wallet' },
5662
{ label: 'Keplr Wallet - Guide', icon: 'pi pi-fw pi-book', to: '/keplr-wallet' }

0 commit comments

Comments
 (0)