How to make a block explorer?
Index the blockchain in a database and keep the database that has the blockchain updated as blocks come in, you would be essentially running a modified node that's really good at keeping data.