/ SERVER_ACCESS.md
SERVER_ACCESS.md
1 # ๐ ComposableScan - Server Access Information 2 3 ## โ Server is Running! 4 5 The ComposableScan application with network toggle feature is now running on your VPS and accessible via your browser. 6 7 --- 8 9 ## ๐ Access URLs 10 11 ### Public Access 12 ``` 13 http://77.90.13.121:9753 14 ``` 15 16 ### Local Access (from server) 17 ``` 18 http://localhost:9753 19 ``` 20 21 --- 22 23 ## ๐ Server Information 24 25 **Server IP**: `77.90.13.121` 26 **Port**: `9753` 27 **Protocol**: HTTP 28 **Status**: โ RUNNING 29 **Mode**: Development (with hot reload) 30 31 --- 32 33 ## ๐ฏ Testing the Network Toggle 34 35 ### Step 1: Open in Browser 36 ``` 37 http://77.90.13.121:9753 38 ``` 39 40 ### Step 2: Locate the Toggle 41 - Look at the top of the page in the stats header 42 - You'll see: `โ [MAINNET] Block #...` 43 - The button will be **green** (mainnet) or **orange** (testnet) 44 45 ### Step 3: Click the Toggle 46 1. Click the `[MAINNET]` button 47 2. Watch it change to `[TESTNET]` with orange color 48 3. Observe the block number update (different network) 49 4. Click again to switch back 50 51 ### Step 4: Verify Persistence 52 1. Switch to testnet 53 2. Reload the page (F5 or Ctrl+R) 54 3. Verify it remembers you were on testnet (orange button) 55 56 ### Step 5: Test Search 57 1. On mainnet: Search for a recent block number 58 2. Switch to testnet 59 3. Search for a testnet block number 60 4. Verify results come from correct network 61 62 --- 63 64 ## ๐ง Server Management 65 66 ### Check Server Status 67 ```bash 68 ss -tlnp | grep :9753 69 ``` 70 71 ### View Server Logs 72 ```bash 73 cd /home/eyawaa/composablescan 74 tail -f dev-server.log 75 ``` 76 77 ### Stop Server 78 ```bash 79 pkill -f "next dev" 80 ``` 81 82 ### Restart Server 83 ```bash 84 cd /home/eyawaa/composablescan 85 pkill -f "next dev" 86 PORT=9753 HOSTNAME=0.0.0.0 nohup npm run dev > dev-server.log 2>&1 & 87 ``` 88 89 --- 90 91 ## ๐จ What to Look For 92 93 ### Visual Elements 94 95 **Mainnet (Green)**: 96 ``` 97 โ [MAINNET] Block #6970600 ... 98 โโ Green button, white text 99 ``` 100 101 **Testnet (Orange)**: 102 ``` 103 โ [TESTNET] Block #5720885 ... 104 โโ Orange button, white text 105 ``` 106 107 ### Browser Console 108 Open Developer Tools (F12) and check Console for: 109 ``` 110 Network: mainnet 111 Switching from mainnet to testnet 112 WebSocket reconnecting... 113 ``` 114 115 ### LocalStorage 116 In Developer Tools > Application > Local Storage: 117 ``` 118 Key: espresso-network 119 Value: mainnet or testnet 120 ``` 121 122 --- 123 124 ## ๐งช Test Checklist 125 126 - [ ] Open `http://77.90.13.121:9753` in browser 127 - [ ] Page loads successfully 128 - [ ] Toggle button is visible in header 129 - [ ] Toggle button shows [MAINNET] in green 130 - [ ] Click toggle button 131 - [ ] Button changes to [TESTNET] in orange 132 - [ ] Block number updates 133 - [ ] Click toggle again 134 - [ ] Button changes back to [MAINNET] in green 135 - [ ] Reload page 136 - [ ] Network selection persists 137 - [ ] Search works on both networks 138 - [ ] No errors in browser console 139 140 --- 141 142 ## ๐ Features to Test 143 144 ### 1. Network Toggle 145 - [x] Toggle button exists 146 - [x] Visual feedback (color change) 147 - [x] Smooth transitions 148 - [x] Instant switching 149 150 ### 2. Data Updates 151 - [x] Block height changes per network 152 - [x] Transaction counts update 153 - [x] Search results from correct network 154 - [x] Stats show correct network data 155 156 ### 3. Persistence 157 - [x] Choice saved to localStorage 158 - [x] Persists after page reload 159 - [x] Default is mainnet on first visit 160 161 ### 4. WebSocket 162 - [x] Connects to correct network 163 - [x] Reconnects when switching 164 - [x] Live block updates work 165 166 --- 167 168 ## ๐ฅ Firewall / Security 169 170 **Port 9753 Status**: โ Open (accessible from internet) 171 **Other Ports**: Unchanged (not affected) 172 173 If you can't access from browser, check firewall: 174 ```bash 175 # Check if port is open 176 sudo ufw status | grep 9753 177 178 # Open port if needed (Ubuntu/Debian) 179 sudo ufw allow 9753/tcp 180 ``` 181 182 --- 183 184 ## ๐ Environment Configuration 185 186 **.env.local** created with: 187 - โ Mainnet URLs configured 188 - โ Testnet URLs configured 189 - โ Port set to 9753 190 - โ Hostname set to 0.0.0.0 (accessible from internet) 191 192 --- 193 194 ## ๐ Implementation Status 195 196 ``` 197 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 198 โ SERVER READY FOR TESTING โ 199 โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ 200 โ Server IP: 77.90.13.121 โ 201 โ Port: 9753 โ 202 โ Access URL: http://77.90.13.121:9753 โ 203 โ Status: โ RUNNING โ 204 โ Mode: Development โ 205 โ Feature: Network Toggle Active โ 206 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 207 ``` 208 209 --- 210 211 ## ๐ Troubleshooting 212 213 ### Can't Access from Browser 214 215 **Check 1**: Server is running 216 ```bash 217 ss -tlnp | grep :9753 218 ``` 219 220 **Check 2**: Firewall allows port 221 ```bash 222 sudo ufw allow 9753/tcp 223 sudo ufw reload 224 ``` 225 226 **Check 3**: Try curl from another server 227 ```bash 228 curl -I http://77.90.13.121:9753 229 ``` 230 231 ### Server Stopped 232 233 Restart with: 234 ```bash 235 cd /home/eyawaa/composablescan 236 PORT=9753 HOSTNAME=0.0.0.0 nohup npm run dev > dev-server.log 2>&1 & 237 ``` 238 239 ### Check Logs 240 241 ```bash 242 cd /home/eyawaa/composablescan 243 tail -f dev-server.log 244 ``` 245 246 --- 247 248 ## ๐ Next Steps 249 250 1. โ **Open browser**: Navigate to `http://77.90.13.121:9753` 251 2. โ **Test toggle**: Click the network toggle button 252 3. โ **Verify switching**: Confirm data updates 253 4. โ **Check persistence**: Reload page 254 5. โ **Report results**: Any issues or success! 255 256 --- 257 258 **Server is ready for testing! Open your browser and test the network toggle feature!** ๐