Commit Graph

448 Commits

Author SHA1 Message Date
davide a2eaf616b2 Merge docker-setup: Docker stack, Purple theme, chart improvements
- Docker Compose stack (explorer, sync-blocks, sync-peers, MongoDB)
  with entrypoint envsubst for settings.json generation at runtime
- Purple theme rebuilt from scratch with WCAG-compliant contrast
  (4-level luminance scale, 16:1 body text, 8.5:1 card headers)
- Professional chart axes: K/M/G/T/P number abbreviations, Inter font,
  dark-glass tooltips, reduced X-axis tick density
- Hashrate auto-scaling: panel and chart always display 1-999 with
  correct unit (MH/s, GH/s, TH/s, PH/s)
- Coin supply via TXOUTSET (BitcoinPurple has no getinfo RPC)
- btcp.png as favicon and logo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 14:57:31 +02:00
davide a91e5aceee Auto-scale hashrate display to 1-999 range with correct unit
Panel: MutationObserver intercepts the #hashrate DOM update and
rescales the GH/s value from the API to the appropriate unit
(MH/s, GH/s, TH/s, PH/s), also updating the unit label in the
card header.

Chart: nethashChart Y-axis tick callback detects the canvas ID
and applies the same scaling logic per tick; a btcpHashrateUnit
plugin updates the Y-axis title (e.g. "Hashrate (TH/s)") after
each chart update to stay in sync with the data range
2026-04-28 14:56:39 +02:00
davide 88cba13e77 Redesign Purple theme with proper contrast and professional chart axes
Rebuilt the purple color palette from scratch using a 4-level luminance
scale (~3-5x jump per level: #06000f → #110028 → #1d0845 → #3a158a),
matching the approach of high-contrast Bootswatch dark themes (Darkly,
Cyborg). All contrast ratios are now WCAG-compliant: body text 16:1,
card header white text 8.5:1, primary button 5.5:1.

Chart axis improvements: Y-axis large numbers abbreviated (1.4M, 568K),
X-axis max 6 ticks at 30° rotation, Inter font throughout, dark-glass
tooltips, network_charts settings added to settings.json.tmpl with
transparent canvas background
2026-04-28 14:55:58 +02:00
davide 6f03cf10b3 Add Purple theme with custom UX design
- New 'Purple' theme based on Vapor with deep violet palette
- custom.scss: full UX redesign — pill search bar, gradient tables,
  card hover effects, purple badges, contrasted placeholder text
- Fix btn-success → purple gradient (was green)
- Switch default theme to Purple in settings template
2026-04-28 14:08:51 +02:00
davide e6c34a748b Fix coin supply: use TXOUTSET instead of GETINFO
BitcoinPurple does not implement getinfo; gettxoutsetinfo.total_amount
is the correct source for circulating supply
2026-04-28 13:49:55 +02:00
davide e9da4b1098 Use btcp.png as favicon and logo throughout 2026-04-28 13:45:28 +02:00
davide 2ea1791e9b Add .env to .gitignore 2026-04-28 13:40:33 +02:00
davide 306f494cd8 Add Docker setup for BitcoinPurple explorer
- Dockerfile: node:20-alpine, compiles SCSS at build time, single image
  used for web server and all sync modes (blocks, peers, markets)
- docker-compose.yml: explorer + MongoDB (bind-mounted ./db) on shared
  'purple' network alongside bitcoinpurpled and electrumx
- docker/entrypoint.sh: generates settings.json from env vars via
  envsubst, dispatches to web/sync-blocks/sync-peers/reindex modes
- docker/settings.json.tmpl: minimal settings template parametrized
  for BitcoinPurple (coin, wallet RPC, MongoDB, theme)
- docker/mongo-init.sh: creates app user in explorerdb on first start
- .env.example: pre-filled defaults for BitcoinPurple
- CLAUDE.md: codebase guidance for Claude Code
- .gitignore: add db/ (MongoDB bind-mount data directory)
2026-04-28 13:39:53 +02:00
Mehdi 057c592a21 Add files via upload 2025-05-13 21:26:40 +02:00
Mehdi 1fd3c6b864 Add files via upload 2025-05-13 21:26:08 +02:00
Mehdi 510beb2b0f Add files via upload 2025-05-11 18:47:39 +02:00
Mehdi 92c0b8a7ad Add files via upload 2025-05-11 18:47:15 +02:00
Mehdi 8d0e65dac3 Add files via upload 2025-05-10 14:32:58 +02:00
Mehdi 587786dc41 Add files via upload 2025-05-10 14:32:35 +02:00
Joe Uhren 80ecf19ac5 Update all outdated package.json dependencies
-Main update is to add support for express v5.x which required some code changes to a few of the public and wallet api routes
-Removed the body-parser dependency and replaced with express which now has the same functionaliuty built-in and is no longer necessary to have a dedicated dependency
-All dependencies in the package.json have been updated to reference the most up-to-date version numbers
2025-04-13 21:25:24 -06:00
Joe Uhren b8030855af Prevent updating express dependency to v5
-Will allow v5 later when there is more time to fix breaking changes
2025-04-06 22:49:18 -06:00
Joe Uhren d9e0e54dec Allow backup and restore of a single collection
-Both the backup and restore scripts now support a new optional parameter that allows backing up and restoring a single collection only
-Added new verbiage and examples to the backup and restore script sections of the README
-Removed extra "the"'s from some of the restore database examples in the README
2025-03-04 20:40:00 -07:00
Joe Uhren 76a4b5e218 Add support for Dexomy exchange 2025-03-02 19:49:32 -07:00
Joe Uhren c239f129cf Add an "Extracted By" field for block and tx data
-An optional "Extracted By" column can now be added to the homepage tx data, the block page, tx page and/or in the /ext/getlasttxs api
-Added 4 new settings to allow displaying the "Extracted By" data on the homepage, block page, transaction page and/or in the /ext/getlasttxs api
-Fixed an issue with the get_txs function where it wasn't properly searching by txid
-The rl_labels.pug file has been updated to consolidate similar code without being duplicated
-Updated the README with new verbiage for the extracted by data
2025-03-02 16:37:52 -07:00
Joe Uhren f736792c51 Update website screenshot for readme 2025-02-02 19:32:33 -07:00
Joe Uhren b5f3e3c490 Version bump to v1.103.0 + other small updates
-Version bumped to v1.103.0 in package.json
-Updated the UPGRADE file with details of changes in v1.103.0
-Updated the year in the LICENSE and README files
2025-02-02 19:24:22 -07:00
Joe Uhren 3a2f679201 Improved block sync speed
-A number of functions have been rewritten to be more optimized and faster: calculate_total, is_unique, convert_to_satoshi, get_input_addresses, processVoutAddresses, prepare_vout, prepare_vin
-Txes are now written to database via bulk writes which helps improve the sync speed and also controls memory usage with batching to write data once a certain threshold is reached
-update_address function changed to update_addresses since it now bulk writes the addresses in batches to improve sync speed and also controls memory usage with batching to write data once a certain threshold is reached
-The syncLoop function has been completely removed from the project and replaced with async library loops or even normal "for" loops in some cases which greatly improves sync speeds over large batches of data
-Fixed an issue with the flattened count of txes that is saved to the coinstats collection which could save incorrectly when using more than 1 thread
-Fixed an issue with the block sync which caused an unwanted delay when syncing less blocks than the amount of threads used to sync the data
-Fixed an issue with vout data processing that could sometimes populate data out of order
-Added a new sync.batch_size setting used to determine how many records (txes, addresses, addresstxes) should be saved in a single database transaction
-Added a new wait_for_bulk_database_save setting used to increase the block sync speed at the cost of not returning any error msgs for data that failed to save
-get_input_addresses function no longer returns in the exports section of the explorer.js file since it is only referenced in that file
-Updated explorerspec tests to use the newest function changes for any tests that needed to be updated

Special thanks to Karzo from Pepecoin for help with the bulkwrite code changes!
2025-02-02 19:10:17 -07:00
Joe Uhren 0b0ef817f1 "Maximum call stack size exceeded" error bug fixed
-The "Maximum call stack size exceeded" error is now handled internally by the block sync script in a way which will capture the error and re-launch the sync using a larger stack size and have the sync resume from where it left off. If the re-launch still doesn't have enough memory it will continue re-launching with more and more memory until the sync can finish without errors and then it will return to sync with a lower memory footprint for future syncs
-Added a new option for sync.elastic_stack_size which is used to determine how much memory should be used to increase the stack size for the block sync after encountering the "Maximum call stack size exceeded" error
-Fixed an issue with the block sync when using more than 1 thread that could sometimes cause the flattened txes value in the coinstats database to be written incorrectly (Use `npm run reindex-txcount` to fix this issue without needing to reindex the entire database)
-Updated the benchmark script so that it can also benefit from being able to capture the "Maximum call stack size exceeded" error even though the timing will be off so it outputs a new warning in that scenario which instructs to run the benchmark again with a higher stack size to properly capture the benchmark time
-Removed the "Maximum call stack size exceeded" error notes from the "Known Issues" section of the README
2025-01-09 20:00:37 -07:00
Joe Uhren 454fb0a7d7 Fixed multi-threaded sync + related improvements
-The block_parallel_tasks feature has been improved and fixed so that it is now safe to cancel (Ctrl+C) or kill (kill cmd not kill -9) the task and resume the sync later without missing transactions. The new block_parallel_tasks default is 8 threads which seems to be the sweet spot for any type of cpu
-Numerous improvements to the benchamark script to utilize new benchmark settings, auto-add credentials to the benchmark database, reuse the same sync code as the regular block sync instead of using a copy of the code and more
-Added a new cmd to run the benchmark script `npm run benchmark`
-README updated to include the new benchmark script instrutions + include multi-threaded sync as a feature
2025-01-01 19:20:13 -07:00
Joe Uhren 1909def4aa Fix missing document ready check on resize 2024-12-28 19:28:46 -07:00
Joe Uhren 45a929b254 Tons of network chart improvements and changes
-Chart.js has been updated to v4.4.7
-The chartjs-plugin-crosshair chart plugin has been updated to v2.0.5 via a forked version that has a working sync feature which is now available as a new setting option for use with the network charts
-Added a new max_hours setting to display chart data for a certain number of hours instead of a fixed set of records which can help reveal holes in the sync process for the explorer and/or blockchain
-Added a new timestamp field to the network history collection for use with the max_hours setting chart data
-Added a number of new network chart settings to control display of the chart title, legend, a new vertical block line option, chart height, an option to force 2 charts to appear on their own row or beside each other, and an option to force a chart to take up all available space in the chart box without extra padding
-Added a new dependency chartjs-plugin-annotation v3.1.0 to display block lines in new hourly charts
2024-12-28 19:22:38 -07:00
Joe Uhren 8730b94629 More deprecation warning css fixes 2024-10-29 18:25:51 -06:00
Joe Uhren e00dc0f511 Fix deprecation warnings for css themes 2024-09-21 19:30:42 -06:00
Joe Uhren d15b4f8b51 Merge pull request #46 from Rudra644/patch-1
Improved logo panel spacing on small screens
2024-09-19 20:57:03 -06:00
Joe Uhren 7177742f54 Improved logo panel spacing on small screens 2024-09-19 20:54:25 -06:00
Joe Uhren fff5a1a71d Update bad-words dependency to 4.0.0
-The newest major version of the bad-words filter had some breaking changes that have been applied to the project
2024-09-19 19:53:10 -06:00
Joe Uhren 6ca583cb2a Update defunct polyfill script to v4.8.0 2024-07-22 21:32:15 -06:00
Joe Uhren e884895291 Add version # to the header of all pages 2024-07-22 21:21:34 -06:00
Nakul Kaul f1b29df009 Improve layout consistency and logo alignment (layout.pug)
* Adjusted top and bottom margins for consistent card spacing:
    - Removed unnecessary top margin (-15px) on cards.
    - Added 10px bottom margin to Logo Card for alignment with other cards.

* Optimized Logo size for better block card alignment:
    - Reduced Logo height from 128px to 96px for proper vertical positioning.

These changes ensure a more uniform and visually appealing layout across all card components.
2024-06-26 14:33:04 +05:30
Joe Uhren 788454051c Add preliminary plugin support
-Plugins can now be enabled via settings.json after dropping the plugin files into the new plugins directory
-Enabling plugins will allow extending the normal functionality of the explorer with new database collections, menus, pages and apis + open up a new url for data to be sent from the plugin to the explorer
-A new plugins section was added to the settings with a definition for the generic-snapshots plugin
-Locale strings are now loaded and shared out via the settings so there is generally no more need to explicitly include the locale.js file
-The locale object has been updated to localization within the explorer
-A number of new locale strings have been added and their values replaced with the locale string within the explorer
-Added plugin support verbiage and a link to the generic-snapshots crowdfunding task to the README
2024-06-16 18:58:12 -06:00
Joe Uhren 7ebdb5e868 Fix summary cache issue on pages with top panels
-Sometimes the summary info would get cached and display the wrong data. It was especially noticable on pages with top panels when using the browser back button to return to a page and the data would not load correctly
2024-05-10 15:10:47 -06:00
Joe Uhren 517e0290fb CSS now only compiled when necessary on startup 2024-04-13 15:40:15 -06:00
Joe Uhren cfe60be3cf Reset hCaptcha after submit claim address form 2024-03-20 19:44:05 -06:00
Joe Uhren 9c57b4b37a Claim address page security improvements
-Removed the ability to claim an address that has 0 transactions
-The "Claim" button is now disabled after submitting to help prevent double submissions
2024-03-20 19:36:16 -06:00
Joe Uhren cf9dce3449 Add multiple captcha options for form submission
-Supported captchas include Google reCaptcha v3 (score-based), Google reCaptcha v2 (checkbox and invisible) and hCaptcha ("Always Challenge" mode)
-Captcha options are global to the explorer even though the only form submission page is the "Claim Address" feature which takes full advantage of the new captcha options
2024-03-20 18:20:03 -06:00
Joe Uhren 5d960ceea7 Fix market sync crash for invalid default pair
-The market sync could crash when calculating the USD price if the base pair of the markets_page.default_exchange.trading_pair value was not found in coingecko's vs_currencies list from https://api.coingecko.com/api/v3/simple/supported_vs_currencies (for example, using USDT as the default base pair). A different calculation is now used in this case which does not require any additional api credits to be used.
2024-03-03 20:04:58 -07:00
Joe Uhren 328076cbbe Fix yobit url in README 2024-02-26 19:45:45 -07:00
Joe Uhren cbb9155f3f Remove defunct exchange SouthXchange 2024-02-26 19:44:32 -07:00
Joe Uhren 81e6bebe6f Add OHLCV chart support for xeggex market 2024-02-26 19:33:29 -07:00
Joe Uhren 8a40dc2663 Merge pull request #42 from gdiscord/master
Added support for Nonkyc exchange
2024-02-26 19:00:39 -07:00
Joe Uhren 3d141dab92 Nonkyc market improvements
-Added OHLCV chart support
-Lined up some of the config code better
-Updated count of supported exchanges in the README
2024-02-26 18:58:19 -07:00
gdiscord f92cdfc4ca Added support for Nonkyc exchange
Nonkyc is practically same as Xeggex.
2024-02-09 16:57:01 +00:00
Joe Uhren e0b01e97ac Fix js error when resize screen before page loads 2024-02-06 20:25:12 -07:00
Joe Uhren d86beee960 Add new settings to save+display multi-algo data
-New settings allow reading of the hash algorithm used to mine a particular block for coins that support this feature and have the algorithm data stored in the raw block data
-An "Algorithm" column has been added to the block page and main transaction homepage when multi-algo data is enabled
-The /ext/getlasttxs api will now return the hash algorithm if reading of the multi-algo data is enabled
2024-02-06 19:44:11 -07:00
Joe Uhren 860209a5f9 Fix an issue with invalid masternode count
-This fix prevents an error from being thrown that crashes the explorer when trying to use a masternode count that is a sinlge number. A single number masternode count is not valid or usable since it cannot differentiate the number of good and bad nodes, but the explorer will no longer crash when given this data
2024-02-03 08:56:40 -07:00