1. how much cargo it needs for a given ship class (small, medium, large freighters, mining ships, construction etc.)?
I typically give my small/medium/large freighters 5/10/15 cargo bays if I'm designing them myself, because those are easy numbers to add and maintain the distinction between the classes. However, the computer doesn't really seem to distinguish between the various types of freighters, and also often only carries very small loads in the freighters. 5 cargo bays is probably more than enough for just about any hauling job the computer will assign to a freighter.
3. how much cargo storage a mining base, a port, etc. needs?
For spaceports: 1 cargo bay, because it's the minimum required to have a valid design. Spaceports and any other base built over a colony share the colony's storage capacity, which is essentially unlimited for all practical purposes.
For mining stations, see here:
For bases not built over a colony and which do not have construction yards, I would not add much more cargo capacity than would be needed to hold the entire capacity of the fuel cells of the station, as this theoretically allows the station to receive a full fuel load from a freighter all at once. Much more than that is overkill, as the only thing that stations lacking construction yards need nonfuel resources for are refits.
For bases not built over a colony that do have construction yards, check your ship designs and see how many resources they require. Multiply that by the number of construction yards on the station, and then multiply that by another two or three or four to allow the shipyard to build several runs of ships in a row rather than a single ship in each yard, and that's the cargo capacity you require.
4. what speed is better for civilian ship? does it need armor/shields?
20 or more speed is good enough. 30-35 speed plus a high turn rate (~20 degrees per second) is good for escaping pirates and typically doesn't cost your civilian ships too much space or power. All ships should have armor and shields, though civilian ships really only need enough of either to keep them intact until they can engage the hyperdrive, so one to five armor plates and one or two shield generators is probably plenty.
5. what weapons a mining station need to destroy giant crayfishes?
Depends. Has the Giant Kaltor or other space monster eaten other ships before? Regardless, it's better to deploy a small fleet to a system to kill the local space monsters than to arm a mining base heavily to deal with it. The only space monsters that respawn are the sand slugs over desert worlds with a certain spicy resource and, together with that resource, are a reference to Dune, while the only ones that multiply are a shimmering silvery swarm, though the Ardilus can move between systems if I'm not mistaken (Giant Kaltors, Space Slugs, and Sand Slugs never leave their home systems). Five blasters or torpedoes is probably enough, if you remembered to put a decent amount of armor on the station (space monster attacks are unaffected by shields; it doesn't matter if your ship has 100 shields or 1,000 shields, the monster will start damaging the hull and armor as soon as it starts attacking).
Is there any manual concerning these and related questions?
You can try looking around in the War Room section of the forums:
Here are a couple of related threads:
You can also look in the stuff in the Guide to Guides; some of the threads linked there have some stuff about ship design: