You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Answered Questions - Display questions with at least one answer.
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:
Submitting a question - Save user-submitted questions to the database.
Answering a question - Allow users to submit answers to existing questions.
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:
Question Submission Form: Allow users to submit a new question.
Answered and Unanswered Sections:
Display answered questions with their respective answers in the Answered section.
Display questions without answers in the Unanswered section.
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).
The text was updated successfully, but these errors were encountered:
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:
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:
Tasks
id
,title
,description
,userId
,createdAt
, andupdatedAt
.id
,questionId
,answerText
,userId
,createdAt
, andupdatedAt
.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:
Tasks
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
The text was updated successfully, but these errors were encountered: