For 'Space Opera' universes with 'magic' drives (like Traveller, Star Wars and Star Trek), the answer is 'whatever the plot requires'.
However, for answers dealing with hard science, this is the single best source of data that I know of:
[The problem with 'realistic', is that 'realistic' ships are slow (months to the next planet and hundreds of years to the next star) and 90% reaction mass ... that's a lot of 'nothing' for a deck plan of a ship.]
For just the 'cargo' portion of the ship (including human cargo, but ignoring drives, fuel and reaction mass) this is a good source of data on how much room is needed for living space and food production:
Hope that helps and Good Luck.
[PS. If you just want some quick and dirty answers, Traveller (the RPG) requires:
1. about 2000 cubic feet of living space (200 square feet of floor area) per person ... which includes all common areas, life support, living quarters, food storage etc.
2. about One crew member per 50,000 cubic feet of total ship.
3. about 15% of the ship dedicated to 'Engineering' (drives, power plant and fuel) per unit of speed ... which in traveller are gees of acceleration for normal travel and parsecs per week for faster than light travel.
4. each 2000 cubic feet of unused space can hold 1 passenger worth of accomodations or 1 TEU standard cargo container. ]