# Workflows ### User contract creation - create the contracts from and external account - Fund it with gETH & gBZZ - This fund is used to fund the 1 Million invited accounts ![](https://i.imgur.com/rHhuF1p.png) ### First user signup (without invite) - A main/root user is created - this user creates the first 1 million invites - Users who accept this invites are funded through the contract above ![](https://i.imgur.com/SAvdDZv.png) ### Create Bulk invites - Can be a seperate program - Input is emails list file (emails should be delimited by newline). - Invite Ids urls are stored in swarm - If someone clicks we should check if this invite ID is still pending ![](https://i.imgur.com/Ug35U2u.png) ### User Signup (using invite, zero gas cost) - Signup using invite (no signup without invite, except the first user) - Check if the inviteId is still pending otherwise dont allow - Create a new user (do we need to fund this user???) - Store the user info in a swarm feed - Store the user to swarm ref mapping in contract ![](https://i.imgur.com/jZbFVcU.png) ### User create invites (5 free invites) - Login - Every user should have a fixed no of invites (5 invites??? or until fee over) - Get an invite from contract and send it to friend - Prefund that account ![](https://i.imgur.com/bX8DMIQ.png) ### User login - Send username, password - Get swarm feed for this user from contract - Get user info from swarm feed - If able to decrypt, then proper user, otherwise reject ![](https://i.imgur.com/OiL9JNy.png) ### Logout user ### Share file ### Credit Deduction - Give some default storage credits for eery user when created - Credit deduction is fixed - X credits per Gb per unit of time - Y credits per Gb of download - How do we deduct the storage credits in the contract - function to get the current remaining credits of a user ### File system functionality - Mkdir - Rmdir - Upload File - Download File