# 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

### 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

### 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

### 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

### 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

### 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

### 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