Derived structures in geometry and representation theory