npm run dev # Dev server on :5000 (NOT :3000)
npm run build # Production build
npm run build:standalone # Standalone build for Docker
npm run lint # ESLint via next lint
npm run pw:test:local # Playwright E2E (all browsers, headless)
npm run pw:test:local:chromium # Single browser, --headedNo npm test — only Playwright E2E tests exist.
- Port is 5000, not the Next.js default 3000
- Dev/build runs
helpers/versions.jsfirst — writesNEXT_PUBLIC_COMMIT_HASHto.env.local. If git fails, the command fails. react-envwraps dev/start —@beam-australia/react-envinjectsREACT_APP_*env vars into the browser aswindow.__ENV. Do not useprocess.envfor runtime config in components; useConfig.tswhich reads viaenv().- Package manager field says
pnpmbut CI/scripts usenpm— stick withnpm install/npm ci. - Path alias
@/*maps to project root (nosrc/directory).
- Pages router (Next.js 15), not App Router. Routes live in
pages/. Config.tsat root is the single source of truth for API endpoints, pagination sizes, refresh intervals, and precision settings.- API layer:
services/FetchingService.ts(REST via @hiveio/wax) andservices/Hive.ts(Hive node RPC). - Data fetching: React Query v4 (
@tanstack/react-query). Hooks inhooks/api/. UsequeryKeyarrays,keepPreviousData: truefor pagination. - Formatters: All blockchain asset formatting goes through Wax library — do not format amounts manually.
- Branch naming:
USER_NAME/BRANCH_NAME - PR target:
develop(staging) master= production- Rebase outdated branches, don't merge
- Two image variants: root
/and subdirectory/explorer(set viaNEXT_PUBLIC_BASE_PATHat build) - Build:
scripts/build_instance.sh "$(pwd)" - Run:
scripts/run_instance.sh --image=<img> --api-endpoint=<api> --port=5000 - Dockerfile uses multi-stage build with standalone output
- Playwright E2E only, tests in
tests/playwright/e2e/ - Local config:
playwright.local5000.config.ts(baseURLlocalhost:5000) - CI runs 3 browsers × 5 shards with
--update-snapshots - Tests require a running app — no webServer auto-start in local config
trace: 'retain-on-failure'is enabled
- Components:
React.FC<Props>, PascalCase filenames - Hooks:
useprefix, inhooks/api/orhooks/common/ - TypeScript strict mode +
forceConsistentCasingInFileNames - Styling: Tailwind utility classes + CSS variables (
--color-*) - No comments unless asked