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

FAQ Forum with Answer Submission #405

Open
ShivanshPlays opened this issue Nov 7, 2024 · 2 comments
Open

FAQ Forum with Answer Submission #405

ShivanshPlays opened this issue Nov 7, 2024 · 2 comments

Comments

@ShivanshPlays
Copy link
Contributor

Feature: FAQ Forum with Answer Submission

Overview

This feature aims to create a FAQ forum where users can submit questions, view previously asked questions, and submit answers to others' questions. Submitted questions are stored in the database, and answers are associated with them. The forum will have two sections:

  1. Answered Questions - Display questions with at least one answer.
  2. Unanswered Questions - Display questions that have not yet received answers.

The feature will be implemented in two separate PRs to ensure clear division between backend and frontend contributions.


PR 1: Backend and API Endpoints

Description

Create API endpoints to handle:

  1. Submitting a question - Save user-submitted questions to the database.
  2. Answering a question - Allow users to submit answers to existing questions.
  3. Fetching questions:
    • Answered questions: Questions with at least one answer.
    • Unanswered questions: Questions without any answers.

Tasks

  • Define a Question model in the database with fields for id, title, description, userId, createdAt, and updatedAt.
  • Define an Answer model with fields for id, questionId, answerText, userId, createdAt, and updatedAt.
  • Implement API routes:
    • POST /api/faq/questions - To create a new question.
    • POST /api/faq/answers - To submit an answer to a question.
    • GET /api/faq/questions/answered - To fetch answered questions.
    • GET /api/faq/questions/unanswered - To fetch unanswered questions.

Expected Outcome

This PR will enable data storage and retrieval of questions and answers, preparing the foundation for frontend integration.


PR 2: Frontend Implementation

Description

Create the frontend UI to display and interact with the FAQ forum:

  1. Question Submission Form: Allow users to submit a new question.
  2. Answered and Unanswered Sections:
    • Display answered questions with their respective answers in the Answered section.
    • Display questions without answers in the Unanswered section.
  3. Answer Form: Allow users to answer questions in the Unanswered section.

Tasks

  • Build a Question Submission Form for users to add new questions.
  • Create a Two-Section Layout:
    • Answered Section: Display answered questions and their associated answers.
    • Unanswered Section: Display unanswered questions with an option to answer.
  • Fetch data from the backend using the API endpoints created in PR 1.
  • Implement form handling and state management for answering questions.

Expected Outcome

This PR will provide a user interface to interact with the FAQ forum, enabling question submission and viewing/answering of questions based on their answered status.


Notes

  • Each PR is expected to have its own testing and documentation.
  • Ensure API validation and error handling in the backend and user feedback on the frontend (e.g., success/failure messages).
@Anuj3553
Copy link
Collaborator

Anuj3553 commented Nov 7, 2024

Give me the working video of this @ShivanshPlays

@Harish2908-bot
Copy link

Can you please assign me

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

3 participants