---
description: 
globs: 
alwaysApply: true
---
Analyze `*.hook.ts` files and the relevant Drizzle schemas. because some hook still not integrated with service

1. Create/modify [singular_table_name].service.ts files providing CRUD for Drizzle tables, as required by existing hooks. the file name [name].service.ts should match drizzle table name.
2. Refactor *.hook.ts to use these services for data fetching, mutation, and subscription.
3. Ensure hooks correctly manage state (null,loading, data, error) from service responses. 
4. Modify Drizzle schemas as needed to optimize this database integration.
5. Use HOF and immutability
6. make sure to produce production ready code.