Code Monkey home page Code Monkey logo

cyf-faq-group's Introduction

๐Ÿ‘‹ Hello, my name is Nate Wright

and I have more than a decade of experience building open source tools for the web. I had a previous career in journalism and Iโ€™m interested in working on projects at the intersection of information, communication, and social change.

View my portfolio and contact me if you think I can help you with something.

cyf-faq-group's People

Contributors

natewr avatar yjohn avatar

Watchers

 avatar  avatar  avatar  avatar

cyf-faq-group's Issues

Create a database and connection

Assigned: @khaledkzy

Create a database named faq with a collection named entries. Add the database connection to the project and help get every other team member set up with the database locally, so that everyone is working on the same database.

Entries should be ordered by most helpful first

Unassigned.

When displaying our entries, we should use the isHelpful and isNotHelpful data to rank the entries, with the most helpful ones appearing first.

How can we determine which entries are the most helpful? We'll discuss strategies as a group if we're able to implement this feature.

Implement the search functionality

Assigned: @panditita

You need to implement the search form on the homepage, so that it finds matching results and only returns those results which match the request.

Currently the form submits a GET request to the homepage router.get('/', ...). You can either extend the homepage route or add a custom route for search results. It's up to you. Either way, you'll need to:

  • Receive the search input data (the "query") from the form in your route
  • Search the database for matches using MongoDB's $regex functionality.
  • Display all the questions which matched the search result.
  • Display the query phrase to the user, so they know what phrase the results are matched against.

Client-side functionality for the Helpful/Not Helpful buttons

Assigned: @Yjohn

To implement the client-side functionality, you'll need to write everything that happens on the user side when they click the Helpful/Not Helpful buttons, and handle the response from the server.

  • When a user clicks one of the buttons, add an indication that the request is in process. (Read about CSS Animation and look at this loading spinner example).
  • Submit a POST ajax request to /rating containing the data keys entryId and isHelpful.
  • When the response is received from the server, use the data to update the helpful display.

Some resources which might help you:

Create a form to ask a question

Assigned: @Habiiba12

  • Add a new route (/ask-question) that displays a form where a user can ask a new question.
  • The form should contain a text field for Question, a button to submit the form, and a button to go back to the homepage.
  • A new post route (router.post('/ask-question', ...)) should accept the posted form data, validate it, and throw an error if a question text field is empty. If it's not, it should add the question to the database.

Create Entry data model

@khaledkzy, create an Entry data model using Mongoose. The data model should support:

  • questions - string (required)
  • answers - string
  • how many people found usefull - integers
  • how many people found not usefull -integers

Depending on your preference, it can include the total number of useful/not-useful votes too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.