45 lines
2.0 KiB
Markdown
45 lines
2.0 KiB
Markdown
# Implementation Plan: Audit Bug Fixes & Codebase Hardening
|
|
|
|
## Phase -1: Pre-Implementation Constitutional Gates
|
|
- [x] **Simplicity Gate (Article VII)**: No new third-party runtime dependencies added; purely utilizing existing Next.js, React, and dictionary mechanisms.
|
|
- [x] **Anti-Abstraction Gate (Article VIII)**: Modifying configuration and components directly using native Next.js properties.
|
|
- [x] **Integration-First Gate (Article IX)**: Verifying complete Next.js production build (`next build`) and test execution (`vitest run`).
|
|
|
|
## Technical Design & Architectural Changes
|
|
|
|
### 1. `next.config.mjs`
|
|
Add `contentDispositionType: 'inline'` inside `images`:
|
|
```javascript
|
|
images: {
|
|
dangerouslyAllowSVG: true,
|
|
contentDispositionType: 'inline',
|
|
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
|
...
|
|
```
|
|
|
|
### 2. `package.json`
|
|
Replace the hardcoded Windows Laragon script with standard cross-platform Next.js command:
|
|
```json
|
|
"dev": "next dev"
|
|
```
|
|
|
|
### 3. Dictionaries (`en.json` & `fa.json`)
|
|
- Add structured contact form strings into `dict.website.homePage.contact.form`:
|
|
- `nameLabel`, `namePlaceholder`
|
|
- `emailLabel`, `emailPlaceholder`
|
|
- `messageLabel`, `messagePlaceholder`
|
|
- `errorNameRequired`, `errorEmailRequired`, `errorEmailInvalid`, `errorMessageRequired`
|
|
- `errorSummaryTitle`, `successMessage`, `errorMessage`
|
|
- Update footer:
|
|
- English: `"Year": "© 2026"`, `"CopyRight": "All Rights Reserved, Inc."`
|
|
- Persian: `"Year": "© ۲۰۲۶"`, `"CopyRight": "تمامی حقوق محفوظ است"`
|
|
|
|
### 4. `contactForm.tsx` & `contact.tsx`
|
|
- Thread dictionary translations into `ContactForm`.
|
|
- Dynamic `dir={isRtl ? "rtl" : "ltr"}` based on active locale.
|
|
- Adapt client-side validation messages according to dictionary.
|
|
|
|
### 5. `(home)/page.tsx` Metadata
|
|
- Align home page metadata with professional architect persona:
|
|
`title: "وبسایت شخصی | توسعهدهنده ارشد و معمار نرمافزار"`
|