The Chemistry of Powder and Explosives
If you are interested in pyrotechnics, then The Chemistry of Powder and Explosives is a good starting place. It is an older title but it is still relevant, as are all classics.
This book does a great job of explaining the chemistry behind energetic materials. If you have an interest in this area then you need to read his book.
It has a really nest section on making fireworks, a large section on black powder, Manufacture of single based propellants, various nitrates and nitric esters, primary explosive compounds, and great history of this field.
As I stated earlier, this is an older book, but the great thing about chemistry is that the laws don’t change according to whim. We might discover more things we can do, but the basics remain the same.
Now, the caveat, while I do think that knowledge of how this works ans the skill at doing it are important and necessary to both the security of a free state as well as vital to the industrialization of a nation, I do not condone violations of the law.
I think you should definitely buy The Chemistry of Powder and Explosives, read it, study it, and even seek out legal classes if you have the desire, but do not build anything with this knowledge until you have the proper permits, licenses, and safety protocols in place.