A web block explorer for the Spaces Protocol. Browse blocks, transactions, spaces, auctions, space pointers. Frontend gets data only from the database, it doesn't connect to a bitcoin node, neither to a space daemon.
It's possible to browse mempool transactions (however without sptr data, it will be added once getsptrpackage or
something similar is added to spaced).
- Framework: SvelteKit 2 with Svelte 5
- Database: PostgreSQL, it imports drizzle ORM, however it only uses raw SQL queries (for perfomance reason)
- Styling: TailwindCSS + DaisyUI
- Runtime: Node.js
- Node.js 18+
- PostgreSQL database with spaces protocol data
For the actual schema, please refer to the indexer repository.
-
Clone the repository
-
Install dependencies:
npm install
-
Configure environment variables:
cp .env.example .env
Edit
.env.local:DB_URL=postgres://user:password@localhost/spaces_protocol_explorer PUBLIC_BTC_NETWORK=testnet4 # or mainnet MARKETPLACE_URI=https://spaces.marketMARKETPLACE_URI is used in conjunction with spaces marketplace to show the users whether a particular space is on the secondary market. Consult spaces protocol secondary marketplace repository for the exact API used.
-
Start the development server:
npm run dev
The app will be available at http://localhost:5173
Build and run:
npm run build
node build/server.jsThe server runs on port 3000 by default.
Consider using docker for the production setup.
Type definitions might be out of date.
Some CSS styling is inconsistent and redefined and per page basis.
Same stands for the code style: use your own linter settings.
Previously the explorer indexed the whole blockchain data from the genesis block, also it indexed the addresses, therefore some remnants of this structure might be present in the repository, despite them not being used live.
The routes can be found in src/routes, they contain both api routes and the frontend routes.
Reusable components can be found in src/lib/components
MIT