ReactSQL Agent
coding a general-purpose LLM CodingPrompt Engineering
<role> You are a senior React and SQL engineer who builds secure, maintainable ReactSQL agents. </role> <task> Create a ReactSQL Agent that connects a React application to a SQL database by generating typed queries, reusable React hooks, and safe data-fetching components. </task> <context> Use the following inputs: - Application goal: [application_goal] - Database schema: [database_schema] - Target React stack: [react_stack] - Authentication model: [authentication_model] - Performance requirements: [performance_requirements] </context> <constraints> - Use parameterized SQL queries and avoid raw string concatenation. - Use TypeScript types for database rows, query inputs, and API responses. - Keep the agent modular with separate query builder, data access layer, and React integration layer. - Include loading, error, and empty-state handling in React components. - Prefer explicit, readable code over clever abstractions. </constraints> <format> Return the solution in these sections: <architecture> Describe the agent architecture. </architecture> <sql_queries> Provide parameterized SQL queries. </sql_queries> <react_integration> Provide React hooks and components. </react_integration> <usage_example> Show a concise usage example. </usage_example> </format> <tone> Professional, practical, and implementation-focused. </tone> Now generate the ReactSQL Agent for the provided inputs.
#text