Skip to content

Commit 6b09729

Browse files
committed
add docs
1 parent 24f2d06 commit 6b09729

File tree

2 files changed

+118
-2
lines changed

2 files changed

+118
-2
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- [Intro](./intro.md)
44
- [Bridge](./bridge.md)
5-
<!-- - [Backend](./backend.md)-->
6-
<!-- - [Frontend](./frontend.md)-->
5+
- [Backend](./backend.md)
6+
- [Frontend](./frontend.md)
77
- [Setup testnet](./testnet.md)
88
- [Pallet](./pallet.md)

src/frontend.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Frontend
2+
3+
Frontend application for managing identity operations on polkadot-sdk chains.
4+
The application enables users to submit `setIdentity` and `requestJudgement` operations using polkadot-api.
5+
6+
## Features
7+
8+
- Identity registration on polkadot-sdk chains
9+
- Integration with W3 Registrar backend
10+
- Real-time verification status updates
11+
- Support for multiple social account verifications
12+
13+
## Development Setup
14+
15+
### Prerequisites
16+
17+
Install required versions to ensure compatibility:
18+
19+
```sh
20+
# Install Bun 1.1.35
21+
curl -fsSL https://bun.sh/install | bash -s "bun-v1.1.35"
22+
23+
# Install NVM and Node 22
24+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
25+
nvm install 22
26+
```
27+
28+
### Installation
29+
30+
1. Clone the repository:
31+
```sh
32+
git clone https://github.com/rotkoneworks/w3registrar-www
33+
cd w3registrar-www
34+
```
35+
36+
2. Install dependencies:
37+
```sh
38+
bun install
39+
```
40+
41+
3. Set up environment:
42+
```sh
43+
cp .env.example .env
44+
# Edit .env with your endpoints
45+
```
46+
47+
4. Update scale metadata:
48+
```sh
49+
bunx [email protected] update
50+
# or
51+
bun metadata
52+
```
53+
54+
### Development Server
55+
56+
Start the development server:
57+
```sh
58+
bun dev
59+
```
60+
Visit http://localhost:3333 in your browser. The server will automatically reload on file changes.
61+
62+
## Building
63+
64+
Create production build:
65+
```sh
66+
bun build
67+
```
68+
69+
## Chain Documentation
70+
71+
- Access documentation at [docs link]
72+
- Generate fresh documentation:
73+
```sh
74+
bunx papi-generate-docs --config .papi/polkadot-api.json --output docs/
75+
```
76+
77+
## Environment Configuration
78+
79+
Copy `.env.example` to `.env` and configure the following variables:
80+
81+
```env
82+
# WalletConnect Project ID
83+
VITE_APP_WALLET_CONNECT_PROJECT_ID=rotko-w3-registrar
84+
85+
# Chain WebSocket Endpoints
86+
VITE_APP_DEFAULT_WS_URL=wss://dev.rotko.net/people-rococo
87+
VITE_APP_DEFAULT_WS_URL_RELAY=wss://dev.rotko.net/rococo
88+
89+
# Registrar Indices for Different Networks
90+
VITE_APP_REGISTRAR_INDEX__PEOPLE_POLKADOT=19
91+
VITE_APP_REGISTRAR_INDEX__PEOPLE_KUSAMA=17
92+
VITE_APP_REGISTRAR_INDEX__PEOPLE_WESTEND=18
93+
VITE_APP_REGISTRAR_INDEX__PEOPLE_PASEO=16
94+
VITE_APP_REGISTRAR_INDEX__PEOPLE_ROCOCO=0
95+
96+
# API Configuration
97+
VITE_APP_CHALLENGES_API_URL=wss://dev.rotko.net/api
98+
99+
# Chain Configuration
100+
VITE_APP_AVAILABLE_CHAINS=polkadot_people,ksmcc3_people,paseo_people,rococo_people
101+
VITE_APP_DEFAULT_CHAIN=rococo_people # Optional
102+
```
103+
104+
## Available Scripts
105+
106+
- `bun dev`: Start development server
107+
- `bun build`: Create production build
108+
- `bun metadata`: Update scale metadata
109+
- `bun docs`: Generate chain documentation
110+
111+
## Integration with Backend
112+
113+
The frontend expects a W3 Registrar backend instance running. Configure the WebSocket endpoint in your `.env` file:
114+
```env
115+
VITE_BACKEND_URL="wss://your-backend:8080"
116+
```

0 commit comments

Comments
 (0)