which class in japanese society followed the code of bushido
Bushido Bushidō (武士道, "the way of warriors") is a Japanese collective term for the many codes of honour and ideals that dictated the samurai way of life, loosely analogous to the concept of chivalry in Europe.
Kamakura period Once Minamoto Yoritomo had consolidated his power, he established a new government at his family home in Kamakura. He called his government a bakufu (幕府, tent government), but because he was given the ancient high military title Sei-i Taishōgun by the Emperor, the government is often referred to in Western literature as the shogunate. Yoritomo followed the Fujiwara form of house government and had an administrative board Mandokoro (政所), a board of retainers (Samurai-dokoro (侍所)), and a board of inquiry (Monchūjo). After confiscating estates in central and western Japan, he appointed stewards for the estates and constables for the provinces. As shōgun, Yoritomo was both the steward and the constable general. The Kamakura shogunate was not a national regime, however, and although it controlled large tracts of land, there was strong resistance to the stewards. The regime continued warfare against the Northern Fujiwara, but never brought either the north or the west under complete military control. However, the 4th leader of the Northern Fujiwara Fujiwara no Yasuhira was defeated by Yoritomo in 1189, and the 100-year-long prosperity of the north disappeared. The old court resided in Kyoto, continuing to hold the land over which it had jurisdiction, while newly organized military families were attracted to Kamakura.