- Start Redis server
docker/start-redis.sh
- In config -> env -> development.json (if NODE_ENV is default) set port and host for redis
- run initialization
npm run initialize
- run app
npm run start
Transactions are an important part of the Storm platform. There is the potential for two Storm Players (users) to exchange Tokens between each other, providing a mutually agreed upon criteria is met. These agreements are only valid for a limited time. If the criteria is not met, the agreement is voided.
As a user who owns a coffee shop I want to pay Tokens to other Players who visit my coffee shop this week so I can drive foot traffic!
Provide a functional API interface that accepts transaction objects as defined in the Resources section. Transactions must have a state, which can change over time. That state should be one of the following: "new" for a freshly submitted request, "pending" for a request that has not been completed, "denied" for a request that has been rejected. Each user may have many transactions and each transaction may require approval of many users. For a transaction to be approved, all parties must agree to completion criteria. Once a user has approved or denied a transaction they may not change their mind. A transaction must have a limited time that it is active and attempts to change an expired transaction must be rejected. Value is only ever transfered from one user to another, never to a group.
{
"id": 3,
"value": 100,
"from": "626a8af9-0d68-40bc-9d93-d79df27abfe6",
"to": "f5c91da2-724d-41e4-ab42-c874fb013bcd",
"expire": "2018-05-27T23:49:51.510Z",
"state": "new",
"requireAdmin": true,
"adminApproval": {
"ec07649b-dc6c-4a65-b253-ef313fad07b1": { "approval": "pending", "approved": false }
},
"approved": false,
"approvers": {
"2018-05-27T23:49:51.510Z": {"approval": "pending", "approved": false},
"f5c91da2-724d-41e4-ab42-c874fb013bcd": {"approval"": "pending", "approved": false},
"76613401-d664-481e-b982-a5287b37d3e0": {"approval": "done", "approved": true}
}
}