I’ve written a tagging system from scratch for an existing system and it was one of the most interesting things I’ve worked out. I had total control over how it was implemented and I think I came up with a really nice, minimalist, scalable way to tag things, and to search them.