Linkta-org / sandbox

Sandbox sprint repo for core functionality prototype
MIT License
3 stars 1 forks source link

Fullstack - Store User Input to Database #10

Closed ChTiSh closed 4 months ago

ChTiSh commented 4 months ago

Objective: Implement a user input functionality that saves data to a MongoDB database. (Find out if there is potential roadblocks/limits)

Ticket Scope:

Frontend: Have an input box allowing users to enter data on [promptInputPage.tsx]. - 1 hour Utilize React Query to handle data fetching and sending user input to the backend API. - 1 hour Backend: Develop an API endpoint to receive user input data along with user info - 3 hours Explore react-flow data structure and user schema for data storage. - 3 hours (Hardcoded Firebase-related data for testing)

Acceptance Citeria: AC1: Input Box Functionality

I should be able to type text into the input box.

AC2: Sending Input to Backend:

When I trigger the action to send the input (e.g., pressing a 'Submit' button), Then the text should be sent to the backend API using React Query.

AC3: Backend Receipt and Response

Given the backend API receives the input data, then return a response JSON(e.g., 200 OK).


AC4(Stretch Goal): Data Storage in MongoDB

The data should be correctly stored associated with the user in the database, so that user can retrieve their previous input Reference: Image Image