@@ -203,7 +203,18 @@ The system automatically detects the environment and only sends notifications in
## Deployment
-The deployment is handled by the [`NuxtHub Action`](./.github/workflows/nuxt-hub.yml).
+The deployment is handled via Wrangler CLI using the `wrangler.json` configuration file.
+
+**Deploy command:**
+```bash
+pnpm build && npx wrangler --cwd .output deploy [-e env]
+```
+
+Where `env` can be: `preview`, `testnet`, or `testnet-preview` (omit for mainnet production).
+
+**Required secrets:**
+- `ALBATROSS_RPC_NODE_URL`
+- `NUXT_SLACK_WEBHOOK_URL`
There are 4 different environments:
@@ -214,6 +225,11 @@ There are 4 different environments:
| `preview` | `preview-mainnet` | [Validators API Mainnet Preview](https://dev.validators-api-mainnet.pages.dev) | Push any commit to any branch |
| `preview` | `preview-testnet` | [Validators API Testnet Preview](https://dev.validators-api-testnet.pages.dev) | Push any commit to any branch |
-Each Nuxt Hub environment has its own database, so effectively we have 4 different databases and there are 4 tasks in the [`sync.yml`](./.github/workflows/sync.yml) workflow that are responsible for syncing the data from the Nimiq network to the database.
+**Data Synchronization:**
+
+Each environment has its own D1 database, KV cache, and R2 blob storage. Data synchronization is handled automatically by Nitro scheduled tasks that run hourly via Cloudflare Workers cron triggers configured in `wrangler.json`:
+
+- `sync:epochs` - Fetches missing blockchain epochs and stores them in the database
+- `sync:snapshot` - Updates validator snapshots and calculates trust scores
**Write operations to `main` are restricted**, only via PR.
diff --git a/app/app.vue b/app/app.vue
index 9e2c1db..b5cb292 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -6,27 +6,6 @@ const debouncedRefresh = useDebounceFn(() => {
refreshNuxtData(['/api/v1/validators', '/api/v1/supply', '/api/v1/status'])
}, 300)
-const { status: statusSync, data: dataSync, error: syncError, close: closeSync, open: syncData } = useEventSource('/api/v1/sync/sse', [], { immediate: false })
-
-// Check for sync success message and refresh document
-watch(() => dataSync.value, (newData) => {
- if (newData) {
- try {
- const parsedData = JSON.parse(newData)
- if (parsedData.kind === 'success' && parsedData.message === 'Sync process completed') {
- debouncedRefresh()
- closeSync()
- }
- }
- catch (e) {
- console.error('Failed to parse sync data:', e)
- }
- }
-}, { immediate: true })
-
-// Also maintain the original watch for general updates
-watch(() => [dataSync, syncError], debouncedRefresh)
-
const colorMode = useColorMode()
const toggleDark = () => colorMode.value = colorMode.value === 'light' ? 'dark' : 'light'
@@ -110,7 +89,7 @@ const currentEnvItem = { branch: gitBranch, network: nimiqNetwork, link: environ