gssocFAQ-Bot icon indicating copy to clipboard operation
gssocFAQ-Bot copied to clipboard

"Ask a Question" form on frontend to interact with the bot via /faq endpoint

Open Swasthiga-0618 opened this issue 1 year ago • 4 comments

Feature: Add a simple HTML form that lets users ask a question about GSSoC directly from the browser. This form should send a POST request to the /faq API endpoint and display the bot's answer below it.

Implementation:

  • Create a new file: public/index.html
  • Add:
    • An input box for the question
    • A submit button
    • A container to show the bot's response
  • Use JavaScript fetch() to POST the question to /faq and show the result.
  • Optional: Add some CSS styling.

Why:

  • Improves user experience
  • Allows interaction with the bot from a web interface (not just Telegram)
  • Great for contributors and non-technical users to test the bot

I would like to work on this issue as a first-time contributor! 💻

Swasthiga-0618 avatar Aug 04 '25 08:08 Swasthiga-0618

Checklist: Please confirm the following checks when submitting the pull request

It help us ensure the completeness of the project. (These checks are mandatory, your PR will be rejected if you fail even one of these) :

  • [ ] Attach Proof of Work - Include at least one screenshot or short video showing the implementation and changes made.
  • [ ] What problem you are solving, Explain Your Approach In your PR description
  • [ ] PR links to the issue (e.g., Closes #)

My Suggestion/Corrections:

  • This is a discord bot so there is actually no /faq endpoint . Those are simple commands and prefixes to use on discord.
  • You can modify the approach this way: Show suggestion as dropdown when ever user types. user select that que and get answers form file faqs.json
  • Study the codebase. I have a components.js file which have logic for the chat section. the questions and all animations are contained in views/index.js file.
  • You do not have to actually make new public/index.html. simply implement it on /views/index.html file section 2.

@Swasthiga-0618 I have assigned you the issue, You can start working.

piyushpatelcodes avatar Aug 04 '25 09:08 piyushpatelcodes

@piyushpatelcodes is this issue open to work as it will open for a lot of time I don't see any progress can I give it a try ?

VANSH3104 avatar Sep 24 '25 06:09 VANSH3104

@VANSH3104 Yes I have assigned you the issue and you can start working. Remember to follow above checklist

piyushpatelcodes avatar Sep 24 '25 07:09 piyushpatelcodes

Is someone currently working on this issue, can it be assigned to me under GSSOC'25

Taejaal avatar Oct 12 '25 17:10 Taejaal