eoscostarica / lifebank Goto Github PK
View Code? Open in Web Editor NEWAn incentive-based EOSIO blockchain solution for blood donations :heart:
Home Page: https://lifebank.io
License: MIT License
An incentive-based EOSIO blockchain solution for blood donations :heart:
Home Page: https://lifebank.io
License: MIT License
Servers design for
In order to prevent massive amounts of signups from non-human blood donors we should have a captcha on signup
As an user I want to login using my account name and secret provided in the signup process
show the readme file some love
A lifebank must be invited by another one.
(to avoid spam creation of new accounts and ram waste)
Medical procedures are inherently risky users must be informed and consent to the service
Users must also have a way of revoking their consent.
Each user must accept terms of service
once a users account is created and PIN is generated the user must sign a transaction declaring informed consent to use the app.
Informed consent table must have :
Create the user journey diagram for a clinic.
The clinic is the community creator and the issuer of a token
As I user I should be able to toggle consent from my profile page.
As a user I should also have a way of erasing all my data and recovering the RAM only if a user has donated at least once.
Users can also request for their private keys once they have donated (via email? or on screen?) and revoke consent so that lifebank no longer holds their private keys
Once a token is transfers users should see a recipt . This receipt is made up of a blockchain transaction.
This would be a great component for our eoscr-components storybook , as we can use it to display transaction results for any EOSIO TX.
Create a project logo and icons for the app
provide users with a way to erase all of their records (similar to revoke)
they should be able to do this prom their profiles
@xavier506 is this on the database?
Once the potential donor user (PDU) visits the community donation center (CDC), they will need to complete the eligibility criteria for the specific donation. This will be handled as usual in person at the CDC before a blood donation. The donation center will also be able to post pre-requisites on their profile page so the potential donor can decide if they meet the criteria before visiting.
create SQL function in hasura to query locations based on a lactation and distance radius. (using PostGIS)
https://hasura.io/blog/building-a-realtime-geolocation-app-with-hasura-graphql-and-postgis/
Set theme colors according to design.
As a donor or sponsor I should be able to register an account in the blockchain which I can access with a PIN number
Attributes for Sponsor and donor accounts are different
Backend service generate key pairs for new account, should create account on the blockchain , store keys in wallet and wallet password and pin in the postgres database.
Slider component for LifeBanks to set the Blood Demand Level
Green 1 - token is issued to each doner
Yellow 2 - tokens issued to each doner
Red 3 - tokens issued to each doner
If users choose to leave an email address they can then recover their accountname or password.
Users can also choose e to log in with either email or account name once an email is set
LifeBank emphasises user experience over security If a user wants to recover their own private key they can also choose to do so. And interact with the smart contracts some other way.
Email address is not stored on the blockchain , only on our internal database (users should know this)
We need two icons for displaying locations on a map.
Lifebanks and sponsors should provide an email address when siging up
Write ricardian clauses for the consent2life
along with lifebankcode
and lifebankcoin
These contract clauses must be shown to users when they accept
If a user signs up and dosent use their account to donate blood in a time frame (say 1 month) then the account name can be assigned a new set of private keys and new users can use that account in order to avoid spending resources on accounts that are not being used
account names are being generated from a prefix + random letters
for example donor
+ random string made up from a-z, 1-5
In order to save ram and avoid asking users for theirfull names why not ask them for a 5 letter handle
or username
so as a user I could choose my user "name" to be bobby
and then the account would be donorbobby
This gives donor users a prefix and a suffix that they choose so that name
along with their secret
is all they need to remember in order to log in
We could shorten it to `don` para que suene a lo tico ... `doncostarica` ๐ฅ
As a Clinic I want add a note to my token transfer so I can add a reference number to relate to my system and make sure that it's related to a real donation. Thus making the process more secure.
Create a Database table to persist location data for easy query from frontend component
Tenemos que hacer una tabla que tenga:
name
latitude
longitude
type -> ENUM(SPONSOR | LIFE_BANK)
Tokens should be automatically refreshed if a user is active so that thetr session dosen't expire.
When a community is create a new EOSIO Token is configured.
(should be a constant somewhere in the code)
clinics can only transfer to doners
doners can only transfer to sponsors
sponsors retain tokens as savings
, savings may be useful in a future version of the app.
ACTION transfer(eosio::name from, eosio::name to, eosio::asset quantity, std::string memo);
Optional:
ACTION setexpiry(eosio::symbol currency, std::uint32_t expiration_period, eosio::asset renovation_amount);
Inspired by the Cambiatus token contract: https://github.com/cambiatus/contracts/tree/master/bespiral.token
Users sign up on the register page.
The register page creates a blockchain account and should help handle key management, all users need to remember is a an account name and secret
In order to keep token scarcity and keep lifebanks from staying at top urgency level at all times
-sponsors can send the tokens they get from doners to the lifebank with the highest blood urgency.
for example: if there is a can area with a disaster then sponsors can send their tokens to that clinic to help with relief
If a life bank has a surplus of tokens they can send tokens to another lifebank that needs it more
A community represents one or more blood banks in a given region.
A community has :
A community must have at least one clinic, upon creating a community you must then register a clinic.
Clinic Account must verify that action of donating blood was completed , once a donor donates blood he/she will receive a token
donor
account type receives token fromclinic
account type and may ONLY transfer token tosponsor
account types.
Clinic -> User -> Sponsor -> Savings
A clinic has :
The community is composed of the clinic the donors , and the small business that sponsor the community.
Note: maybe clinics can then add new clinics within the same community?
Users sign up on the register page.
The register page creates a blockchain account and should help handle key management, all users need to remember is a an account name and 4 digit PIN
donors must have:
Clinic will manage all personal data and no personal data is stored on blockchain.
Inspired by the bespiral community contract
https://github.com/cambiatus/contracts/tree/master/bespiral.community
A new keypaidr under the active permission can be created to be used specifically with lifebank
a starting point for communities https://lifebank.io
where you can learn about the app, login or sign up as a donor or sponsor
Users can choose to use the native eosio wallet provided by lifebank or they can optionally use the wallet of their choice
Create the user journey diagram for a blood donor.
Use the webapp-boilerplate to create a new React Web Application for frontend.
Life banks should have a dashboard with their token balances, they should be able to set their blood demand levels etc
Create a 3 min video as a deliverable for the hackathon project
Sopnsor sign up fields include a location selector, when a location is selected a hasura mutation should persist the location in the database
Custom actions that generate and sign transactions
HASURA -> HAPI -> EOSIO TESTNET
Create the user journey diagram for a sponsor or small business who is a member of the community who will revoke the token.
Users sign up on the register page.
The register page creates a blockchain account and should help handle key management, all users need to remember is a an account name and secret
Clinic will manage all personal data and no personal data is stored on blockchain.
As a logged in user I should see a page after I log in with a summary of my account (including token balances) and the actions I can perform
Attributes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.