Even though technically John Adams was the president, Alexander Hamilton had a very deep influence within the federalist party.
Actually, Adams avoid the war with french, but many of the cabinet members were really loyal to Hamilton and they betrayed president John Adams
hope this helps