Veil Blockchain explorer developed with asp.net core and nuxt3
Example: https://explorer.veil-project.com
See DOCKER.md for easy deployment using Docker Compose.
.example files and configure with your own credentials. Never commit real passwords to git. See SECURITY.md for details.
The Veil Explorer is designed to be easily deployed with your own domain name. All domain-specific URLs are configured through environment variables.
- Copy
.env.exampleto.env - Configure your domain URLs in
.env(seeSITE_URL,BACKEND_API_URL,INTERNAL_API_URL) - Run
docker-compose up -d
See the Configuring Your Own Domain section in DOCKER.md for detailed examples.
Development (localhost):
- Clone and run immediately - default files use
http://localhost:3000andhttp://localhost:5000 - Just run
npm run devin the frontend directory
Production deployment:
- Copy
.env.exampleto.envand configure your domain settings - Option A: Run
npm run build:prod(processes templates and builds) - Option B: Run
./scripts/process-templates.shthennpm run build
The template processing updates:
explorer-frontend/public/fetchtxs.html- Transaction export tool (usesINTERNAL_API_URL)explorer-frontend/public/_robots.txt- Search engine robots file (usesSITE_URL)
- light/dark theme
- multilingual UI (see /docs/localization.md)
- real-time updates of blockchain info, algo stats, recent blocks and first page of blocks browser
- blocks list
- block and transactions information
- search by transaction, address, block hash or height
See /docs/api.md
See /docs/api-compatibility.md
See /docs/compiling/backend.md
See /docs/compiling/frontend.md
Both of frontend and backend tested on Windows 11 and Ubuntu 22.04
On production environment it is recommended to use the latest version of the LTS Ubuntu
- Veil Node - required for backend to pull blockchain information
- PostgreSQL 13+ - required to run backend
- Dotnet 8+ (runtime) - required to run backend in case when using non self-contained build
- NodeJS 20+ - required to run frontend
There are basic setup guide that suitable for all supported environments and full setup tutorial wrote for Ubuntu 20.04
- Unpack latest veil node release
- Generate rpcauth value with:
python3 rpcauth.py [username] [noderpc_password]
rpcauth.py: https://github.com/Veil-Project/veil/blob/master/share/rpcauth/rpcauth.py
- Create config default.conf Add this content to opened file, change variables if required:
listen=1
server=1
rpcbind=127.0.0.1
rpcauth=[generated rpcauth string]
rpcport=5050
txindex=1- Run bin/veild -txindex
- Create new postgresql database
- Restore SQL files from /explorer-backend/schemas
- Unpack explorer-backend.[os]-[arch].self-contained.release-[version].tar.gz
- Copy /explorer-backend/appsettings.json.tpl to [server directory]/appsettings.json
- Change postgresql connection string inside appsettings.json, change other parameters.
- Create data dir inside backend folder
See: /docs/backend-configuration.md
- Run server executable (explorer-backend)
- It will take some time to synchronize backend database with node.
- Unpack explorer-frontend.universal-[version].tar.gz
- Create start script which should export environment variables used as explorer-frontend config:
# listen address
HOST=127.0.0.1
# listen port
PORT=3000
# url on which frontend available, used for SEO, meta tags etc.
NUXT_PUBLIC_SITE_URL=http://<ip>:3000
# url on which frontend available, used for SEO, meta tags etc.
NUXT_PUBLIC_I18N_BASE_URL=http://<ip>:3000
# url on which frontend available, used for SEO, meta tags etc.
NUXT_PUBLIC_BASE_URL=http://<ip>:3000
NUXT_PUBLIC_CHAIN_DEFAULT=main
# JSON formatted configuration to connect frontend with backend
# for now you should only change value of "path", so just replace <ip> and <backend_port>
NUXT_PUBLIC_CHAIN_APIS="[{\"name\": \"main\", \"path\": \"http://<ip>:5000/api\"}]"
NUXT_PUBLIC_RECENT_BLOCKS_COUNT=5
NUXT_PUBLIC_BLOCKS_PER_PAGE=15
NUXT_PUBLIC_TXS_PER_PAGE=15
NUXT_PUBLIC_MAX_BLOCK_WEIGHT=4000000
NUXT_PUBLIC_SYNC_NOTICE_CASE=15
NUXT_PUBLIC_COOKIE_SAVE_DAYS=90See: /docs/frontend-configuration.md
- Run start script