Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoC - First Interaction #1

Open
olivmath opened this issue Nov 6, 2024 · 1 comment
Open

PoC - First Interaction #1

olivmath opened this issue Nov 6, 2024 · 1 comment

Comments

@olivmath
Copy link
Collaborator

olivmath commented Nov 6, 2024

PoC - First Interaction

Untitled

Sequencer Diagram txt

title PoC: First Interaction

actor User

participantgroup #lightblue:0.5 Core
participant Frontend
participant Backend
end

participantgroup #lightgreen:0.5 ExternalServices
database MongoDB
participant S3
participant Blockchain
participant EmailService
end

User->Frontend: Login: input email
Frontend->Backend: consult email
Backend->Backend: user not exist\ngenerate firstAcess token
Backend->EmailService: call to send firstAcess token to user email
EmailService->User: 2FA code in email
User->Frontend: input 2FA code
Frontend->Backend: validate token
Backend->Frontend: token valid: request registration
User->Frontend: input: name + cpf
Frontend->Backend: send user data
Backend->Backend: create new keypair
Backend->MongoDB: create new user \n(name, cpf, email, encryptedPrivateKey, publicKey)
Backend->Frontend: JWT token auth
Frontend->Frontend: user authenticated\nshow mint button
User->Frontend: click on button "Proof Attendence"
Frontend->User: request scan QRcode
User->Frontend: open camera, scan QRcode
Frontend->User: Modal: "you want proof your attendence?"\nrequest Geolocalization + timestamp
User->Frontend: User share data
Frontend->Backend: User data
Backend<->MongoDB: consulting user data (publickey)
Backend->Backend: generate POAP\ntemplate event + user data\n+1 new pdf
Backend<->S3: save new pdf <-> get link
Backend->Backend: build a json with metadata\n- name, cpf, public, traits, pdf link
Backend<->S3: save json metadata <-> get link
Backend->Blockchain: mint POAP <-> get tx id
Backend->MongoDB: update user data\n- pdf link, jsonmetadata link, tx id
Backend->Frontend: pdf link
Frontend->User: show PDF POAP

@olivmath olivmath changed the title PoC PoC - First Interaction Nov 6, 2024
@olivmath
Copy link
Collaborator Author

Sequence Diagram V2

Untitled

Text

title PoC: First Interaction

actor User

participantgroup #lightblue:0.5 Core
participant Frontend
participant Backend
end

participantgroup #lightgreen:0.5 ExternalServices
database MongoDB
participant S3
participant Blockchain
participant EmailService
end

User->User: scan QRCODE NO EVENTO\nlink com attr
User->Frontend: link puts frontend
User<-Frontend: request Geolocalization
User->Frontend: Login: input email\npassing link attr + Geolocalization + timestamp
Frontend->Frontend: validate/confirmar email
Frontend->Backend: validate email + metadata
Backend<->MongoDB: validate email
Backend->Backend: user not exit\ncreate new keypair
Backend->MongoDB: create new user\n(email, metadata, encryptedPrivateKey, publicKey)
Backend->EmailService: call to send completedRegisterLink to user email
EmailService->User: completedRegisterLink code in email
Backend->Frontend: ok
Frontend->User: complete register AFTER in your email link

User->User: click link email
User->Frontend: open register page from email\nwith event attr
Frontend->User: request data: name
User->Frontend: share data
Frontend->Backend: share data
Backend->MongoDB: update user data
Frontend->User: Show preview certificate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant