Open Question: What economic model is used in the film Star Trek?

After watching the films and series, I always wondered, how do people live in that time?, apparently money is not needed but how do they were able to build such big machines and space ships?. Do the crew receive a salary or something like that? Is it possible to apply that economic model to our current world?