|
1 | 1 | # Synchronic Web Explorer |
2 | 2 |
|
3 | | -A React-based UI for exploring and interacting with synchronic web journals. |
| 3 | +React UI for browsing and editing synchronic web journals through the gateway API. |
4 | 4 |
|
5 | | -## Features |
| 5 | +## Current Model |
6 | 6 |
|
7 | | -- Navigate hierarchical document structures across peer-to-peer networks |
8 | | -- View and edit journal content |
9 | | -- Manage peer connections |
10 | | -- View document history and versions |
11 | | -- Verify cryptographic proofs |
| 7 | +The explorer now has two modes: |
12 | 8 |
|
13 | | -## Development |
| 9 | +- `Stage` |
| 10 | + - local staged files and directories |
| 11 | + - tree-driven selection |
| 12 | + - file editing is read-only until `Edit` |
| 13 | +- `Ledger` |
| 14 | + - committed route-based browsing |
| 15 | + - route strip across the top |
| 16 | + - file view toggles between content and proof |
14 | 17 |
|
15 | | -### Prerequisites |
| 18 | +There is no dedicated history pane in the current UI. Ledger history is expressed through the route strip and snapshot controls. |
16 | 19 |
|
17 | | -- Node.js 18+ |
18 | | -- npm or yarn |
| 20 | +## Development |
19 | 21 |
|
20 | | -### Setup |
| 22 | +Prerequisites: |
21 | 23 |
|
22 | | -```bash |
23 | | -npm install |
24 | | -``` |
| 24 | +- Node.js 18+ |
| 25 | +- npm |
25 | 26 |
|
26 | | -### Run Development Server |
| 27 | +Run the dev server: |
27 | 28 |
|
28 | 29 | ```bash |
| 30 | +REACT_APP_SYNC_EXPLORER_ENDPOINT=http://127.0.0.1:8192/api/v1 \ |
| 31 | +REACT_APP_SYNC_EXPLORER_PASSWORD=password \ |
29 | 32 | npm start |
30 | 33 | ``` |
31 | 34 |
|
32 | | -The app will be available at http://localhost:3000 |
33 | | - |
34 | | -### Run Tests |
| 35 | +The app is served from `http://localhost:3000/explorer`. |
35 | 36 |
|
36 | | -```bash |
37 | | -npm test |
38 | | -``` |
39 | | - |
40 | | -### Build for Production |
41 | | - |
42 | | -```bash |
43 | | -npm run build |
44 | | -``` |
| 37 | +## Configuration |
45 | 38 |
|
46 | | -### Docker |
| 39 | +Development-time defaults are read from: |
47 | 40 |
|
48 | | -Build the container: |
| 41 | +- `REACT_APP_SYNC_EXPLORER_ENDPOINT` |
| 42 | +- `REACT_APP_SYNC_EXPLORER_PASSWORD` |
49 | 43 |
|
50 | | -```bash |
51 | | -docker build -t explorer . |
52 | | -``` |
| 44 | +Container/runtime defaults are read from: |
53 | 45 |
|
54 | | -Run the container: |
| 46 | +- `SYNC_EXPLORER_ENDPOINT` |
| 47 | +- `SYNC_EXPLORER_PASSWORD` |
55 | 48 |
|
56 | | -```bash |
57 | | -docker run -p 8080:80 explorer |
58 | | -``` |
| 49 | +## Usage Notes |
59 | 50 |
|
60 | | -## Configuration |
| 51 | +### Stage |
61 | 52 |
|
62 | | -The explorer connects to a synchronic web gateway endpoint. You'll need: |
| 53 | +- The left tree shows local staged content. |
| 54 | +- Tree rows expose rename and delete. |
| 55 | +- Selecting a directory exposes: |
| 56 | + - `+ Document` |
| 57 | + - `+ Directory` |
| 58 | + - `Upload File` |
| 59 | +- Selecting a file exposes: |
| 60 | + - `Edit` / `Save` |
| 61 | + - `Download` |
63 | 62 |
|
64 | | -1. A running journal service (e.g., using the compose/general setup) |
65 | | -2. The gateway endpoint URL (e.g., http://localhost:8192/api/v1) |
66 | | -3. The authentication password |
| 63 | +### Ledger |
67 | 64 |
|
68 | | -### Environment Variables |
| 65 | +- The route strip spans the app above the tree and content pane. |
| 66 | +- The leftmost pill synchronizes the latest committed root and shows the current root index. |
| 67 | +- The first hop is always the local/root journal. |
| 68 | +- Each hop accepts: |
| 69 | + - `latest` |
| 70 | + - a negative integer snapshot index |
| 71 | +- Extending the route opens an inline peer chooser. |
| 72 | +- Selecting a file exposes: |
| 73 | + - `Proof` / `Content` |
| 74 | + - `Pin` / `Unpin` |
69 | 75 |
|
70 | | -You can pre-configure the endpoint and password using environment variables: |
| 76 | +## Docker |
71 | 77 |
|
72 | | -- `SYNC_EXPLORER_ENDPOINT`: Default gateway endpoint URL |
73 | | -- `SYNC_EXPLORER_PASSWORD`: Default authentication password |
| 78 | +Build: |
74 | 79 |
|
75 | | -#### Development |
76 | 80 | ```bash |
77 | | -REACT_APP_SYNC_EXPLORER_ENDPOINT=http://localhost:8192/api/v1 \ |
78 | | -REACT_APP_SYNC_EXPLORER_PASSWORD=mypassword \ |
79 | | -npm start |
| 81 | +docker build -t explorer . |
80 | 82 | ``` |
81 | 83 |
|
82 | | -#### Docker |
| 84 | +Run: |
| 85 | + |
83 | 86 | ```bash |
84 | 87 | docker run -p 8080:80 \ |
85 | | - -e SYNC_EXPLORER_ENDPOINT=http://localhost:8192/api/v1 \ |
86 | | - -e SYNC_EXPLORER_PASSWORD=mypassword \ |
| 88 | + -e SYNC_EXPLORER_ENDPOINT=http://127.0.0.1:8192/api/v1 \ |
| 89 | + -e SYNC_EXPLORER_PASSWORD=password \ |
87 | 90 | explorer |
88 | 91 | ``` |
89 | | - |
90 | | -## Usage |
91 | | - |
92 | | -1. Enter your gateway endpoint and password in the toolbar |
93 | | -2. Click "Synchronize" to connect |
94 | | -3. Navigate through the file tree in the left pane |
95 | | -4. View and edit content in the middle pane |
96 | | -5. Explore document history in the right pane |
97 | | - |
98 | | -For more detailed help, click the "Help" button in the toolbar. |
0 commit comments