Add an Idea Board page allowing users to create and display ideas. Users should be able to input a title and a brief description for each idea. All submitted ideas should be displayed in a structured format and fetched from the database.
Requirements
Idea Creation:
- Button to Add Ideas:
- Add a button labeled "Add Idea" on the page to add a new idea.
- Idea Form:
- Upon clicking the "Add Idea" button, display a form/modal where users can enter:
- Title: A short, descriptive title for the idea.
- Description: A brief description detailing the idea (optional).
- Include a "Submit" button to save the new idea.
- Validate the form inputs to ensure both the title and description are appropriately filled out before submission.
Display Ideas:
- The idea board page should consist of multiple ideas that constantly get updated.
- All ideas need to display their:
- Implement using Cards for better visual representation.
Database Connection:
- Implement a connection to the database to store and retrieve ideas.
- Write SQl queries to create idea board table automatically
- Ideas Table:
id: Primary key (UUID).
title: VARCHAR for the idea title.
description: TEXT for the idea description.
created_at: TIMESTAMP for the submission date.
- Create Go structures for the idea board information fields.
- Create new API endpoints:
- POST /create_idea: To create a new idea and save it to the database.
- GET /get_ideas: To fetch all submitted ideas from the database for display.
- Fetch Ideas:
- When the idea board page loads, fetch existing ideas from the database and display them immediately.
- Implement proper error handling for fetching and creating ideas
Acceptance Criteria
- Users can click the "Add Idea" button to open the idea submission form.
- Users can successfully submit a title and description for their idea, which gets saved to the database.
- Upon loading the idea board page, all submitted ideas are fetched from the database and displayed immediately and persistently on the same page.
- Bonus: Ideas should be constantly updating through a dynamic animation.
Additional Notes
- Ensure proper error handling for both creating and fetching ideas from the database to maintain application stability.
Add an Idea Board page allowing users to create and display ideas. Users should be able to input a title and a brief description for each idea. All submitted ideas should be displayed in a structured format and fetched from the database.
Requirements
Idea Creation:
Display Ideas:
Database Connection:
id: Primary key (UUID).title: VARCHAR for the idea title.description: TEXT for the idea description.created_at: TIMESTAMP for the submission date.Acceptance Criteria
Additional Notes