Honestly, I was just reading crypto news about an exchange one day and thought “that would be an interesting problem to tackle” and so I went for it. I have been meaning to post that to HN for a few weeks now, tbh.
https://dylanlott.com/orderbook
If you’re interested in reading more. I’m planning a part 2 update to it soon.
Edited to fix my link.