Refactor the marriage profile and assessment flow to use a new overview
endpoint, reducing the need to fetch full question schemas for the
initial list view.
- Implement `getFormOverview` and `useFormOverviewQuery` to fetch
high-level section metadata.
- Update `QuestionDetailClient` and `QuestionsListPage` to utilize
the overview data for rendering progress and section lists.
- Refactor `schema-adapter` to support mapping overview sections to
frontend `QuestionListItem` objects.
- Optimize proxy performance by adding TTFB metrics and improving
encoding support.
- Improve UI/UX with better overscroll behavior and viewport settings.
- Add unit and integration tests for the new schema adapter and
required steps component.
Refactor the application initialization and data fetching strategy to improve performance, reliability, and user experience, especially within the Flutter webview context.
Key changes:
- **Bootstrap & Initialization**: Implemented a `beforeInteractive` bootstrap script to handle locale correction and safe-area insets before the app becomes visible, reducing layout shift and flickering.
- **Locale Routing**: Enhanced the middleware proxy to prioritize authoritative cookie-based locales and improved `Accept-Language` header parsing to support complex device headers.
- **Assessment Progress**: Introduced a local assessment progress tracking mechanism that merges server-side completion data with local `localStorage` drafts, ensuring users don't lose progress during transitions.
- **Data Fetching**: Optimized React Query configurations by increasing `staleTime` and disabling aggressive refetching on window focus/mount to reduce unnecessary network overhead.
- **UI/UX Improvements**:
- Replaced `next/image` icon loading with an inline `UiIcon` component to eliminate per-icon network requests and ensure icons are available in the initial HTML.
- Implemented a Flutter-style skeleton shimmer animation using CSS transforms for smoother performance in the webview.
- Updated CSS variables to use `env(safe-area-inset-*)` for better mobile compatibility.
- **Refactoring**:
- Consolidated marriage-related data fetching into a unified `useFormSchemaQuery` pattern.
- Simplified component logic by removing redundant `silent-reloader` calls and manual cache-busting headers.
- Improved type safety for the Flutter bridge and window global objects.
- Adjusted the border radius of the InformationSheet component for a more modern look.
- Added new optional phone number fields for "Home Phone Number" and "Father's Phone Number" in English and Persian localization files.
- Introduced new SVG assets for various UI components.
- Created new components for handling phone number input and advisor actions.
- Implemented a FemaleConsentSheet component for user consent interactions.
- Added a terms page route and linked it to the main application.
- Adjusted dimensions of the image container in FindingMatchPage.
- Modified the submit path logic in Intro component to handle new case statuses.
- Changed button to link in NewMatchPage for profile viewing and added a locked profile indicator.
- Enhanced NewMatchProfilePage with mutation for responding to marriage cases and improved button states.
- Updated QuestionsListPage to change text size for optional info prompt.
- Refactored RequestAcceptedPage to include subscription handling and improved layout.
- Added SubscriptionRequiredSheet for subscription prompts and payment handling.
- Implemented useHabcoinPayment hook for managing Habcoin payments.
- Introduced new RequestSentPage for displaying request status.
- Added new SVG asset for request sent confirmation.
- Implemented `useMarriageProfileQuery` and `getMarriageProfile` for fetching main marriage profile data.
- Created `useMarriageSectionDataQuery` and `updateMarriageSectionData` for managing section data with query and mutation hooks.
- Added `useMarriageSectionsQuery` for retrieving available marriage sections.
feat: add temporary media upload hook
- Introduced `useUploadTmpMediaMutation` and `uploadTmpMedia` for handling temporary media uploads.
feat: implement internationalization support
- Added localization configuration and dictionaries for English and Persian languages.
- Created `I18nProvider` for managing locale and dictionary context.
- Implemented utility functions for locale management and path localization.
feat: define API communication layer
- Established an HTTP client using Axios with proxy path handling for API requests.
- Implemented `QuestionDetailPage` to display individual questions based on slug.
- Created `QuestionsListPage` to list all questions with navigation.
- Added various question components: `QuestionButton`, `QuestionDate`, `QuestionDropdown`, `QuestionFile`, `QuestionNumber`, `QuestionRadio`, `QuestionSlider`, and `QuestionText`.
- Introduced `BookingTermsCard` for displaying terms and conditions.
- Added SVG icon for play action.
- Integrated `InformationSheet` component for user guidance.
- Created mock data for questions and structured data handling in `question-data.ts`.
- Developed a utility to add data locators for easier debugging in development.