2.8 KiB
2.8 KiB
Feature Specification: Audit Bug Fixes & Codebase Hardening
Overview
- Feature ID: 001-fix-audit-bugs
- Branch:
develop - Scope: Frontend codebase (
parsaaghayi-front) - Author: Hermes Agent
Problem Statement
The comprehensive audit of parsaaghayi.ir revealed several technical and UI/UX issues:
- SVG image rendering fails when optimized by Next.js due to missing
contentDispositionType: 'inline'. package.jsoncontains an outdated, hardcoded Windows-specificdevscript containing developer local filesystem paths.- The contact form suffers from language inconsistencies (English headings with hardcoded Persian fields and validation messages).
- Footer copyright text has an outdated year (2024) and typographic spacing issues (
, Inc.). - Testimonial cards all reference a single SVG image and foreign mock names.
- Home page title needs clean, professional personal branding.
User Stories & Acceptance Criteria
US-1: SVG Optimization & Image Rendering
- As a visitor,
- I want all SVG images (avatars, logos, icons) to load and render inline inside
<img>tags, - So that images are displayed sharply without broken image boxes or download prompts.
- Acceptance Criteria:
next.config.mjsconfiguresimages.contentDispositionType: 'inline'.- Next.js image optimizer returns
Content-Disposition: inlinefor SVG assets.
US-2: Clean Development Scripts
- As a contributor,
- I want standard cross-platform npm scripts,
- So that the project runs cleanly on Linux, macOS, and CI/CD without hardcoded Windows Laragon paths.
- Acceptance Criteria:
npm run devexecutes standardnext dev.
US-3: Fully Localized Contact Form
- As a visitor browsing in English or Persian,
- I want the contact form labels, placeholders, and error messages to match the active language,
- So that the interface is coherent and accessible.
- Acceptance Criteria:
contactForm.tsxreads field labels, placeholders, and validation messages from dictionary/props.- Form direction (
dir) adapts to RTL for Persian and LTR for English.
US-4: Updated Footer & Clean Typography
- As a visitor,
- I want the footer to display the current copyright year and correct punctuation,
- So that the website reflects an actively maintained, professional profile.
- Acceptance Criteria:
- Copyright year is 2026.
- Space before comma in
All Rights Reserved, Inc.is removed.
US-5: Test Suite & Build Verification
- As a developer,
- I want all unit tests and production builds to pass with zero errors,
- So that changes can safely merge into
mainand deploy via CI/CD. - Acceptance Criteria:
npm test(Vitest) passes.npm run buildsucceeds without type or bundling errors.