Skip to content

🚀 Refactor: Zod + Typed Query Hook Integration Across Core Modules #294

@mahid797

Description

@mahid797

This parent issue tracks the gradual integration of Zod validation, React Hook Form, and strongly typed TanStack Query hooks across the major functional areas of the application.
The goal is to ensure form consistency, type safety, and scalability by unifying validation and data fetching logic across both the frontend and backend.


📦 Scope

This refactor covers the following feature areas:

  • Profile & Contacts
  • Documents Module
  • Document Details (Analytics & Links)
  • Public Document Access

Each area includes both form validation (Zod + RHF) and data interactions (typed useQuery / useMutation hooks).
The work will be split across separate issues, but share common goals and reusable patterns.


✅ Sub-Issues


🧪 Testing & Review

Each refactor should be manually tested for:

  • Error states and validation edge cases
  • Success flows with valid data
  • Type inference and hook usage
  • Toast notifications and disabled state behavior

📌 Notes

  • Shared schemas should live in shared/validation/
  • All query/mutation hooks should reside in hooks/[feature]/
  • This refactor lays the foundation for future dynamic form builders and admin configuration tools

Sub-issues

Metadata

Metadata

Assignees

Labels

BackendBackend Related IssueCoreWork to do on the core system of the AppFrontendFrontend Related Issue🌱Nice-to-HaveEnhancements, Refactors, UI tweaks, or non-critical optimizations

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions