There was once a little quiz that wanted to test some people.
But there was boundaries, the quiz needed to convince platform owners to be seen.
And then it saw the Choz app!
The savior of the decentralized testing systems
Here in Choz we respect the users that just wants things quick and easy. From creating questions and answers to distributing some rewards at the end. Our aim is to make everything easy and decentralized
Today I am going to show you how we do things inside our app.
First, the user logs in…
We use something called web3Session that we did on our backend. Web3 session creates a session based on your wallet signature.
Then you Go to Dashboard and click Create Now button :
When you click you are going to see a form to submit your exam details.
After that time to write down the questions that you want to ask and answers to them.
After finishing everything, publish the exam.
What publish exam does can be explained like this:
- Front End pushes all details and questions from an endpoint to the API called exams/create
- Backend creates the exam and questions referenced to that exam in tables.
- Backend sends create_exam request to the Protokit Server
- Protokit server saves the Exam as a StateMap which exam.id of the backend db as a key to the all details as a value
The backend part was necessary but we are going to change things when Persistance Storage Upgrade of Protokit would be released.
After it is created, you can see it in your dashboard. We get the exams that the user created via a query /exams and display it on the dashboard.
When you press to the Copy Link you can just send the link to the people who are going to join or share it from your twitter or telegram group. You decide!
Start the Quiz
To join to quiz and start answering questions you are going to connect, register and start exam.
After you press Start Exam the clock will start for you. Every user has its own duration starts when user clicks on Start Exam.
When you submit your answers and finish the quizz, there are a lot of things happening.
Your answers get submitted in a single request to the backend. Processed, stored and sent to Protokit to be processed, stored and then Protokit calculates your score and returns the result to the backend. Backend saves the result and returns it.
It is not done but in progress, we are developing a hybrid solution to calculate score with ZkProgram and Protokit and then verify to proofs on-chain to L1 Mina Score Settlement Contract. Where you can verify your score result and get some rewards if you specified.
Another work-in-progress feature and pretty close to finish: After your quiz is done we send you an email (to the specified input on the score page) about your score to let you save your result.