diff --git a/README.md b/README.md index 58550a2..cdd9e99 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ a program for event staff that allows you to scan tickets, check their validity ## How it works ![Main flow, sequence diagram](./how-it-works.svg) -see source [here](https://sequencediagram.org/index.html#initialData=C4S2BsFMAIEUCVoGUDGBDAdhyAnaAzAV3HAPAHsB3AKGrRWHLyWDX32gAVcBncjNLQAOaHKBQgRGYAHMc5QkOgBiFABYARmvwBGOIlSZseeJHrBoAQSFDwIdKH7URY+5MwWAqgEloIabj49JDOouLu0tAAsuQaABrIjDghLuFSFgjQAMLkACYwPOhYuNB2GjiiAJ6hrhLpcgpKlpy+4GiVuDVpHtDeGPnSYJXQPLgAbvYpYW7p0ABCAGILI+OT1JD9XTM98HFzyAAiANJ+GDysGChTtRGy8ooqdjIAFsAa4IQwu-tIx1t1Oz20EgYw2Fg0hB4-1u0AAUkgAPIAOWgwEgAFtbGg0dDZqgcJILNwcOiQDweCAnKltpF8YTss9ICgANb6bJ5a7dWkoAlCLyjaAAFXszMgwGouWxaA0aAFAFE2ud7MgzDgUM91psNrlaLQWGwOMS+AIALQAPh8pzROCCVwAXNByEINtBLf5UYyCCAcOdUSB0SE3QEbcFzfr2FxePw0A7ZayMWgQOBqOHDVHTRbfP5rbbIA7-EJCBYE0nqEGc6GzTF4okmHmRkkYCXk9WEiw6+a+gNQMBhqMcBN7dBTABHT6+hGCzjULtgoYrAeTc2t2vJB0AJgADJvoAijmWs8Hc2HWBGjdHYzxWZPp6nIz7o+by4FgvmMIWLDeD1aX1dl7E20bB0b3ZfJqBXdtknNb5DhOfxzkwIc0CLZ4mBAAAvbFKQwU5YOoGDfjgs4Lj-KsANXetkmAQgcBwwjTgQy4QggxtoKBEEwWgCEeAdJBtWBUFIgOSwADVvCRLJvAAfQQKSsgRA45SkkTLAAGW8YTBQReApM4OV4CibwkCQbxkSQfD2ME8FITDHl6WJUlyWwy9WWdEkyQpfgeGgFM7L5e9HM8jBzXhZFUQxLE0QdNzAuw7zRAqYZqFClE0UxNo0TY-YOMibjotwWKvOgBL2lwlKCCYdFsQs7KrK4myyJrSD6wwchQHwYZpQUCw0DGRM2neGAYo8uKuL7QgNEKXlHBwnLxRYjszUWZZ+0HesNgJdVoElVhHQ4Xr+rQcANCbKyoWWhc1v-JqgOgKiaNmjBNsZXJtqlb9s1-SATwNe9jRjEZUMoATOLsX1MFeuMQciRhoHVchyAFfgQjvc8M2fEMh1GKAGGh8UMePRrALrB1zjrFYcbRV65o+o9K1R9MAcyQojBKT7MZR080wfdHDwrLGijZFAOVp-nvqJijScbEZBeSHhiHm8jmqyvH6p4lV+lV4SxIk6TZPkxTlLUjTLC0nSsgACTlLJ9xgua1ds6aGSZVlMhyfIHRHPBhfyN7WF8p2skZFk2Xd8XyrSyLKMgeXwAsZLEVSiKMvFu26ryu6Y4VsrE4qklsR8tPOO467ibXaBWvazqNG66AJnAHbsMz2PxVFr6frPRnSaBoWORlzBm4V2gjosdABTl7OyQII7RjbjmO+5-67R4HvcHkPBKH8XIqGgTfgGeYrZpwdfoADck0BkEJIHAAUx5gCe478bz5ZQK5yTnwmGZ5mMV53l+3+foLTe-QqApi5n9R8mYfwcwdCgOwIdYb7xgBCYAjAcIACJPACnEKKYA6CP6VgWuXSEJQcFimhuBJWrEzRF1ypCXi-F7ba3EpJGS5sFJKRUupTS2kpKeCQEpQU3gbZykFLqWh1keCO3pFgmAwoWRigdGQiwO1BB0n8rIoUIoxQhVzpHFODoH7xwjsnbEqdLLF3oYPR+7pyr4EqgXGqqsS4S2ag6SuIAOrFRrkWOuSZG78GsfjPm7czRfyXsVBgIA+pojZCzYoeB7F4HiRXSAAAPCwyjNQ6loEAA) +see source [here](https://sequencediagram.org/index.html#initialData=C4S2BsFMAIEUCVoGUDGBDAdhyAnaAzAV3HAPAHsB3AKGrRWHLyWDX32gAVcBncjNLQAOaHKBQgRGYAHMc5QkOgBiFABYARmvwBGOIlSZseeJHrBoAQSFDwIdKH7URY+5MwWAqgEloIabj49JDOouLu0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GijZFAOVp-nvqJijScbEZBeSHhiHm8jmqyvH6p4lV+lV4SxIk6TZPkxTlLUjTLC0nSsgACTlLJ9xgua1ds6aGSZVlMhyfIHRHPBhfyN7WF8p2skZFk2Xd8WFVlcQVVEdUXOgIRkgmBRvOSMdIG88gOG18TJJk82FKUlT1M07SpM8JAlMFbwbblQU8eoCOlRQaO1WeR36SDl3Q45B05YVny6X8zuQ7djkQsRVKIoyyj0-75KJ-C9LsXFu26ryu7Z-ACx3XK-BKuxHzV847jruJtdoFa9rOo0broAmcAduwjf5a32gCfprm-ovQGqCFjkZcwM-BWtAjoWHQAKPuW8-DeSCOAUYosvo-TPIzO0PAgbAhwPIPAlB-C5F-jg4AzxiqzUwUwaAAZyRoBkCESAcCYDgJgJA7e3l5YoCuOSBBHMkHc3+qg9BrD2EsMFjg-oVAUyfzRmgJ8fMvoOhQHYEOsNCEwAhMARgOEABEngBTiFFMADRnDCYLXPpCEouixTQ3AkrViZoj65UhLxfi9ts66zznJAuRti6m1LuXSu1cji1xqqrE+ZpG5Rz4jHZ4pNeowB2mgPaHoyQbzTr6AAFC43O+sPFFxNmbMuFcpJVxrnXOaABKIJ9sQmD35DAYULIxQOnMRYOJAd6TaNqSKMU48wppUijPF+Fh549KnsvFWlSHFAKgTvBee8SQHwqWvBqxiWptRAB1YqN8ix3yTI-fgkz8YyK4WaBmPMAbmBAH1NEbIWbFDwLMgBOFsAAA8LBNM1DqWgQA) diff --git a/how-it-works.svg b/how-it-works.svg index 78e144e..9d7a6d1 100644 --- a/how-it-works.svg +++ b/how-it-works.svg @@ -1 +1 @@ -title%20QR%20Scanner%20full%20flow%0A%0Aactor%20Staff%20Persona%0A%0Aparticipantgroup%20%23c4b4f1%20QR%20Scanner%20React%20Application%0Aparticipant%20UI%20interface%0Aparticipant%20MobX%20Store%0Aparticipant%20QR%20Code%20scanner%20library%0Aparticipantgroup%20API%20layer%0Aparticipant%20Indentity%20service%0Aparticipant%20BFF%20service%0Aend%0Aparticipant%20RXB%20SDK%20instance%0Aparticipantgroup%20%23lightblue%20RXB%20SDK%0Aparticipant%20RXB%20event%20bus%0Aparticipant%20JSON%20template%0Aparticipant%20Script%20Permission%0Aparticipant%20Script%20Check%20QR%20Code%0Aparticipant%20Script%20Use%20Ticket%0Adatabase%20Elastic%20Search%0Aend%0Aend%0A%0A%0A%0AStaff%20Persona-%3EUI%20interface%3A%20open%20UI%20in%20the%20first%20time%0AUI%20interface-%3EStaff%20Persona%3A%20ask%20email%0AStaff%20Persona-%3EUI%20interface%3A%20input%20email%0AUI%20interface-%3EMobX%20Store%3A%20store%20email%0AMobX%20Store-%3EIndentity%20service%3A%20Request%20OTP%0AIndentity%20service-%3EMobX%20Store%3A%20200%20OK%0AUI%20interface-%3EStaff%20Persona%3A%20ask%20OTP%0AStaff%20Persona-%3EUI%20interface%3A%20input%20OTP%0AUI%20interface-%3EMobX%20Store%3A%20OTP%20Code%0AMobX%20Store-%3ERXB%20SDK%20instance%3A%20authorization%20in%20SDK%0ARXB%20SDK%20instance-%3EMobX%20Store%3A%20return%20SDK%20instance%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_PERMISSIONS%0ARXB%20event%20bus-%3EScript%20Permission%3A%20ask%20permissions%20%0AScript%20Permission-%3EJSON%20template%3A%20permissions%20array%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20permissions%20array%20in%20JSON%20format%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20available%20permissions%20by%20subscription%20event%0AMobX%20Store-%3EBFF%20service%3A%20enrich%20data%20of%20availalbe%20events%0ABFF%20service-%3EMobX%20Store%3A%20return%20enriched%20data%0AUI%20interface-%3EStaff%20Persona%3A%20show%20event%20list%20and%20ask%20event%20to%20choose%20one%0AStaff%20Persona-%3EUI%20interface%3A%20select%20event%0AUI%20interface-%3EMobX%20Store%3A%20store%20selected%20event%0AUI%20interface-%3EStaff%20Persona%3A%20QR%20scanner%20interface%0AStaff%20Persona-%3EUI%20interface%3A%20scan%20QR%20code%0AUI%20interface-%3EMobX%20Store%3A%20store%20scan%20result%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_CHECK%0ARXB%20event%20bus-%3EScript%20Check%20QR%20Code%3A%20qr%20code%20data%0AScript%20Check%20QR%20Code-%3EJSON%20template%3A%20result%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20result%20in%20JSON%20format%20%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20vildation%20result%0A%0AUI%20interface-%3EStaff%20Persona%3A%20show%20QR%20code%20scan%20result%0A%0Aalt%20case%20result%20is%20false%0AUI%20interface-%3EStaff%20Persona%3Ashow%20error%20window%20with%20an%20error%20message%0Aelse%20case%20result%20is%20success%0AUI%20interface-%3EStaff%20Persona%3Ashow%20success%20scan%20window%0AStaff%20Persona-%3EUI%20interface%3A%20click%20to%20the%20button%20%22Use%20ticket%22%0AUI%20interface-%3EMobX%20Store%3A%20user%20ticket%20even%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_USE_TICKET%0A%0A%0ARXB%20event%20bus-%3EScript%20Use%20Ticket%3A%20ticket%20data%0AScript%20Use%20Ticket-%3EJSON%20template%3A%20result%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20result%20in%20JSON%20format%20%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20vildation%20result%0AUI%20interface-%3EStaff%20Persona%3A%20activate%20QR%20scanner%20for%20scan%20next%20ticket%0Aend%0A%0A%0AQR Scanner React ApplicationAPI layerRXB SDKStaff PersonaUI interfaceMobX StoreQR Code scanner libraryIndentity serviceBFF serviceRXB SDK instanceRXB event busJSON templateScript PermissionScript Check QR CodeScript Use TicketElastic SearchQR Scanner full flowopen UI in the first timeask emailinput emailstore emailRequest OTP200 OKask OTPinput OTPOTP Codeauthorization in SDKreturn SDK instanceSend event DAVINCI_QR_CODE_VALIDATOR_PERMISSIONSask permissions permissions array permissions array in JSON formatnotify about available permissions by subscription eventenrich data of availalbe eventsreturn enriched datashow event list and ask event to choose oneselect eventstore selected eventQR scanner interfacescan QR codestore scan resultSend event DAVINCI_QR_CODE_VALIDATOR_CHECKqr code dataresult result in JSON format notify about vildation resultshow QR code scan resultshow error window with an error messageshow success scan windowclick to the button "Use ticket"user ticket evenSend event DAVINCI_QR_CODE_VALIDATOR_USE_TICKETticket dataresult result in JSON format notify about vildation resultactivate QR scanner for scan next ticketalt[case result is false][case result is success] \ No newline at end of file +title%20QR%20Scanner%20full%20flow%0A%0Aactor%20Staff%20Persona%0A%0Aparticipantgroup%20%23c4b4f1%20QR%20Scanner%20React%20Application%0Aparticipant%20UI%20interface%0Aparticipant%20MobX%20Store%0Aparticipant%20QR%20Code%20scanner%20library%0Aparticipantgroup%20API%20layer%0Aparticipant%20Indentity%20service%0Aparticipant%20BFF%20service%0Aend%0Aparticipant%20RXB%20SDK%20instance%0Aparticipantgroup%20%23lightblue%20RXB%20SDK%0Aparticipant%20RXB%20event%20bus%0Aparticipant%20JSON%20template%0Aparticipant%20Script%20Permission%0Aparticipant%20Script%20Check%20QR%20Code%0Aparticipant%20Script%20Use%20Ticket%0Adatabase%20Elastic%20Search%0Aend%0Aend%0A%0A%0A%0AStaff%20Persona-%3EUI%20interface%3A%20open%20UI%20in%20the%20first%20time%0AUI%20interface-%3EStaff%20Persona%3A%20ask%20email%0AStaff%20Persona-%3EUI%20interface%3A%20input%20email%0AUI%20interface-%3EMobX%20Store%3A%20store%20email%0AMobX%20Store-%3EIndentity%20service%3A%20Request%20OTP%0AIndentity%20service-%3EMobX%20Store%3A%20200%20OK%0AUI%20interface-%3EStaff%20Persona%3A%20ask%20OTP%0AStaff%20Persona-%3EUI%20interface%3A%20input%20OTP%0AUI%20interface-%3EMobX%20Store%3A%20OTP%20Code%0AMobX%20Store-%3ERXB%20SDK%20instance%3A%20authorization%20in%20SDK%0ARXB%20SDK%20instance-%3EMobX%20Store%3A%20return%20SDK%20instance%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_PERMISSIONS%0ARXB%20event%20bus-%3EScript%20Permission%3A%20ask%20permissions%20%0AScript%20Permission-%3EJSON%20template%3A%20permissions%20array%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20permissions%20array%20in%20JSON%20format%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20available%20permissions%20by%20subscription%20event%0AMobX%20Store-%3EBFF%20service%3A%20enrich%20data%20of%20availalbe%20events%0ABFF%20service-%3EMobX%20Store%3A%20return%20enriched%20data%0AUI%20interface-%3EStaff%20Persona%3A%20show%20event%20list%20and%20ask%20event%20to%20choose%20one%0AStaff%20Persona-%3EUI%20interface%3A%20select%20event%0AUI%20interface-%3EMobX%20Store%3A%20store%20selected%20event%0AUI%20interface-%3EStaff%20Persona%3A%20QR%20scanner%20interface%0AStaff%20Persona-%3EUI%20interface%3A%20scan%20QR%20code%0AUI%20interface-%3EMobX%20Store%3A%20store%20scan%20result%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_CHECK%0ARXB%20event%20bus-%3EScript%20Check%20QR%20Code%3A%20qr%20code%20data%0AScript%20Check%20QR%20Code-%3EElastic%20Search%3A%20ask%20previous%20reques%20of%20DAVINCI_QR_CODE_VALIDATOR_USE_TICKET%20event%0AElastic%20Search-%3EScript%20Check%20QR%20Code%3A%20result%20%0AScript%20Check%20QR%20Code-%3EJSON%20template%3A%20result%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20result%20in%20JSON%20format%20%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20vildation%20result%0A%0AUI%20interface-%3EStaff%20Persona%3A%20show%20QR%20code%20scan%20result%0A%0Aalt%20case%20result%20is%20false%0AUI%20interface-%3EStaff%20Persona%3Ashow%20error%20window%20with%20an%20error%20message%0Aelse%20case%20result%20is%20success%0AUI%20interface-%3EStaff%20Persona%3Ashow%20success%20scan%20window%0AStaff%20Persona-%3EUI%20interface%3A%20click%20to%20the%20button%20%22Use%20ticket%22%0AUI%20interface-%3EMobX%20Store%3A%20user%20ticket%20even%0AMobX%20Store-%3ERXB%20event%20bus%3A%20Send%20event%20DAVINCI_QR_CODE_VALIDATOR_USE_TICKET%0ARXB%20event%20bus-%3EElastic%20Search%3A%20save%20data%20of%20this%20request%20(DAVINCI_QR_CODE_VALIDATOR_USE_TICKET%20event)%0ARXB%20event%20bus-%3EScript%20Use%20Ticket%3A%20ticket%20data%0AScript%20Use%20Ticket-%3EJSON%20template%3A%20result%20%0AJSON%20template-%3ERXB%20event%20bus%3A%20result%20in%20JSON%20format%20%0ARXB%20event%20bus-%3EMobX%20Store%3A%20notify%20about%20vildation%20result%0AUI%20interface-%3EStaff%20Persona%3A%20activate%20QR%20scanner%20for%20scan%20next%20ticket%0Aend%0A%0A%0AQR Scanner React ApplicationAPI layerRXB SDKStaff PersonaUI interfaceMobX StoreQR Code scanner libraryIndentity serviceBFF serviceRXB SDK instanceRXB event busJSON templateScript PermissionScript Check QR CodeScript Use TicketElastic SearchQR Scanner full flowopen UI in the first timeask emailinput emailstore emailRequest OTP200 OKask OTPinput OTPOTP Codeauthorization in SDKreturn SDK instanceSend event DAVINCI_QR_CODE_VALIDATOR_PERMISSIONSask permissions permissions array permissions array in JSON formatnotify about available permissions by subscription eventenrich data of availalbe eventsreturn enriched datashow event list and ask event to choose oneselect eventstore selected eventQR scanner interfacescan QR codestore scan resultSend event DAVINCI_QR_CODE_VALIDATOR_CHECKqr code dataask previous reques of DAVINCI_QR_CODE_VALIDATOR_USE_TICKET eventresult result result in JSON format notify about vildation resultshow QR code scan resultshow error window with an error messageshow success scan windowclick to the button "Use ticket"user ticket evenSend event DAVINCI_QR_CODE_VALIDATOR_USE_TICKETsave data of this request (DAVINCI_QR_CODE_VALIDATOR_USE_TICKET event)ticket dataresult result in JSON format notify about vildation resultactivate QR scanner for scan next ticketalt[case result is false][case result is success] \ No newline at end of file