Project

General

Profile

dev #1999

Updated by Ayat Rahman about 1 year ago

#### **Description:**   
 Design database schemas using Drizzle ORM for Tools, Categories, Tags, Target Users, Develop API endpoints to fetch specific and Pricing Plans. Define relationships all tool information from the database.   

 #### **Tasks:**   

 1. **Implement GET /api/tools/:id Route:**   
    - Retrieve tool data by `tool_id`.   
    - Return complete information, including all related data (e.g., Tools to Categories), indexes tags, categories).   

 2. **Implement GET /api/tools Route:**   
    - Fetch all AI tools with pagination and sorting options.   
    - Apply optional filters (e.g., toolName), category, tag, approval status).   

 3. **Error Handling:**   
    - Return 404 if the `tool_id` is not found.   
    - Handle invalid inputs and constraints (e.g., unique toolName). Generate migration scripts for PostgreSQL/MySQL.  
 edge cases gracefully.   

 #### **Acceptance Criteria:**   

 - [ ] Specific tool data is returned accurately via `/api/tools/:id`.   
 - [ ] All tools can be fetched with `/api/tools`, including optional filters.   
 - [ ] Pagination, sorting, and filtering are fully functional.   

Back