For example, A website which will give the option to register an ethereum account. The user would hit the register button and the server, which I assume is running a node 24/7 and will generate an account via web3.eth.personal.newAccount. The server then sends back the public and private key for this account to the user.
Now the website also has the option to allow users to deploy a smart contract. To do this I assume they would send their public key/private key and the server will use this to deploy the contract from the users account after unlocking it.
But this account would have 0 ether since the user isn't mining with it because they don't even have an ethereum node. Another solution could be the server has one account which contains ether as the server is mining. The server then deploys all contracts from this one account on behalf of the other users but declares them as the owner of the contract in some way.
Could someone clarify what approach is taken to implement such a website?