Replace the heavy `google-libphonenumber` dependency with a custom,
ultra-lightweight (~3KB) mapping of country calling codes to reduce
bundle size.
- Remove `google-libphonenumber` and `react-icons` from dependencies
- Add `src/data/country-calling-codes.ts` for efficient lookup
- Update `src/lib/geo-region.ts` to use the new lookup utility
- Add font preloading for Faminela and YekanX in `src/app/layout.tsx` to
improve perceived performance
- Improve cookie parsing robustness in `auth-bridge` and add tests for
URI-encoded Persian text support
- Add new test suite for marriage cookie encoding/decoding strategies
Add support for forwarding `security-key` and `x-security-key` headers in the
proxy route. The proxy will now automatically inject a security key from
environment variables if it is not already present in the request headers.
Additionally, introduce new test API pages to facilitate debugging and
verifying API responses, including localized country name resolution and
proxy functionality.
- Add `security-key` and `x-security-key` to forwarded headers in proxy
- Implement automatic injection of security key in `src/app/api/proxy/route.ts`
- Add `src/app/[lang]/test-api/page.tsx` for comprehensive API testing
- Add `src/app/test-api/page.tsx` as a root-level redirect/wrapper for the
test API page
Extract geolocation detection and storage logic from `QuestionBirthplace`
and `QuestionPhone` into a new `geo-region.ts` library. This provides a
single source of truth for user region data, including city, country,
and phone calling codes.
- Create `src/lib/geo-region.ts` to manage GeoIP fetching, caching,
and subscription-based updates.
- Refactor `QuestionBirthplace` to use the new `getUserGeoRegion` utility
instead of inline fetch logic.
- Refactor `QuestionPhone` to use the unified storage and retrieval
mechanism for phone calling codes.
- Add unit tests in `ui-config.test.tsx` to verify auto-detection
behavior when `enable_geoip` is enabled.
Refactor the profile resolution flow to explicitly cache and redirect
to the `/intro` route when marriage profile basics are incomplete.
This ensures users are correctly routed to the onboarding sequence
via the entry route cache.
Additionally, adds optional chaining to `router.prefetch` calls to
prevent runtime errors and updates test suites to reflect the
newly cached `/intro` path behavior.