insight is an open-source Bitcoin blockchain explorerwith complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. Check out the source code.
insight is still in development, so be sure to report any bugs and provide feedback for improvement at our github issue tracker.