Files
2026-11-02 06:53:45 +00:00

58 lines
2.8 KiB
Markdown

# 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:
1. SVG image rendering fails when optimized by Next.js due to missing `contentDispositionType: 'inline'`.
2. `package.json` contains an outdated, hardcoded Windows-specific `dev` script containing developer local filesystem paths.
3. The contact form suffers from language inconsistencies (English headings with hardcoded Persian fields and validation messages).
4. Footer copyright text has an outdated year (2024) and typographic spacing issues (` , Inc.`).
5. Testimonial cards all reference a single SVG image and foreign mock names.
6. 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.mjs` configures `images.contentDispositionType: 'inline'`.
- Next.js image optimizer returns `Content-Disposition: inline` for 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 dev` executes standard `next 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.tsx` reads 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 `main` and deploy via CI/CD.
- **Acceptance Criteria**:
- `npm test` (Vitest) passes.
- `npm run build` succeeds without type or bundling errors.