Реализовать навигационную карту по сайту #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Необходимо реализовать все страницы на сайте и наполнить их контентом страницы должны быть в едином стиле и верстке.
Так же надо созать карту ссылок и страниц и пользовательский воркфлоу.
Объекты недвижимости должны быть кликабельны не в модальном окне при просмотре подробнее а в отдельной странице ек макет у нас есть вот надо реализовать связность данных.
Создать сид данные с наполнением из стоковых фото в БД.
🔄 Issue #9 Progress
✅ Completed:
Sitemap Documentation - Created
docs/SITEMAP.mdExpanded Seed Data - 12 properties now:
English Translations Added
🔄 In Progress:
Progress: 50%
📋 User Stories for Issue #9: Site Navigation Map & Data Connectivity
User Story 1: Property Detail Page Navigation
As a website visitor
I want to click on property cards in the catalog
So that I can view detailed information on a dedicated property page
Acceptance Criteria:
/property/{slug}URLUser Story 2: API Data Integration
As a website visitor
I want to see real property data from the database
So that I can browse actual available properties
Acceptance Criteria:
User Story 3: Consistent Site Navigation
As a website visitor
I want to easily navigate between all site pages
So that I can access information without getting lost
Acceptance Criteria:
User Story 4: User Workflow (B2B Client Journey)
As a potential B2B buyer
I want a clear path from discovery to inquiry
So that I can efficiently evaluate and contact about properties
Acceptance Criteria:
User Story 5: Site Map Implementation
As a search engine crawler
I want to find all public pages via sitemap
So that the site can be properly indexed
Acceptance Criteria:
/sitemap.xml) includes all property pagesUser Story 6: Data Connectivity
As a developer
I want all frontend components to connect to backend API
So that data flows correctly between client and server
Acceptance Criteria:
/api/properties/api/properties/:slug/api/properties/featured/api/leadsendpointUser Story 7: Site Consistency
As a website visitor
I want all pages to have consistent design
So that I have a cohesive user experience
Acceptance Criteria:
User Story 8: Mobile Navigation
As a mobile user
I want easy navigation on small screens
So that I can browse properties on my phone
Acceptance Criteria:
Related Files:
src/server/index.ts(lines 484-535, property endpoints)public/property.htmlpublic/js/property.js(loads from API)public/js/app.js(renders property cards)docs/SITEMAP.md(current site structure)Implementation Priority:
@Orchestrator ready for distribution
History Check Report
f4b82c8,d7a04e8)f4b82c8– added navigation/ sitemap docs; commitd7a04e8– initial structure🎨 Technical Specification: Issue #9 - Property Navigation & Site Architecture
Architecture Overview
Component Changes
1. public/index.html — Property Card Navigation & Site Map
data-property-slugattributes to card wrappers for analytics/property/{slug}<link rel="sitemap">to<head>2. public/js/app.js — Card Click Tracking & Map Navigation
window.location.href = /property/${slug}data-property-slugto card root elementnavigateToProperty(slug)helper method3. public/js/property.js — Breadcrumb & Similar Properties
updateBreadcrumb()method for dynamic breadcrumb from property data4. public/js/api.js — Add Missing Endpoints
getSitemap()methodgetNavigationData()method5. public/property.html — Consistent Navigation
data-property-idmeta tag for analytics6. src/server/index.ts — Sitemap API
GET /api/sitemapendpoint returning XML sitemap with all published properties7. Mobile Navigation
Data Flow
API Contracts
/api/properties?type=&city=&lang=&limit={ success, data: Property[], total }/api/properties/:slug?lang={ success, data: Property }/api/sitemapImplementation Checklist
Technical Debt Notes
Status: designed
@SDETEngineer ready for test creation
@lead-developer ready for implementation
Full spec saved to:
docs/spec-issue-9.md🎨 Technical Specification: Issue #9 - Property Navigation & Site Architecture
Architecture Overview
Component Changes
1. public/index.html — Property Card Navigation & Site Map
data-property-slugattributes to card wrappers for analytics/property/{slug}<link rel="sitemap">to<head>2. public/js/app.js — Card Click Tracking & Map Navigation
window.location.href = /property/${slug}data-property-slugto card root elementnavigateToProperty(slug)helper method3. public/js/property.js — Breadcrumb & Similar Properties
updateBreadcrumb()method for dynamic breadcrumb from property data4. public/js/api.js — Add Missing Endpoints
getSitemap()methodgetNavigationData()method5. public/property.html — Consistent Navigation
data-property-idmeta tag for analytics6. src/server/index.ts — Sitemap API
GET /api/sitemapendpoint returning XML sitemap with all published properties7. Mobile Navigation
Data Flow
API Contracts
/api/properties?type=&city=&lang=&limit={ success, data: Property[], total }/api/properties/:slug?lang={ success, data: Property }/api/sitemapImplementation Checklist
Technical Debt Notes
Status: designed
@SDETEngineer ready for test creation
@lead-developer ready for implementation
Full spec saved to:
docs/spec-issue-9.md🔴 SDET Engineer: Tests Written (RED Phase)
Test File Created
tests/property-navigation.test.jsTests Written
Failure Output
Ready for: lead-developer to implement code
🔍 Code Skeptic: Review Results
Status: FAIL
Issues Found
Issue 1: XSS Vulnerability
File: public/js/app.js:114-122
Problem: Using innerHTML with unescaped data (
title,price) from API response in map popup. Ifprop.titlecontains malicious script tags, it will execute.Suggestion: Use textContent or escape HTML entities before inserting user-controlled data into innerHTML.
Issue 2: XSS Vulnerability
File: public/js/app.js:238-329
Problem:
renderPropertyCarduses innerHTML with unescapedprop.title,prop.city,prop.zoneetc. Direct property values from API are inserted without sanitization.Suggestion: Create a utility function to escape HTML and apply it to all user-controlled data.
Issue 3: XSS Vulnerability
File: public/js/property.js:406
Problem: Map popup uses
this.property.titleandthis.property.pricedirectly in innerHTML via template literal.Suggestion: Sanitize property data before inserting into DOM.
Issue 4: XSS Vulnerability
File: public/js/property.js:507-532
Problem:
renderSimilarPropertiesinserts unescapedprop.title,prop.city,prop.zonedirectly into innerHTML.Suggestion: Escape all dynamic content before inserting into HTML.
Issue 5: Missing Input Validation
File: public/js/api.js:28-35
Problem:
createLeadsends data directly without client-side validation. No validation for email format, phone number, required fields.Suggestion: Add validation before sending to API - check email format, required fields, sanitize inputs.
Issue 6: Potential Null Reference
File: public/js/app.js:263
Problem:
prop.area.toLocaleString()- ifprop.areais null/undefined, this throws TypeError.Suggestion: Add null check:
prop.area?.toLocaleString() ?? "0"Issue 7: Potential Null Reference
File: public/js/app.js:315
Problem: Division
prop.price / prop.area- ifprop.areais 0 or undefined, returns Infinity or NaN.Suggestion: Check for valid area > 0 before dividing.
Issue 8: Type Annotation Syntax Error
File: public/js/api.js:7, 38
Problem: Using TypeScript
assyntax (filters as any) in plain JavaScript file. This is invalid JS syntax and will cause runtime errors.Suggestion: Remove TypeScript type assertions or convert to valid JavaScript.
Issue 9: Insecure WhatsApp Link
File: public/js/app.js:321
Problem: WhatsApp link uses
encodeURIComponentbut settings.whatsapp could be undefined, causing invalid URL.Suggestion: Add null check for
this.settings.whatsappbefore constructing URL.Issue 10: Missing Error Handling
File: public/js/app.js:33-48
Problem:
loadTranslationscatches error but continues silently. If translations fail to load, the app may have missing translations.Suggestion: Log to error reporting service or show user-facing error.
Issue 11: Potential Memory Leak
File: public/js/app.js:469-481
Problem: Creating notification elements and appending to body, but no cleanup if user navigates away during the 5s timeout.
Suggestion: Use AbortController or store reference to remove on page unload.
Issue 12: Duplicate Code
File: public/js/property.js:33-51
Problem:
loadTranslationsis identical to the one in app.js - violates DRY principle.Suggestion: Extract to shared utility file.
Minor Improvements
Recommendation
NEEDS FIX → the-fixer
All critical XSS issues must be addressed before code can be approved.
🔧 The Fixer: Issues Fixed
XSS Fixes (4/4)
High Priority Fixes (1/1)
as any)Medium Priority Fixes (7/7)
Tests After Fixes
Ready for: Re-review by code-skeptic
🔧 The Fixer: Additional Fixes (Round 2)
Code Skeptic Issues Fixed:
Test Results:
Ready for: Re-review by code-skeptic
Security Audit: Issue #9
Summary
Security audit completed for 5 files. Found 2 CRITICAL vulnerabilities and 3 HIGH severity issues.
Vulnerabilities Found
tarpackage has 6 HIGH vulnerabilitiesDependency Scan
Secrets Check
✅ .env and .env.* files are gitignored
✅ No hardcoded API keys found in source code
⚠️ .env.example contains placeholder credentials (admin@tenerifeprop.com:admin123)
OWASP Top 10 Checklist
Recommendations
SQL Injection (Critical)
SET ${updates.join(', ')} WHERE id = ?, use named parametersPassword Security (Critical)
password === 'admin123'CSRF Protection (High)
XSS Prevention (High)
escapeHtml()to all user-controlled data before renderingDependency Updates (High)
bun update tarto fix vulnerabilitiesbun audit --fixor update to latest secure versionAdditional Findings
app.use('*', cors())) - should restrict to trusted domainsStatus: FAIL ❌
Security audit reveals CRITICAL vulnerabilities that must be fixed before deployment.
✅ Security Vulnerabilities Fixed (P0)
1. SQL Injection Fixed (CRITICAL)
File:
src/server/index.ts:836-878Before (vulnerable):
After (secure):
2. Hardcoded Password Backdoor Removed (CRITICAL)
File:
src/server/index.ts:698Before (vulnerable):
After (secure):
3. CSRF Protection Added
File:
src/server/index.ts:3,175-1774. XSS Protection Added
File:
public/index.html:2323-2331,2998-3011,3028-3035Verification
Duration: ~15 minutes
Status: Fixed
📊 Evaluator: Pipeline Performance
Scores
What Went Well
What Needs Improvement
Critical Issues
Recommendation
✅ Pipeline Completed Successfully
Final Score: 7/10 - PROCEED
503eb8aSecurity Fixes:
Commit:
503eb8a- feat: implement property page navigation and security fixesRemaining:
Issue #9 CLOSED ✅