diff --git a/doc/uml/access.png b/doc/uml/access.png new file mode 100644 index 0000000000000000000000000000000000000000..bf622679097066b19fec4a87f5f4cb9073c6608a Binary files /dev/null and b/doc/uml/access.png differ diff --git a/doc/uml/access.pu b/doc/uml/access.pu new file mode 100644 index 0000000000000000000000000000000000000000..382f4280fe7dd1f7e8348b3a83e21e893c5b061a --- /dev/null +++ b/doc/uml/access.pu @@ -0,0 +1,15 @@ +@startuml + + +class IdentitiesAccess << (A,green) >> { +} +class CertificationAccess << (A,green) >> { +} +class TransactionAccess << (A,green) >> { +} +class CommunityAccess << (A,green) >> { +} +class BlockchainAccess << (A,green) >> { +} + +@enduml \ No newline at end of file diff --git a/doc/uml/backend.png b/doc/uml/backend.png new file mode 100644 index 0000000000000000000000000000000000000000..027efe270160c2c00f728e2c0b665f02d6eb55ae Binary files /dev/null and b/doc/uml/backend.png differ diff --git a/doc/uml/backend.pu b/doc/uml/backend.pu index 6fbdcb723a2a6cb77e39a66b5059346db853f00e..1ee7ca5f156e385b32612ce07adfa116de1a6a3a 100644 --- a/doc/uml/backend.pu +++ b/doc/uml/backend.pu @@ -1,242 +1,49 @@ @startuml +!include data.pu +!include access.pu +!include services.pu -class Identity << (D,orchid) >> { - currency: str (FK) - uid: str - pubkey: str (PK) - blockstamp: BlockUID - timestamp: int - signature: str - member: bool - membership_buid: BlockUID - membership_timestamp: int -} - -class Certification << (D,orchid) >> { - currency: str (FK) - certifier: str - certified: str - blockstamp: BlockUID - timestamp: int - signature: str -} - -class Transaction << (D,orchid) >> { - currency: str (FK) - blockstamp: str - locktime: int - issuer: str - recipient: str - amount: int - comment: str - sha_hash: str (PK) -} - -class Community << (D,orchid) >> { - profile: str (FK) - pubkey: str (FK) - currency: str (PK) - c: float - dt: int - ud0: int - sig_period: int - sig_stock: int - sig_window: int - sig_validity: int - sig_qty: int - xpercent: float - ms_validity: int - step_max: int - median_time_blocks: int - avg_gen_time: int - dt_diff_eval: int - blocks_rot: int - percent_rot: float -} - -class Blockchain << (D,orchid) >> { - currency: str (PK) - current_buid: BlockUID - nb_members: int - mass: int - median_time: int - last_ud: int - last_ud_base: int - mass_minus_1: int - ud_minus_1: int - ud_minus_1_base: int -} - -class Node << (D,orchid) >> { - currency: str (FK) - endpoints: str - uid: str - pubkey: str (PK) - current_buid: BlockUID - previous_buid: BlockUID - state: int - software: str - version: str - merkle_nodes: dict -} - -class Key << (D,orchid) >> { - pubkey: str (PK) - salt: str -} - -class UserParameters << (D,orchid) >> { - profile: str (PK) - lang: str - ref: 0 - expert_mode: bool, - digits_after_comma: int - maximized: bool - notifications: bool - enable_proxy: bool - proxy_type: int - proxy_address: str - proxy_port: 8080: int - international_system_of_units: bool - auto_refresh: bool - forgetfulness: bool -} - - - - - - - - -class IdentitiesRepo << (R,orange) >> { - Commit() - Update() - Save() - Drop() -} -IdentitiesRepo "1" --* "*" Identity - -class CertificationRepo << (R,orange) >> { - Commit() - Update() - Save() - Drop() -} -CertificationRepo "1" --* "*" Certification - -class TransactionRepo << (R,orange) >> { - Commit() - Update() - Save() - Drop() -} -TransactionRepo "1" --* "*" Transaction - -class CommunityRepo << (R,orange) >> { - Commit() - Update() - Save() - Drop() -} -CommunityRepo "1" --* "*" Community - -class BlockchainRepo << (R,orange) >> { - Create() - Update() - Save() - Drop() -} -BlockchainRepo "1" --* "*" Blockchain - -class NodeRepo << (R,orange) >> { - Create() - Update() - Save() - Drop() -} -NodeRepo "1" --* "*" Node - -class KeyRepo << (R,orange) >> { - Create() - Update() - Save() - Drop() -} -KeyRepo "1" --* "*" Key - -class UserParametersRepo << (R,orange) >> { - Create() - Update() - Save() - Drop() -} -UserParametersRepo "1" --* "*" UserParameters - - - - - - - - - -class ProfileService << (S,cyan) >> { - add_connection() - remove_connection() - -} ProfileService "1" --> "1" UserParameters ProfileService "*" --> "1" UserParametersRepo -class AccountService << (S,cyan) >> { - send_transaction() - send_certification() - send_membership() - send_identity() - send_revokation() -} AccountService "1" --> "1" Key AccountService "*" --> "1" KeyRepo -class TransactionsService << (S,cyan) >> { - refresh_transactions() - rollback_transactions() -} + TransactionsService "1" --> "*" Transaction -TransactionsService "*" --> "1" TransactionRepo +TransactionsService "*" --> "1" TransactionAccess +TransactionAccess "1" --> "1" TransactionRepo -class RegistryService << (S,cyan) >> { - get_identity() - get_certifiers_of() - get_certified_by() -} RegistryService "1" --> "*" Identity RegistryService "1" --> "*" Certification -RegistryService "*" --> "1" IdentitiesRepo -RegistryService "*" --> "1" CertificationRepo +RegistryService "*" --> "1" IdentitiesAccess +IdentitiesAccess "1" --> "1" IdentitiesRepo +RegistryService "*" --> "1" CertificationAccess +CertificationAccess "1" --> "1" CertificationRepo -class NetworkService << (S,cyan) >> { - discover_network() -} NetworkService "1" --> "*" Node NetworkService "*" --> "1" NodeRepo -class BlockchainService << (S,cyan) >> { - receive_block() -} BlockchainService "1" --> "1" Blockchain BlockchainService "1" --> "1" Community -BlockchainService "*" --> "1" BlockchainRepo -BlockchainService "*" --> "1" CommunityRepo +BlockchainService "*" --> "1" BlockchainAccess +BlockchainAccess "1" --> "1" BlockchainRepo +BlockchainService "*" --> "1" CommunityAccess +CommunityAccess "1" --> "1" CommunityRepo package API { - class BMAService << (S,cyan) >> { + class BMAAccess << (S,cyan) >> { get() post() broadcast() } } +BlockchainAccess --> BMAAccess +CommunityAccess --> BMAAccess +TransactionAccess --> BMAAccess +IdentitiesAccess --> BMAAccess +CertificationAccess --> BMAAccess + @enduml \ No newline at end of file diff --git a/doc/uml/data.png b/doc/uml/data.png new file mode 100644 index 0000000000000000000000000000000000000000..43e36fac7bb1876a151ac04b82fa08b92e22d631 Binary files /dev/null and b/doc/uml/data.png differ diff --git a/doc/uml/data.pu b/doc/uml/data.pu new file mode 100644 index 0000000000000000000000000000000000000000..7cba682d14f7048a85fe590181025dbe50576490 --- /dev/null +++ b/doc/uml/data.pu @@ -0,0 +1,178 @@ +@startuml + + + +class Identity << (D,orchid) >> { + currency: str (FK) + uid: str + pubkey: str (PK) + blockstamp: BlockUID + timestamp: int + signature: str + member: bool + membership_buid: BlockUID + membership_timestamp: int +} + +class Certification << (D,orchid) >> { + currency: str (FK) + certifier: str + certified: str + blockstamp: BlockUID + timestamp: int + signature: str +} + +class Transaction << (D,orchid) >> { + currency: str (FK) + blockstamp: str + locktime: int + issuer: str + recipient: str + amount: int + comment: str + sha_hash: str (PK) +} + +class Community << (D,orchid) >> { + profile: str (FK) + pubkey: str (FK) + currency: str (PK) + c: float + dt: int + ud0: int + sig_period: int + sig_stock: int + sig_window: int + sig_validity: int + sig_qty: int + xpercent: float + ms_validity: int + step_max: int + median_time_blocks: int + avg_gen_time: int + dt_diff_eval: int + blocks_rot: int + percent_rot: float +} + +class Blockchain << (D,orchid) >> { + currency: str (PK) + current_buid: BlockUID + nb_members: int + mass: int + median_time: int + last_ud: int + last_ud_base: int + mass_minus_1: int + ud_minus_1: int + ud_minus_1_base: int +} + +class Node << (D,orchid) >> { + currency: str (FK) + endpoints: str + uid: str + pubkey: str (PK) + current_buid: BlockUID + previous_buid: BlockUID + state: int + software: str + version: str + merkle_nodes: dict +} + +class Key << (D,orchid) >> { + pubkey: str (PK) + salt: str +} + +class UserParameters << (D,orchid) >> { + profile: str (PK) + lang: str + ref: 0 + expert_mode: bool, + digits_after_comma: int + maximized: bool + notifications: bool + enable_proxy: bool + proxy_type: int + proxy_address: str + proxy_port: 8080: int + international_system_of_units: bool + auto_refresh: bool + forgetfulness: bool +} + +class UserParametersRepo << (R,orange) >> { + Create() + Update() + Save() + Drop() +} + + +class KeyRepo << (R,orange) >> { + Create() + Update() + Save() + Drop() +} + + +class NodeRepo << (R,orange) >> { + Create() + Update() + Save() + Drop() +} + +class BlockchainRepo << (R,orange) >> { + Create() + Update() + Save() + Drop() +} +class CommunityRepo << (R,orange) >> { + Commit() + Update() + Save() + Drop() +} +class TransactionRepo << (R,orange) >> { + Commit() + Update() + Save() + Drop() +} +class CertificationRepo << (R,orange) >> { + Commit() + Update() + Save() + Drop() +} +class IdentitiesRepo << (R,orange) >> { + Commit() + Update() + Save() + Drop() +} + +IdentitiesRepo "1" --* "*" Identity + +CertificationRepo "1" --* "*" Certification + +TransactionRepo "1" --* "*" Transaction + +CommunityRepo "1" --* "*" Community + +BlockchainRepo "1" --* "*" Blockchain + +NodeRepo "1" --* "*" Node + +KeyRepo "1" --* "*" Key + +UserParametersRepo "1" --* "*" UserParameters + + +@enduml \ No newline at end of file diff --git a/doc/uml/services.png b/doc/uml/services.png new file mode 100644 index 0000000000000000000000000000000000000000..687dc4cb21e11135f61bdb992a2941bb9b65e993 Binary files /dev/null and b/doc/uml/services.png differ diff --git a/doc/uml/services.pu b/doc/uml/services.pu new file mode 100644 index 0000000000000000000000000000000000000000..e4e42ce6f832bebbe5f23f5665f1a541457d23db --- /dev/null +++ b/doc/uml/services.pu @@ -0,0 +1,37 @@ +@startuml + + + +class ProfileService << (S,cyan) >> { + add_connection() + remove_connection() + +} + +class AccountService << (S,cyan) >> { + send_transaction() + send_certification() + send_membership() + send_identity() + send_revokation() +} +class TransactionsService << (S,cyan) >> { + refresh_transactions() + rollback_transactions() +} + +class RegistryService << (S,cyan) >> { + get_identity() + get_certifiers_of() + get_certified_by() +} + +class NetworkService << (S,cyan) >> { + discover_network() +} + +class BlockchainService << (S,cyan) >> { + receive_block() +} + +@enduml \ No newline at end of file