Development of Utopian Reviews

in #utopian-io6 years ago

Repository

https://github.com/utopian-io/review.utopian.io

New Projects

  • What is the project about?

This project was made to make Utopian reviews easy by providing a questionnaire and to maintain the transparency of the review it generates a result of the questionnaire for the contributors to check out.

One of the interesting parts was to not use a database for storing the answers to the questionnaire and allow users to know the answers to it without it.

For it, I made a route which can generate a reviews answer page based on the URL.

router.get('/result/:cat/:num', function (req, res, next) {
  let category = req.params.cat;
  let ans = req.params.num;
  if(category < 0 || category > 11)
    res.render('error')
  cat = questionnaire[category];
  let object= [];
  for (var i = 0; i < cat.length; i++) {
    obj = {};
    obj.question = cat[i].question;
    obj.answer = cat[i].answers[ans.charAt(i)]
    object.push(obj)
  }
  console.log(object);
  res.render('result', {object: object})
})

This route handles the URL and makes a result object and passes to template.

That result object is server side rendered and sent to browser.

Some screenshots of the webapp are attached below -

Home Page

Screenshot from 2018-05-20 21-01-41.png

Auto Generated Comment

Screenshot from 2018-05-20 21-02-11.png

Reviews Result Page

Screenshot from 2018-05-20 21-02-45.png

Technology Stack

If any app can be made in JS it will always be made in JS :P

  • NodeJS
  • ExpressJS
  • EJS

How to contribute?

I am not sure about the future plans of this project but I just turn to add features to it as mods and CMs may ask me to do so ;)

GitHub Account

https://github.com/ms10398

Sort:  

You did a great work ms10398. This will have a great impact in using Utopian. I am proud to have people like you. Congraturation and keep it up

Great code of course, very useful in our day to day tasks as moderators.

I would love to see a bunch more commit messages and code comments.

Your contribution has been evaluated according to Utopian rules and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post,Click here


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Yes I know commit messages and comments are really part of development.

But in the heat of the moment I just flew away with my keyboard and didnt took care of commit messages and code comments.

Thanks for the remark I will surely try to follow the best practices as much as I can from now onwards.

Hey @ms10398
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

As this segment is giving a healthy amount of money so it's really important to review properly before publishing any content. It's a great work you did. Best wishes.

You did a coded job. Keep it up.

congratulations, great code, but over to my head

Coin Marketplace

STEEM 0.32
TRX 0.11
JST 0.034
BTC 66384.36
ETH 3272.25
USDT 1.00
SBD 4.27