BlockScout is an Elixir umbrella project. Each directory under apps/ is a separate Mix project and OTP application, but the projects can use each other as a dependency in their mix.exs. Each OTP application has a restricted domain.
Table is horizontally scrollable.
DirectoryOTP ApplicationNamespacePurpose
apps/ethereum_jsonrpc:ethereum_jsonrpcEthereumJSONRPCEthereum JSONRPC client. It is allowed to know Explorer’s param format, but it cannot directly depend on :explorer
apps/explorer:explorerExplorerStorage for the indexed chain. Can read and write to the backing storage. MUST be able to boot in a read-only mode when run independently from :indexer, so cannot depend on :indexer as that would start :indexer indexing.
apps/block_scout_web:block_scout_webBlockScoutWebPhoenix interface to :explorer. The minimum interface to allow web access should go in :block_scout_web. Any business rules or interface not tied directly to Phoenix or Plug should go in :explorer. MUST be able to boot in a read-only mode when run independently from :indexer, so cannot depend on :indexer as that would start :indexer indexing.
apps/indexer:indexerIndexerUses :ethereum_jsonrpc to index chain and batch import data into :explorer. Any process, Task, or GenServer that automatically reads from the chain and writes to :explorer should be in :indexer. This restricts automatic writes to :indexer and read-only mode can be achieved by not running :indexer.