2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Mempool Frontend
  
						 
					
						
							
								
									
										
										
										
											2020-12-11 02:57:44 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								You can build and run the Mempool frontend and proxy to the production Mempool backend (for easier frontend development), or you can connect it to your own backend for a full Mempool development instance, custom deployment, etc.
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Jump to a section in this doc:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  [Quick Setup for Frontend Development ](#quick-setup-for-frontend-development ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  [Manual Frontend Setup ](#manual-setup ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  [Translations ](#translations-transifex-project ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Quick Setup for Frontend Development
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If you want to quickly improve the UI, fix typos, or make other updates that don't require any backend changes, you don't need to set up an entire backend—you can simply run the Mempool frontend locally and proxy to the mempool.space backend.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 1. Clone Mempool Repository
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Get the latest Mempool code:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git clone https://github.com/mempool/mempool
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 21:48:36 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								cd mempool/frontend
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 2. Specify Website
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The same frontend codebase is used for https://mempool.space, https://liquid.network and https://bisq.markets.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Configure the frontend for the site you want by running the corresponding command:
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run config:defaults:mempool
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run config:defaults:liquid
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run config:defaults:bisq
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### 3. Run the Frontend
  
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-09 17:39:07 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								_Make sure to use Node.js 16.10 and npm 7._
							 
						 
					
						
							
								
									
										
										
										
											2022-05-26 18:19:58 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Install project dependencies and run the frontend server:
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm install
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run serve:local-prod
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The frontend will be available at http://localhost:4200/ and all API requests will be proxied to the production server at https://mempool.space.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 4. Test
  
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								After making your changes, you can run our end-to-end automation suite and check for possible regressions.
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Headless:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run config:defaults:mempool & &  npm run cypress:run
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Interactive:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ npm run config:defaults:mempool & &  npm run cypress:open
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This will open the Cypress test runner, where you can select any of the test files to run.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								If all tests are green, submit your PR, and it will be reviewed by someone on the team as soon as possible.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Manual Setup
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Set up the [Mempool backend ](../backend/ ) first, if you haven't already.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 1. Build the Frontend
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-09 17:39:07 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								_Make sure to use Node.js 16.10 and npm 7._
							 
						 
					
						
							
								
									
										
										
										
											2022-05-26 18:19:58 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Build the frontend:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cd frontend
							 
						 
					
						
							
								
									
										
										
										
											2022-06-09 17:39:07 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								npm install
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								npm run build
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 2. Run the Frontend
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### Development
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								To run your local Mempool frontend with your local Mempool backend:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								npm run serve
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### Production
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-26 19:33:54 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The `npm run build`  command from step 1 above should have generated a `dist`  directory. Put the contents of `dist/`  onto your web server.
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								You will probably want to set up a reverse proxy, TLS, etc. There are sample nginx configuration files in the top level of the repository for reference, but note that support for such tasks is outside the scope of this project.
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Translations: Transifex Project
  
						 
					
						
							
								
									
										
										
										
											2020-12-11 02:57:44 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-23 18:21:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The Mempool frontend strings are localized into 20+ locales:
							 
						 
					
						
							
								
									
										
										
										
											2020-12-11 02:57:44 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								https://www.transifex.com/mempool/mempool/dashboard/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 21:50:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Translators
  
						 
					
						
							
								
									
										
										
										
											2020-12-11 02:57:44 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Arabic @baro0k  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Czech @pixelmade2  
						 
					
						
							
								
									
										
										
										
											2023-03-23 14:43:03 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Danish @pierrevendelboe  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  German @Emzy  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  English (default) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Spanish @maxhodler  @bisqes  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Persian @techmix  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  French @Bayernatoor  
						 
					
						
							
								
									
										
										
										
											2023-03-19 12:05:13 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Korean @kcalvinalvinn  @sogoagain  
						 
					
						
							
								
									
										
										
										
											2021-01-29 16:58:04 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Italian @HodlBits  
						 
					
						
							
								
									
										
										
										
											2023-03-23 14:43:03 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Lithuanian @eimze21  
						 
					
						
							
								
									
										
										
										
											2022-10-18 03:00:17 +04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Hebrew @rapidlab309  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Georgian @wyd_idk  
						 
					
						
							
								
									
										
										
										
											2021-01-24 11:43:20 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Hungarian @btcdragonlord  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Dutch @m__btc  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Japanese @wiz  @japananon  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Norwegian @T82771355  
						 
					
						
							
								
									
										
										
										
											2021-04-26 06:27:51 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Polish @maciejsoltysiak  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Portugese @jgcastro1985  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Slovenian @thepkbadger  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Finnish @bio_bitcoin  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Swedish @softsimon_  
						 
					
						
							
								
									
										
										
										
											2021-11-17 22:18:38 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Thai @Gusb3ll  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Turkish @stackmore  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Ukrainian @volbil  
						 
					
						
							
								
									
										
										
										
											2022-12-26 16:15:30 +04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Vietnamese @BitcoinvnNews  
						 
					
						
							
								
									
										
										
										
											2020-12-11 03:13:47 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Chinese @wdljt  
						 
					
						
							
								
									
										
										
										
											2021-06-13 15:05:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Russian @TonyCrusoe  @Bitconan  
						 
					
						
							
								
									
										
										
										
											2021-09-17 14:19:53 +04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Romanian @mirceavesa  
						 
					
						
							
								
									
										
										
										
											2021-11-17 22:18:38 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Macedonian @SkechBoy  
						 
					
						
							
								
									
										
										
										
											2023-01-29 16:23:35 +04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								*  Nepalese @kebinm