Commit Graph
100 Commits
Author SHA1 Message Date
hamed 2fd0eec156 fix: update Altcha component to properly set attributes and handle state changes 2026-07-10 14:55:12 +03:30
hamed 58a69e3345 fix: remove unused FA_STRINGS and update attribute setting for language in Altcha component 2026-07-10 11:57:15 +03:30
hamed 9a3e84cc85 fix: refactor Altcha component to properly handle custom element registration and attribute setting 2026-07-10 11:42:26 +03:30
hamed 778876b1f7 Refactor code structure for improved readability and maintainability 2026-07-10 11:27:17 +03:30
hamed ab2ab0dea2 feat: enhance domain handling for global representatives
- Updated `getStateInfo` to fetch site context for domains not in city.json, returning `repContext` with representative details.
- Implemented caching for site context requests to optimize performance.
- Modified doctor and clinic listing pages to pass the `domain` parameter when fetching data for global representatives.
- Adjusted metadata generation in layout and pages to reflect representative branding based on `repContext`.
- Added documentation for the new functionality in `.claude/prompt/global-rep-domain-site.md`.
2026-07-09 07:34:09 +03:30
hamed a56b7e8de5 fix: update handleChange to use optional chaining and add "use client" directive in Connect component 2026-07-08 18:24:33 +03:30
hamed ee47b535d8 Add empty AST cache file for version 0.8.44 with non-object root data 2026-07-08 17:38:32 +03:30
hamed 082f54cf4d fix: update contact information and WhatsApp numbers in city.json 2026-07-08 12:25:56 +03:30
hamed 92b8f474c1 Add SEO fields to city.json for local branding optimization
- Introduced a new `title` field for each city record, incorporating local brand names.
- Rewrote `slogan` for each city to reflect startup tone and include city keywords.
- Optimized `keywords` with relevant local and long-tail search terms.
- Ensured compliance with SEO best practices and maintained JSON structure.
2026-07-08 11:57:31 +03:30
hamed 156d97ac03 fix: streamline className formatting in LayoutRegister and LogInPage components 2026-07-08 00:05:46 +03:30
hamed a4e4228dc1 fix: update removeToken function to handle cookie removal with domain options 2026-07-07 23:52:50 +03:30
hamed 73c10f53ec fix: handle undefined slug and doctorId in cache functions 2026-07-07 11:47:44 +03:30
hamed df7fbb7530 Refactor code structure for improved readability and maintainability 2026-07-06 15:10:19 +03:30
hamedandClaude Fable 5 beb050aee2 fix(docker): force devDependencies in deps stage (--include=dev)
Coolify injects NODE_ENV=production / npm omit=dev at build time, which
made 'npm ci' skip devDependencies. babel-plugin-react-compiler is a
devDependency and Next 16's reactCompiler:true requires resolving it, so
the build failed with:
  Failed to resolve package babel-plugin-react-compiler ...
  React compiler is enabled in next.config.js.

Reproduced locally with npm_config_omit=dev (react-compiler MISSING with
plain npm ci, PRESENT with --include=dev). --include=dev overrides the
platform's omit config so all build-time devDeps are installed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:31:46 +03:30
hamedandClaude Fable 5 2fbd24b4aa chore: remove unused NEXT_PUBLIC_CLIENT_ID/SECRET env vars
The OAuth flow uses grant_type=mobile with a server-issued grant
(app/api/auth/token/route.js); no client_id/client_secret is sent at
runtime. These vars were dead — removed from Dockerfile args/env,
docker-compose, nixpacks, and docs. Also silences the Coolify
'variable not set' build warnings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:09:19 +03:30
hamedandClaude Fable 5 ab1102ec1c chore(docker): update Dockerfile for Next 16, drop duplicate lowercase dockerfile
- update stage comments to Next 16; note Turbopack default build
- npm ci --no-audit --no-fund for faster reproducible install
- add HEALTHCHECK (referenced by docker-compose, previously missing)
- parametrize node version via ARG NODE_VERSION
- remove duplicate case-variant 'dockerfile' (collided with 'Dockerfile'
  on case-insensitive FS, would be two files on Linux/Coolify)

Verified: docker build + run, all routes 200, multi-domain Host routing,
canonical in <head>, container healthcheck reports healthy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 10:37:54 +03:30
hamedandClaude Fable 5 3d861c1f2d Merge branch 'upgrade/next-16': upgrade Next.js 15->16, React 18->19
- next 15.5.7 -> 16.2.10, react 18.3.1 -> 19.2.7
- middleware.js -> proxy.js (Next 16 convention)
- next lint -> eslint@9 flat config
- enable React Compiler (Turbopack built-in babel)
- cacheComponents evaluated and left disabled (multi-domain headers() incompatibility)

Build, 69 vitest tests, and production smoke test all pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 10:21:37 +03:30
hamed e8e3d7bfd8 Add cache index and graph files for improved data handling
- Created stat-index.json to store metadata for various data files, including size, modification time, and hash.
- Added graph.html and graph.json files to the graphify-out directory for enhanced graph representation.
2026-07-06 10:12:59 +03:30
hamedandClaude Fable 5 1d2ad48138 docs: document why cacheComponents stays disabled
Enabling cacheComponents fails the build (/_not-found: uncached data
outside <Suspense>) because the multi-domain layout reads headers()
(host) in layout + generateMetadata. Safe adoption would need broad
Suspense boundaries and risks cross-domain city content leakage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 10:05:24 +03:30
hamedandClaude Fable 5 08dd9e408b feat: enable React Compiler on Next 16
Auto-memoization via babel-plugin-react-compiler (stable in Next 16),
compiled through Turbopack's built-in babel. Build and test suite pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 10:02:58 +03:30
hamedandClaude Fable 5 374a9d5350 chore: replace removed next lint with eslint flat config
- next lint removed in Next 16; add eslint@9 + eslint-config-next@16
- flat config imports eslint-config-next/core-web-vitals directly
- add typescript devDep (required by eslint-config-next@16)
- demote high-frequency pre-existing rule violations to warn

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:57:30 +03:30
hamedandClaude Fable 5 4df9439087 refactor: rename middleware to proxy for Next 16
Next 16 deprecates the middleware file convention; a leftover
middleware.js is silently ignored, which would break the x-pathname
header that canonical URL generation depends on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:57:30 +03:30
hamedandClaude Fable 5 29e938afcb chore: upgrade Next.js to 16, React to 19
- next 15.5.7 -> 16.2.10 (latest stable)
- react/react-dom 18.3.1 -> 19.2.7
- @next/third-parties -> 16.2.10
- remove React 18 pin from overrides (MUI 5.18 / x-7.29 support React 19)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:48:50 +03:30
hamed a9fcfea12a Refactor code structure for improved readability and maintainability 2026-07-06 09:35:17 +03:30
hamed f6475d1a7d feat: improve error handling in API calls for blog, clinic, and doctor data retrieval 2026-07-05 15:56:30 +03:30
hamed b04bb45ca1 Implement multi-domain SEO improvements:
- Add metadata to login and login-verify pages to prevent indexing.
- Update robots.txt to disallow additional sensitive paths.
- Enhance sitemap generation to filter by city and include accurate last modified dates.
- Refactor canonical URL generation to support multi-domain architecture, ensuring self-canonicalization for city domains.
- Remove deprecated CanonicalHandler component and streamline canonical URL handling.
- Introduce safe JSON-LD output to prevent XSS vulnerabilities.
- Add payment layout with appropriate metadata to prevent indexing.
- Conduct a comprehensive technical SEO audit and implement necessary fixes across the application.
2026-07-05 15:47:47 +03:30
hamed 522caf6b1b feat: implement PosterLight component and enhance SiteLogo functionality for improved poster rendering 2026-07-04 23:02:20 +03:30
hamed 39c09bfcd5 feat: integrate html-to-image library for enhanced image generation and QR code rendering 2026-07-04 22:39:33 +03:30
hamed 3c019932bd feat: redesign doctor sharing poster layout and enhance download functionality with dynamic file naming 2026-07-04 22:25:49 +03:30
hamed 199c843b08 feat: enhance poster download functionality by ensuring images load before PDF generation and adding QR readiness check 2026-07-04 21:50:57 +03:30
hamed 3344a2f77a Implement feature X to enhance user experience and optimize performance 2026-07-04 21:17:25 +03:30
hamed 97cc4fdc69 feat: add domain parameter to sendCode for OTP requests to include city site name 2026-07-04 11:01:56 +03:30
hamed 41f7739726 Implement feature X to enhance user experience and optimize performance 2026-07-03 12:42:12 +03:30
hamed 3fdd8b3e8b fix: update site_name for city record to remove redundancy 2026-07-03 12:35:30 +03:30
hamed aa75fb858f feat: replace PNG logo with SVG and add new icon SVG files 2026-07-03 12:06:11 +03:30
hamed e00db96150 chore: remove unused icon.png file 2026-07-03 12:06:06 +03:30
hamed c879c21163 feat: add education and progress detail data files 2026-07-03 11:47:05 +03:30
hamed 3336826884 Remove obsolete data files related to education, health profile, progress details, specialties, and turns 2026-07-03 11:37:42 +03:30
hamed a5c15c54a1 Refactor code structure for improved readability and maintainability 2026-07-03 11:13:59 +03:30
hamed 7694ca85a5 chore: remove unused favicon.ico file 2026-07-03 11:13:55 +03:30
hamed f5e06cfc13 fix: correct spelling of 'canceled' in payment status across components 2026-07-03 10:56:04 +03:30
hamed 90d4a871f5 feat: enhance payment flow with automatic redirection to appointment history after successful payment 2026-07-03 10:45:35 +03:30
hamed 5bec4848a2 feat: unify currency display to toman across the application 2026-07-03 10:31:16 +03:30
hamed 79f7df2e4d feat: implement root domain handling for nobat724.com to prevent city filtering 2026-07-02 21:53:45 +03:30
hamed e6b55c6bad feat: refactor payment handling to use direct backend redirect instead of API call 2026-07-02 17:08:52 +03:30
hamed e83a666adb feat: enhance payment flow with dynamic URL handling and improved error messaging 2026-07-02 15:36:09 +03:30
hamed 9e67ce4872 feat: update payment gateway selection to use active gateways from backend config 2026-07-02 12:19:44 +03:30
hamed e5c9e2a312 feat: conditionally render experience text based on doctor's experience value 2026-07-02 11:48:33 +03:30
hamed 9e5da8f19e feat: update QueryForDoctorsReq and buildDoctorParams to use *_id for specialty, city, and state 2026-07-02 11:13:18 +03:30
hamed e6158cfe84 feat: update ContentLogin to use async getStateInfo and add site_name to city data 2026-07-02 10:01:59 +03:30
hamed 1b76c3846b feat: update cookie domain setting to be dynamic based on hostname 2026-07-01 23:55:40 +03:30
hamed 430cac6b4c feat: remove city data for گچساران from city.json 2026-07-01 11:48:35 +03:30
hamed 4252df21f7 Add specialties data in JSON format for medical fields 2026-06-30 21:51:08 +03:30
hamed ee1192b5b9 feat: prepare nobat724_front for deployment on Liara platform
- Added Node.js engine requirement in package.json to ensure compatibility.
- Created liara-deploy.md for deployment instructions and environment setup.
- Added example environment variables in .env.liara.example for clarity.
- Introduced .liaraignore to exclude unnecessary files from deployment.
- Created liara.json for Liara configuration, including health check settings.
- Removed redundant next.config.mjs file to prevent configuration conflicts.
2026-06-30 14:48:21 +03:30
hamed c316d22160 feat: add testing setup with Vitest and Testing Library
- Updated package.json to include Vitest and Testing Library dependencies and scripts for testing.
- Created a test suite for the ProvinceProvider context to validate cityId and province detection based on subdomains.
- Implemented unit tests for utility functions in helper/index.js, including phone number formatting and validation.
- Added tests for state information retrieval in lib/getStateInfo.js, ensuring correct city and state matching based on subdomains.
- Developed tests for appointment slot adaptation and availability checks in lib/appointmentSlots.js.
- Created tests for token storage functionality in lib/tokenStore.js.
- Implemented sanitization and JSON parsing tests in lib/sanitize.js.
- Added CASL ability tests in lib/ability.js to verify user access rights.
- Created tests for cookie management in lib/refreshCookie.js.
- Developed tests for patient user representation in lib/representationAdapters.js.
- Implemented client-side state information retrieval tests in lib/getStateInfoClient.js.
- Created tests for canonical URL generation in lib/getCanonicalUrl.js.
- Developed tests for clinic API service functions in services/clinicApi.js.
- Added request wrapper tests in services/response.js to ensure correct API interaction.
- Set up Vitest configuration in vitest.config.mjs for JSX support and alias resolution.
- Created setup and utility files for testing environment in test/setup.js and test/utils.jsx.
2026-06-28 23:25:46 +03:30
hamed de9e6b7678 feat(api): add adaptation for backend-audit changes and update comment pagination 2026-06-28 22:04:54 +03:30
hamedandClaude Opus 4.8 82700a60c1 refactor(docker): Next.js 15 standalone multi-stage build for Coolify
- multi-stage (base/deps/builder/runner) per the official Next.js example
- npm ci against the lockfile instead of npm i --force
- NEXT_PUBLIC_* and DEV_MODE passed as build args (inlined at build time)
- standalone output, smaller runtime image

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 16:01:53 +03:30
hamed ac15552cc1 refactor(docker): update Dockerfile for Next.js 15 and improve environment variable handling 2026-06-25 20:59:33 +03:30
hamed 09373c46d6 fix(config): update hostname for API and add Google Analytics endpoints to CSP 2026-06-25 20:52:09 +03:30
hamed f87110c277 refactor: remove unused components and files related to date filtering and doctor search
- Deleted Date.js and FilterDate.js components as they are no longer needed.
- Removed SearchDoctor.js component which was responsible for searching doctors.
- Cleaned up the Head component by removing references to the deleted Date and SearchDoctor components.
- Removed TurnsPage component and its associated List component, which were not utilized.
- Deleted Cards and Table components from the list directory as they were not in use.
- Removed user account related components including Tab, Head, and Form components.
- Cleaned up bank account components including List, Item, and modal components.
- Removed representation adapters and related functions that were not in use.
2026-06-25 18:14:27 +03:30
hamed 537f3e47d5 fix(payment): update currency display from تومان to ریال and adjust amount formatting 2026-06-24 20:39:34 +03:30
hamed cc6b42c1a5 feat(appointment): add city_id to appointment payload and update ProvinceProvider for city context 2026-06-24 19:56:04 +03:30
hamed ce07b4d1b1 fix(appointment): ensure national code and gender are mandatory for both self and others in SubmitData component 2026-06-24 12:33:00 +03:30
hamed 57e341b7b3 fix(appointment): improve error handling and validation for national code in SubmitData component 2026-06-24 12:16:22 +03:30
hamed a83e352dd8 fix(appointment): update display logic for inactive doctors and free turns 2026-06-22 09:47:11 +03:30
hamed 12d2e2e3f1 fix(logo): add aria-labels and improve accessibility features in Logo component
fix(progress): enhance accessibility by adding aria-label to LinearProgress component
fix(share): add aria-label for better accessibility in Share button
fix(title): change h3 to h2 for semantic correctness and add aria-labels for links
fix(qrimg): add alt text for QR code image for improved accessibility
fix(buttonmenu): add aria-label for mobile menu button to enhance accessibility
2026-06-21 17:47:23 +03:30
hamed f668d1b0a7 feat(share): enhance sharing functionality with social media integration and link copying 2026-06-21 17:42:07 +03:30
hamed 03eb483486 fix(tags): update tag fetching logic and improve tag handling in Title component 2026-06-21 17:34:12 +03:30
hamed 1841a16b4d fix(logo): update city name display logic for improved localization 2026-06-21 17:10:21 +03:30
hamed bb559df1a9 fix(metadata): enhance title generation for better SEO and user context 2026-06-21 17:05:48 +03:30
hamed 35e8b65342 fix(accessibility): add aria-labels for improved screen reader support 2026-06-21 17:00:23 +03:30
hamed cbae19d270 feat(doctors): add loading state management and pass filter to sendReq 2026-06-21 16:24:09 +03:30
hamed cb13ba3f45 fix(doctors): improve filter performance and resolve modal closing issues 2026-06-21 15:47:37 +03:30
hamed 2fc74a664e Refactor state data structure: replace string IDs with integers, add UUIDs, status, and weight attributes for each state 2026-06-21 15:37:19 +03:30
hamed e0d729dcf1 fix(api): ensure token is refreshed if not available during request 2026-06-21 13:47:07 +03:30
hamed 609479919a fix(verification): remove hardcoded prefix from phone number in confirmation message 2026-06-21 13:35:05 +03:30
hamed 9dd71ab2f5 feat(clinic): enhance generateMetadata and JSON-LD for comprehensive clinic schema 2026-06-21 13:26:49 +03:30
hamed 8e7d10c859 feat(specialties): enhance specialties components to include city and state names in metadata and links 2026-06-21 13:03:50 +03:30
hamed cb9d9beaab feat(sitemap): refactor sitemap generation to include doctors, clinics, and blogs with improved URL handling 2026-06-21 12:52:41 +03:30
hamed a8c3a57114 feat(doctor): enhance doctor schema with addresses, ratings, and social media links
feat(robots): update disallow rules to include '/panel'
feat(sitemap): implement separate sitemaps for doctors, clinics, and blogs
feat(icons): add social media icons for doctor profiles
2026-06-21 12:35:15 +03:30
hamed 93b2710ae1 feat(doctor-avatar): enhance DoctorAvatar component with initials formatting and integrate into ItemAppointment 2026-06-21 12:07:14 +03:30
hamed 7462e69641 feat(doctor): enhance doctor page with specialty links and dynamic breadcrumb 2026-06-21 11:55:36 +03:30
hamed 704a514542 feat(loading): enhance loading components with responsive design and improved skeletons 2026-06-21 11:49:30 +03:30
hamed 06a877a725 feat(metadata): enhance SEO by adding Open Graph and Twitter metadata across various pages
feat(blog): implement loading and error handling components for blog pages

feat(clinic): add loading and error handling components for clinic pages

feat(doctor): create loading and error handling components for doctor pages

feat(clinics): add loading component for clinics page

feat(specialties): improve metadata for specialties page with Open Graph and Twitter images

feat(layout): add structured data for Organization and WebSite in layout

fix(middleware): restrict middleware execution to specific routes to improve performance

chore(audit): add comprehensive SEO and performance audit documentation
2026-06-21 11:38:39 +03:30
hamed 6ec2f5a069 feat(avatar): create DoctorAvatar component for improved doctor image handling 2026-06-21 11:17:34 +03:30
hamed 6e1550c610 feat(next.config): add http://clinic-pro.ddev.site to connect-src for improved API access 2026-06-20 13:55:46 +03:30
hamed 00e9ab5cf8 feat(footer): implement dynamic social media URLs in footer component 2026-06-20 13:53:02 +03:30
hamed 194ffd889c feat: enhance security by implementing HttpOnly refresh tokens and in-memory access token management
- Added isomorphic-dompurify for improved XSS protection
- Refactored token storage to use in-memory management for access tokens
- Implemented server-side route handlers for OAuth token management
- Introduced security headers in next.config.js
- Removed client-side exposure of client_secret and sensitive tokens
- Updated API interceptors to handle token refresh logic
- Cleaned up cookie management for refresh tokens
2026-06-20 13:10:17 +03:30
hamed a19058d9a2 feat(userAccount): add validation for Iranian national code and update input handling 2026-06-19 11:23:01 +03:30
hamed da05a4e13c feat(userAccount): improve user profile handling with avatar upload and dynamic display name 2026-06-19 11:05:43 +03:30
hamed ea2c0c29ec feat(userAccount): enhance user profile handling with avatar upload and additional user data 2026-06-19 10:19:52 +03:30
hamed f6a3082ac8 feat(clinic): simplify image rendering logic and improve layout handling in List component 2026-06-19 01:18:28 +03:30
hamed 8b23f1f831 feat(aboutUs): enhance Head component with siteName and slogan props; update Services content formatting 2026-06-19 00:39:02 +03:30
hamed e9136ea42b feat(blog): enhance blog data handling with normalization and improved image management 2026-06-19 00:35:11 +03:30
hamed 4dca516598 feat(clinic): enhance doctor data handling with improved pagination and default values 2026-06-18 19:16:52 +03:30
hamed fdb5866562 feat(clinic): improve image handling and map integration in clinic components 2026-06-18 15:21:19 +03:30
hamed ecb77fcfa8 feat(clinic): enhance clinic details display with improved logo handling and address formatting 2026-06-18 15:03:31 +03:30
hamedandClaude Opus 4.8 344285dce5 feat(specialties): show per-city doctor count on /specialties
Fetch active specialties with number_of_doctors from
GET /api/v1/specialties/doctor-counts (scoped to the current city via
matchedCity.id) instead of the static specialties.json, so each specialty
card shows the real doctor count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 22:27:39 +03:30
hamedandClaude Opus 4.8 69e591f03e fix(dashboard): appointment detail fields + sidebar hydration
- Appointment detail (DetailLg/DetailSm) read the real response shape:
  date/time from slot_start, specialty from doctor.specialties[0].name,
  phone from address.telephone.
- Sidebar Head reads userInfo (cookie) after mount to avoid an SSR/client
  hydration mismatch on the user's name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 12:01:43 +03:30
hamedandClaude Opus 4.8 bdf453a3ab feat(dashboard): stepwise Jalali birthday picker + correct send direction
- JalaliDatePicker gains an opt-in `stepwise` mode (year → month → day): the
  year step is a scrollable list from the current Jalali year down to 1332,
  used by the birthday field. Default-off so appointment/panel pickers keep
  the month-grid behavior. Parse incoming Jalali string values safely
  (fixes NaN keys).
- Birthday create path now converts Jalali→Unix on send (changeDateType true),
  matching the update path and the Unix-based backend contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:42:45 +03:30