When a class actually helps
Use classes when you need several entities with the same data and behavior.
If you only have one configuration object, a literal object is usually enough. If you need many projects, users, tasks or products, a class reduces repetition and makes the contract easier to read.
A class also helps keep data and behavior together, which makes maintenance easier when the feature grows.