agentic-sdlc 1.0.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
- package/.agent/ide-integration/KIRO-IDE.md +381 -0
- package/.agent/ide-integration/README.md +256 -209
- package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
- package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
- package/.agent/knowledge-base/INDEX.md +43 -0
- package/.agent/knowledge-base/README.md +47 -7
- package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
- package/.agent/knowledge-base/architecture/README.md +98 -0
- package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
- package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
- package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
- package/.agent/knowledge-base/features/README.md +83 -0
- package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
- package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
- package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
- package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
- package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
- package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
- package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
- package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
- package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
- package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
- package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
- package/.agent/rules/AUTO-LEARNING.md +418 -0
- package/.agent/rules/ai-enforcement.md +11 -0
- package/.agent/rules/artifacts.md +77 -58
- package/.agent/rules/git-workflow.md +25 -65
- package/.agent/rules/global.md +18 -13
- package/.agent/skills/role-ba.md +76 -0
- package/.agent/skills/role-brain.md +470 -0
- package/.agent/skills/role-dev.md +338 -0
- package/.agent/skills/role-devops.md +122 -0
- package/.agent/skills/role-orchestrator.md +223 -0
- package/.agent/skills/role-pm.md +258 -0
- package/.agent/skills/role-po.md +237 -0
- package/.agent/skills/role-qa.md +81 -0
- package/.agent/skills/role-reporter.md +117 -0
- package/.agent/skills/role-sa.md +277 -0
- package/.agent/skills/role-seca.md +294 -0
- package/.agent/skills/role-stakeholder.md +105 -0
- package/.agent/skills/role-tester.md +294 -0
- package/.agent/skills/role-uiux.md +264 -0
- package/.agent/templates/CHANGELOG-Template.md +83 -0
- package/.agent/templates/Knowledge-Entry-Template.md +3 -0
- package/.agent/workflows/brain.md +84 -53
- package/.agent/workflows/compound.md +51 -0
- package/.agent/workflows/cycle.md +61 -0
- package/.agent/workflows/emergency.md +114 -0
- package/.agent/workflows/explore.md +147 -0
- package/.agent/workflows/housekeeping.md +105 -0
- package/.agent/workflows/metrics.md +179 -0
- package/.agent/workflows/orchestrator.md +68 -0
- package/.agent/workflows/preflight.md +35 -0
- package/.agent/workflows/release.md +153 -0
- package/.agent/workflows/route.md +160 -0
- package/.agent/workflows/sprint.md +125 -0
- package/.agent/workflows/validate.md +146 -0
- package/CHANGELOG.md +349 -6
- package/README.md +171 -86
- package/bin/CROSS-PLATFORM-CLI.md +526 -0
- package/bin/README.md +525 -0
- package/bin/cli.js +65 -90
- package/bin/kb +34 -0
- package/bin/kb.bat +28 -0
- package/bin/kb_cli.py +226 -0
- package/bin/lib/README.md +411 -0
- package/bin/lib/__init__.py +7 -0
- package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
- package/bin/lib/kb_add.py +203 -0
- package/bin/lib/kb_common.py +224 -0
- package/bin/lib/kb_compound.py +250 -0
- package/bin/lib/kb_index.py +193 -0
- package/bin/lib/kb_list.py +144 -0
- package/bin/lib/kb_search.py +121 -0
- package/bin/lib/kb_stats.py +153 -0
- package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
- package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
- package/docs/BRAIN-ARCHITECTURE.md +396 -0
- package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
- package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
- package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
- package/docs/MONOREPO-ARCHITECTURE.md +492 -0
- package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
- package/docs/SDLC-Diagram.md +235 -0
- package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
- package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
- package/docs/architecture/{brain.md → BRAIN.md} +1 -1
- package/docs/global/Master-Documentation.md +307 -0
- package/docs/global/reports/Final-Approval-Report.md +257 -0
- package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
- package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
- package/docs/guides/LEARNING-FLOW.md +0 -0
- package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
- package/docs/guides/MCP-SETUP.md +139 -0
- package/docs/guides/QUICK-START.md +4 -0
- package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
- package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
- package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
- package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
- package/docs/reports/Validation-Report-2026-01-04.md +23 -0
- package/docs/research-reports/research-20260103-101315.json +95 -0
- package/docs/research-reports/research-20260103-101315.md +78 -0
- package/docs/research-reports/research-20260103-183837.json +95 -0
- package/docs/research-reports/research-20260103-183837.md +78 -0
- package/docs/research-reports/research-20260103-190346.json +100 -0
- package/docs/research-reports/research-20260103-190346.md +83 -0
- package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
- package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
- package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
- package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
- package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
- package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
- package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
- package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
- package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
- package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
- package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
- package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
- package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
- package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
- package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
- package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
- package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
- package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
- package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
- package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
- package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
- package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
- package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
- package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
- package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
- package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
- package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
- package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
- package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
- package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
- package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
- package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
- package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
- package/docs/sprints/sprint-6/.brain-state.json +29 -0
- package/package.json +92 -16
- package/.agent/ide-integration/aider-commands.md +0 -40
- package/.agent/ide-integration/cline-config.json +0 -108
- package/.agent/ide-integration/cursor-rules.md +0 -63
- package/.agent/ide-integration/github-copilot-instructions.md +0 -75
- package/.agent/ide-integration/vscode-commands.json +0 -190
- package/.agent/ide-integration/windsurf-cascade.md +0 -125
- package/.agent/knowledge-base/index.md +0 -202
- package/.agent/legacy/roles/designer.md +0 -311
- package/.agent/legacy/roles/dev.md +0 -177
- package/.agent/legacy/roles/devops.md +0 -146
- package/.agent/legacy/roles/orchestrator.md +0 -339
- package/.agent/legacy/roles/pm.md +0 -120
- package/.agent/legacy/roles/po.md +0 -89
- package/.agent/legacy/roles/qa.md +0 -108
- package/.agent/legacy/roles/reporter.md +0 -70
- package/.agent/legacy/roles/sa.md +0 -118
- package/.agent/legacy/roles/seca.md +0 -112
- package/.agent/legacy/roles/stakeholder.md +0 -111
- package/.agent/legacy/roles/tester.md +0 -129
- package/.agent/rules/global.md.bak +0 -154
- package/.agent/usage.md +0 -653
- package/.agent/workflows/auto.md +0 -35
- package/.agent/workflows/dev.md +0 -30
- package/.agent/workflows/devops.md +0 -28
- package/.agent/workflows/kb-search.md +0 -22
- package/.agent/workflows/pm.md +0 -42
- package/.agent/workflows/po.md +0 -21
- package/.agent/workflows/qa.md +0 -31
- package/.agent/workflows/reporter.md +0 -21
- package/.agent/workflows/sa.md +0 -51
- package/.agent/workflows/seca.md +0 -21
- package/.agent/workflows/stakeholder.md +0 -26
- package/.agent/workflows/tester.md +0 -21
- package/.agent/workflows/uiux.md +0 -38
- package/.cursorrules +0 -49
- package/.env.template +0 -10
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
- package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
- package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
- package/.github/copilot-instructions.md +0 -60
- package/bin/commands/create.js +0 -96
- package/bin/commands/help.js +0 -69
- package/bin/commands/ide.js +0 -116
- package/bin/commands/init-kb.js +0 -74
- package/bin/commands/install.js +0 -68
- package/bin/commands/list.js +0 -35
- package/bin/graph_brain.py +0 -86
- package/bin/sync_github.py +0 -75
- package/bin/utils/args-parser.js +0 -33
- package/bin/utils/colors.js +0 -21
- package/bin/verify_neo4j.py +0 -25
- /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
- /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
- /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
- /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
|
@@ -0,0 +1,1734 @@
|
|
|
1
|
+
# Backend Design Specification - Sprint 5
|
|
2
|
+
## Landing Page Technical Architecture
|
|
3
|
+
|
|
4
|
+
**Version:** 1.0
|
|
5
|
+
**Date:** 2026-01-02
|
|
6
|
+
**System Analyst:** @SA
|
|
7
|
+
**Status:** Ready for Review
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Executive Summary
|
|
12
|
+
|
|
13
|
+
This specification defines the **technical architecture and backend systems** required to support the premium landing page designed in `UIUX-Design-Spec-Sprint-5-v1.md`. The architecture prioritizes:
|
|
14
|
+
|
|
15
|
+
- **Performance**: Sub-2-second load times with optimized delivery
|
|
16
|
+
- **Scalability**: Handle 10,000+ concurrent visitors
|
|
17
|
+
- **SEO**: Server-side rendering for optimal search engine indexing
|
|
18
|
+
- **Analytics**: Comprehensive tracking and conversion optimization
|
|
19
|
+
- **Security**: Protection against common web vulnerabilities
|
|
20
|
+
- **Maintainability**: Clean architecture with separation of concerns
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. High-Level Architecture
|
|
25
|
+
|
|
26
|
+
### 2.1 System Overview
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
30
|
+
│ CLIENT LAYER │
|
|
31
|
+
├─────────────────────────────────────────────────────────────┤
|
|
32
|
+
│ Browser (Chrome, Firefox, Safari, Edge) │
|
|
33
|
+
│ - React Components (Next.js) │
|
|
34
|
+
│ - Client-side routing │
|
|
35
|
+
│ - State management (React Context/Zustand) │
|
|
36
|
+
│ - Analytics tracking │
|
|
37
|
+
└────────────────────────┬────────────────────────────────────┘
|
|
38
|
+
│ HTTPS
|
|
39
|
+
▼
|
|
40
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
41
|
+
│ CDN / EDGE LAYER │
|
|
42
|
+
├─────────────────────────────────────────────────────────────┤
|
|
43
|
+
│ Vercel Edge Network / Cloudflare │
|
|
44
|
+
│ - Static asset caching │
|
|
45
|
+
│ - Image optimization │
|
|
46
|
+
│ - DDoS protection │
|
|
47
|
+
│ - SSL/TLS termination │
|
|
48
|
+
└────────────────────────┬────────────────────────────────────┘
|
|
49
|
+
│
|
|
50
|
+
▼
|
|
51
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
52
|
+
│ APPLICATION LAYER │
|
|
53
|
+
├─────────────────────────────────────────────────────────────┤
|
|
54
|
+
│ Next.js 14+ (App Router) │
|
|
55
|
+
│ - Server Components (RSC) │
|
|
56
|
+
│ - API Routes │
|
|
57
|
+
│ - Server-side rendering (SSR) │
|
|
58
|
+
│ - Static generation (SSG) │
|
|
59
|
+
│ - Incremental Static Regeneration (ISR) │
|
|
60
|
+
└────────────────────────┬────────────────────────────────────┘
|
|
61
|
+
│
|
|
62
|
+
▼
|
|
63
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
64
|
+
│ DATA LAYER │
|
|
65
|
+
├─────────────────────────────────────────────────────────────┤
|
|
66
|
+
│ Content Management │
|
|
67
|
+
│ - Static JSON files (metrics, testimonials) │
|
|
68
|
+
│ - Optional: Headless CMS (Sanity, Contentful) │
|
|
69
|
+
│ │
|
|
70
|
+
│ Analytics & Tracking │
|
|
71
|
+
│ - Google Analytics 4 │
|
|
72
|
+
│ - Vercel Analytics │
|
|
73
|
+
│ - PostHog (optional - product analytics) │
|
|
74
|
+
│ │
|
|
75
|
+
│ Form Submissions (if newsletter/contact) │
|
|
76
|
+
│ - Resend API (email) │
|
|
77
|
+
│ - Database (optional - PostgreSQL/Supabase) │
|
|
78
|
+
└─────────────────────────────────────────────────────────────┘
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2.2 Technology Stack
|
|
82
|
+
|
|
83
|
+
**Frontend Framework**
|
|
84
|
+
- **Next.js 14.2+** (App Router)
|
|
85
|
+
- React 18+ with Server Components
|
|
86
|
+
- TypeScript for type safety
|
|
87
|
+
- Turbopack for faster builds (dev)
|
|
88
|
+
|
|
89
|
+
**Styling & UI**
|
|
90
|
+
- **Tailwind CSS 3.4+**
|
|
91
|
+
- JIT compiler for optimal CSS
|
|
92
|
+
- Custom design tokens
|
|
93
|
+
- **shadcn/ui**
|
|
94
|
+
- Radix UI primitives
|
|
95
|
+
- Customizable components
|
|
96
|
+
|
|
97
|
+
**Animation**
|
|
98
|
+
- **Framer Motion 11+**
|
|
99
|
+
- Declarative animations
|
|
100
|
+
- Scroll-triggered effects
|
|
101
|
+
- Gesture support
|
|
102
|
+
|
|
103
|
+
**Icons & Assets**
|
|
104
|
+
- **Lucide React** - Icon library
|
|
105
|
+
- **Next.js Image** - Optimized images
|
|
106
|
+
- **Google Fonts** - Typography (Inter, Outfit)
|
|
107
|
+
|
|
108
|
+
**Analytics & Monitoring**
|
|
109
|
+
- **Vercel Analytics** - Core Web Vitals
|
|
110
|
+
- **Google Analytics 4** - User behavior
|
|
111
|
+
- **Sentry** (optional) - Error tracking
|
|
112
|
+
|
|
113
|
+
**Deployment**
|
|
114
|
+
- **Vercel** (recommended) or **Netlify**
|
|
115
|
+
- Edge functions
|
|
116
|
+
- Automatic deployments
|
|
117
|
+
- Preview environments
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 3. Data Models
|
|
122
|
+
|
|
123
|
+
### 3.1 Static Content Structure
|
|
124
|
+
|
|
125
|
+
**Feature Data Model**
|
|
126
|
+
```typescript
|
|
127
|
+
interface Feature {
|
|
128
|
+
id: string;
|
|
129
|
+
icon: string; // Lucide icon name or SVG path
|
|
130
|
+
title: string;
|
|
131
|
+
description: string;
|
|
132
|
+
link?: {
|
|
133
|
+
href: string;
|
|
134
|
+
label: string;
|
|
135
|
+
};
|
|
136
|
+
order: number;
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Testimonial Data Model**
|
|
141
|
+
```typescript
|
|
142
|
+
interface Testimonial {
|
|
143
|
+
id: string;
|
|
144
|
+
quote: string;
|
|
145
|
+
author: {
|
|
146
|
+
name: string;
|
|
147
|
+
title: string;
|
|
148
|
+
company: string;
|
|
149
|
+
avatar?: string; // URL or path to image
|
|
150
|
+
};
|
|
151
|
+
rating?: number; // 1-5 stars
|
|
152
|
+
featured: boolean;
|
|
153
|
+
order: number;
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Metric Data Model**
|
|
158
|
+
```typescript
|
|
159
|
+
interface Metric {
|
|
160
|
+
id: string;
|
|
161
|
+
value: string | number; // e.g., "10K+" or 10000
|
|
162
|
+
label: string;
|
|
163
|
+
suffix?: string; // e.g., "+", "%"
|
|
164
|
+
animationDuration?: number; // milliseconds
|
|
165
|
+
order: number;
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Navigation Link Model**
|
|
170
|
+
```typescript
|
|
171
|
+
interface NavLink {
|
|
172
|
+
id: string;
|
|
173
|
+
label: string;
|
|
174
|
+
href: string;
|
|
175
|
+
external?: boolean;
|
|
176
|
+
order: number;
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 3.2 Configuration Model
|
|
181
|
+
|
|
182
|
+
**Site Configuration**
|
|
183
|
+
```typescript
|
|
184
|
+
interface SiteConfig {
|
|
185
|
+
name: string;
|
|
186
|
+
description: string;
|
|
187
|
+
url: string;
|
|
188
|
+
ogImage: string;
|
|
189
|
+
links: {
|
|
190
|
+
github?: string;
|
|
191
|
+
twitter?: string;
|
|
192
|
+
linkedin?: string;
|
|
193
|
+
discord?: string;
|
|
194
|
+
};
|
|
195
|
+
creator: string;
|
|
196
|
+
keywords: string[];
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 3.3 Data Storage
|
|
201
|
+
|
|
202
|
+
**Static JSON Files** (Recommended for MVP)
|
|
203
|
+
```
|
|
204
|
+
/data
|
|
205
|
+
/features.json
|
|
206
|
+
/testimonials.json
|
|
207
|
+
/metrics.json
|
|
208
|
+
/navigation.json
|
|
209
|
+
/site-config.json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Example: features.json**
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"features": [
|
|
216
|
+
{
|
|
217
|
+
"id": "automated-planning",
|
|
218
|
+
"icon": "ClipboardList",
|
|
219
|
+
"title": "Automated Planning",
|
|
220
|
+
"description": "Let AI agents create comprehensive project plans, user stories, and technical specifications in minutes.",
|
|
221
|
+
"link": {
|
|
222
|
+
"href": "/docs/planning",
|
|
223
|
+
"label": "Learn more"
|
|
224
|
+
},
|
|
225
|
+
"order": 1
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 4. API Design
|
|
234
|
+
|
|
235
|
+
### 4.1 API Routes (Next.js App Router)
|
|
236
|
+
|
|
237
|
+
**Newsletter Subscription** (Optional)
|
|
238
|
+
```
|
|
239
|
+
POST /api/newsletter/subscribe
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Request Body**
|
|
243
|
+
```typescript
|
|
244
|
+
interface SubscribeRequest {
|
|
245
|
+
email: string;
|
|
246
|
+
source?: string; // e.g., "landing-hero", "footer"
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Response**
|
|
251
|
+
```typescript
|
|
252
|
+
interface SubscribeResponse {
|
|
253
|
+
success: boolean;
|
|
254
|
+
message: string;
|
|
255
|
+
error?: string;
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Status Codes**
|
|
260
|
+
- `200` - Success
|
|
261
|
+
- `400` - Invalid email format
|
|
262
|
+
- `409` - Email already subscribed
|
|
263
|
+
- `500` - Server error
|
|
264
|
+
|
|
265
|
+
**Contact Form** (Optional)
|
|
266
|
+
```
|
|
267
|
+
POST /api/contact
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Request Body**
|
|
271
|
+
```typescript
|
|
272
|
+
interface ContactRequest {
|
|
273
|
+
name: string;
|
|
274
|
+
email: string;
|
|
275
|
+
company?: string;
|
|
276
|
+
message: string;
|
|
277
|
+
subject?: string;
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Response**
|
|
282
|
+
```typescript
|
|
283
|
+
interface ContactResponse {
|
|
284
|
+
success: boolean;
|
|
285
|
+
message: string;
|
|
286
|
+
ticketId?: string; // For tracking
|
|
287
|
+
error?: string;
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Analytics Event Tracking**
|
|
292
|
+
```
|
|
293
|
+
POST /api/analytics/event
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Request Body**
|
|
297
|
+
```typescript
|
|
298
|
+
interface AnalyticsEvent {
|
|
299
|
+
event: string; // e.g., "cta_click", "scroll_depth"
|
|
300
|
+
properties?: Record<string, any>;
|
|
301
|
+
timestamp?: number;
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### 4.2 Server Actions (Next.js 14+)
|
|
306
|
+
|
|
307
|
+
**Alternative to API routes using Server Actions**
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
// app/actions/newsletter.ts
|
|
311
|
+
'use server'
|
|
312
|
+
|
|
313
|
+
export async function subscribeToNewsletter(email: string) {
|
|
314
|
+
// Validation
|
|
315
|
+
if (!isValidEmail(email)) {
|
|
316
|
+
return { success: false, error: 'Invalid email' };
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Send to email service (Resend, SendGrid, etc.)
|
|
320
|
+
try {
|
|
321
|
+
await emailService.subscribe(email);
|
|
322
|
+
return { success: true, message: 'Subscribed successfully' };
|
|
323
|
+
} catch (error) {
|
|
324
|
+
return { success: false, error: 'Subscription failed' };
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## 5. Rendering Strategy
|
|
332
|
+
|
|
333
|
+
### 5.1 Page Rendering Approach
|
|
334
|
+
|
|
335
|
+
**Landing Page**: Static Site Generation (SSG) with ISR
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
// app/page.tsx
|
|
339
|
+
export const revalidate = 3600; // Revalidate every hour
|
|
340
|
+
|
|
341
|
+
export default async function LandingPage() {
|
|
342
|
+
// Fetch data at build time
|
|
343
|
+
const features = await getFeatures();
|
|
344
|
+
const testimonials = await getTestimonials();
|
|
345
|
+
const metrics = await getMetrics();
|
|
346
|
+
|
|
347
|
+
return (
|
|
348
|
+
<main>
|
|
349
|
+
<Hero />
|
|
350
|
+
<Features data={features} />
|
|
351
|
+
<SocialProof metrics={metrics} />
|
|
352
|
+
<Testimonials data={testimonials} />
|
|
353
|
+
<CTA />
|
|
354
|
+
</main>
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Benefits**
|
|
360
|
+
- Fastest possible load times
|
|
361
|
+
- SEO-friendly (fully rendered HTML)
|
|
362
|
+
- Reduced server load
|
|
363
|
+
- Automatic CDN caching
|
|
364
|
+
|
|
365
|
+
**Incremental Static Regeneration (ISR)**
|
|
366
|
+
- Revalidate content every 1 hour (3600 seconds)
|
|
367
|
+
- Update testimonials/metrics without full rebuild
|
|
368
|
+
- Fallback to stale content if regeneration fails
|
|
369
|
+
|
|
370
|
+
### 5.2 Component Strategy
|
|
371
|
+
|
|
372
|
+
**Server Components** (Default)
|
|
373
|
+
- Hero section
|
|
374
|
+
- Features section
|
|
375
|
+
- Footer
|
|
376
|
+
- Navigation (static parts)
|
|
377
|
+
|
|
378
|
+
**Client Components** (Interactive)
|
|
379
|
+
- Theme toggle
|
|
380
|
+
- Mobile menu
|
|
381
|
+
- Animated counters
|
|
382
|
+
- Scroll animations
|
|
383
|
+
- Form submissions
|
|
384
|
+
- Analytics tracking
|
|
385
|
+
|
|
386
|
+
```typescript
|
|
387
|
+
// components/landing/AnimatedCounter.tsx
|
|
388
|
+
'use client'
|
|
389
|
+
|
|
390
|
+
import { useEffect, useState } from 'react';
|
|
391
|
+
import { useInView } from 'framer-motion';
|
|
392
|
+
|
|
393
|
+
export function AnimatedCounter({ value, duration = 2000 }) {
|
|
394
|
+
// Client-side animation logic
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## 6. Performance Optimization
|
|
401
|
+
|
|
402
|
+
### 6.1 Image Optimization
|
|
403
|
+
|
|
404
|
+
**Next.js Image Component**
|
|
405
|
+
```typescript
|
|
406
|
+
import Image from 'next/image';
|
|
407
|
+
|
|
408
|
+
<Image
|
|
409
|
+
src="/hero-visual.webp"
|
|
410
|
+
alt="Agentic SDLC Dashboard"
|
|
411
|
+
width={800}
|
|
412
|
+
height={600}
|
|
413
|
+
priority // Load immediately (above fold)
|
|
414
|
+
quality={90}
|
|
415
|
+
placeholder="blur" // Show blur while loading
|
|
416
|
+
blurDataURL="data:image/..." // Low-res placeholder
|
|
417
|
+
/>
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Image Formats**
|
|
421
|
+
- Primary: WebP (modern browsers)
|
|
422
|
+
- Fallback: JPEG/PNG (automatic by Next.js)
|
|
423
|
+
- SVG for icons and illustrations
|
|
424
|
+
|
|
425
|
+
**Responsive Images**
|
|
426
|
+
```typescript
|
|
427
|
+
<Image
|
|
428
|
+
src="/hero.webp"
|
|
429
|
+
alt="Hero"
|
|
430
|
+
fill
|
|
431
|
+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 800px"
|
|
432
|
+
style={{ objectFit: 'cover' }}
|
|
433
|
+
/>
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### 6.2 Font Optimization
|
|
437
|
+
|
|
438
|
+
**Next.js Font Optimization**
|
|
439
|
+
```typescript
|
|
440
|
+
// app/layout.tsx
|
|
441
|
+
import { Inter, Outfit } from 'next/font/google';
|
|
442
|
+
|
|
443
|
+
const inter = Inter({
|
|
444
|
+
subsets: ['latin'],
|
|
445
|
+
display: 'swap',
|
|
446
|
+
variable: '--font-inter',
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
const outfit = Outfit({
|
|
450
|
+
subsets: ['latin'],
|
|
451
|
+
display: 'swap',
|
|
452
|
+
variable: '--font-outfit',
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
export default function RootLayout({ children }) {
|
|
456
|
+
return (
|
|
457
|
+
<html lang="en" className={`${inter.variable} ${outfit.variable}`}>
|
|
458
|
+
<body>{children}</body>
|
|
459
|
+
</html>
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
**Benefits**
|
|
465
|
+
- Self-hosted fonts (no external requests)
|
|
466
|
+
- Automatic subsetting
|
|
467
|
+
- Font display: swap (prevent FOIT)
|
|
468
|
+
- CSS variables for easy usage
|
|
469
|
+
|
|
470
|
+
### 6.3 Code Splitting
|
|
471
|
+
|
|
472
|
+
**Dynamic Imports**
|
|
473
|
+
```typescript
|
|
474
|
+
// Lazy load heavy components
|
|
475
|
+
import dynamic from 'next/dynamic';
|
|
476
|
+
|
|
477
|
+
const Testimonials = dynamic(() => import('@/components/landing/Testimonials'), {
|
|
478
|
+
loading: () => <TestimonialsSkeleton />,
|
|
479
|
+
ssr: true, // Still render on server
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
const AnimatedBackground = dynamic(
|
|
483
|
+
() => import('@/components/landing/AnimatedBackground'),
|
|
484
|
+
{ ssr: false } // Client-only component
|
|
485
|
+
);
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**Route-based Splitting**
|
|
489
|
+
- Automatic in Next.js App Router
|
|
490
|
+
- Each route gets its own bundle
|
|
491
|
+
- Shared chunks extracted automatically
|
|
492
|
+
|
|
493
|
+
### 6.4 Caching Strategy
|
|
494
|
+
|
|
495
|
+
**Static Assets**
|
|
496
|
+
```
|
|
497
|
+
Cache-Control: public, max-age=31536000, immutable
|
|
498
|
+
```
|
|
499
|
+
- Images, fonts, CSS, JS with hashed filenames
|
|
500
|
+
- Cached for 1 year
|
|
501
|
+
- Immutable (never changes)
|
|
502
|
+
|
|
503
|
+
**HTML Pages**
|
|
504
|
+
```
|
|
505
|
+
Cache-Control: public, s-maxage=3600, stale-while-revalidate=86400
|
|
506
|
+
```
|
|
507
|
+
- Cache for 1 hour
|
|
508
|
+
- Serve stale content while revalidating
|
|
509
|
+
- ISR handles updates
|
|
510
|
+
|
|
511
|
+
**API Routes**
|
|
512
|
+
```
|
|
513
|
+
Cache-Control: private, no-cache
|
|
514
|
+
```
|
|
515
|
+
- Don't cache dynamic data
|
|
516
|
+
- Revalidate on every request
|
|
517
|
+
|
|
518
|
+
### 6.5 Bundle Optimization
|
|
519
|
+
|
|
520
|
+
**Webpack Configuration** (Next.js)
|
|
521
|
+
```javascript
|
|
522
|
+
// next.config.js
|
|
523
|
+
module.exports = {
|
|
524
|
+
experimental: {
|
|
525
|
+
optimizePackageImports: ['lucide-react', 'framer-motion'],
|
|
526
|
+
},
|
|
527
|
+
compiler: {
|
|
528
|
+
removeConsole: process.env.NODE_ENV === 'production',
|
|
529
|
+
},
|
|
530
|
+
};
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Tree Shaking**
|
|
534
|
+
- Import only needed components
|
|
535
|
+
- Use ES modules
|
|
536
|
+
- Avoid barrel exports for large libraries
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
// ❌ Bad - imports entire library
|
|
540
|
+
import { Button } from '@/components/ui';
|
|
541
|
+
|
|
542
|
+
// ✅ Good - imports only Button
|
|
543
|
+
import { Button } from '@/components/ui/button';
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
## 7. SEO Implementation
|
|
549
|
+
|
|
550
|
+
### 7.1 Metadata Generation
|
|
551
|
+
|
|
552
|
+
**Static Metadata**
|
|
553
|
+
```typescript
|
|
554
|
+
// app/layout.tsx
|
|
555
|
+
import type { Metadata } from 'next';
|
|
556
|
+
|
|
557
|
+
export const metadata: Metadata = {
|
|
558
|
+
metadataBase: new URL('https://agentic-sdlc.com'),
|
|
559
|
+
title: {
|
|
560
|
+
default: 'Agentic SDLC - AI-Powered Software Development Lifecycle',
|
|
561
|
+
template: '%s | Agentic SDLC',
|
|
562
|
+
},
|
|
563
|
+
description: 'Transform your development workflow with AI-powered agents. Automate planning, design, development, and deployment.',
|
|
564
|
+
keywords: ['SDLC', 'AI agents', 'software development', 'automation', 'DevOps'],
|
|
565
|
+
authors: [{ name: 'Agentic SDLC Team' }],
|
|
566
|
+
creator: 'Agentic SDLC',
|
|
567
|
+
openGraph: {
|
|
568
|
+
type: 'website',
|
|
569
|
+
locale: 'en_US',
|
|
570
|
+
url: 'https://agentic-sdlc.com',
|
|
571
|
+
title: 'Agentic SDLC - AI-Powered Software Development Lifecycle',
|
|
572
|
+
description: 'Transform your development workflow with AI-powered agents.',
|
|
573
|
+
siteName: 'Agentic SDLC',
|
|
574
|
+
images: [
|
|
575
|
+
{
|
|
576
|
+
url: '/og-image.jpg',
|
|
577
|
+
width: 1200,
|
|
578
|
+
height: 630,
|
|
579
|
+
alt: 'Agentic SDLC',
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
},
|
|
583
|
+
twitter: {
|
|
584
|
+
card: 'summary_large_image',
|
|
585
|
+
title: 'Agentic SDLC - AI-Powered Software Development Lifecycle',
|
|
586
|
+
description: 'Transform your development workflow with AI-powered agents.',
|
|
587
|
+
images: ['/twitter-image.jpg'],
|
|
588
|
+
creator: '@agentic_sdlc',
|
|
589
|
+
},
|
|
590
|
+
robots: {
|
|
591
|
+
index: true,
|
|
592
|
+
follow: true,
|
|
593
|
+
googleBot: {
|
|
594
|
+
index: true,
|
|
595
|
+
follow: true,
|
|
596
|
+
'max-video-preview': -1,
|
|
597
|
+
'max-image-preview': 'large',
|
|
598
|
+
'max-snippet': -1,
|
|
599
|
+
},
|
|
600
|
+
},
|
|
601
|
+
};
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### 7.2 Structured Data
|
|
605
|
+
|
|
606
|
+
**JSON-LD Schema**
|
|
607
|
+
```typescript
|
|
608
|
+
// app/page.tsx
|
|
609
|
+
export default function LandingPage() {
|
|
610
|
+
const jsonLd = {
|
|
611
|
+
'@context': 'https://schema.org',
|
|
612
|
+
'@type': 'SoftwareApplication',
|
|
613
|
+
name: 'Agentic SDLC',
|
|
614
|
+
applicationCategory: 'DeveloperApplication',
|
|
615
|
+
operatingSystem: 'Cross-platform',
|
|
616
|
+
offers: {
|
|
617
|
+
'@type': 'Offer',
|
|
618
|
+
price: '0',
|
|
619
|
+
priceCurrency: 'USD',
|
|
620
|
+
},
|
|
621
|
+
aggregateRating: {
|
|
622
|
+
'@type': 'AggregateRating',
|
|
623
|
+
ratingValue: '4.8',
|
|
624
|
+
ratingCount: '127',
|
|
625
|
+
},
|
|
626
|
+
description: 'AI-powered software development lifecycle automation',
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
return (
|
|
630
|
+
<>
|
|
631
|
+
<script
|
|
632
|
+
type="application/ld+json"
|
|
633
|
+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
634
|
+
/>
|
|
635
|
+
{/* Page content */}
|
|
636
|
+
</>
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### 7.3 Sitemap & Robots.txt
|
|
642
|
+
|
|
643
|
+
**Sitemap Generation**
|
|
644
|
+
```typescript
|
|
645
|
+
// app/sitemap.ts
|
|
646
|
+
import { MetadataRoute } from 'next';
|
|
647
|
+
|
|
648
|
+
export default function sitemap(): MetadataRoute.Sitemap {
|
|
649
|
+
return [
|
|
650
|
+
{
|
|
651
|
+
url: 'https://agentic-sdlc.com',
|
|
652
|
+
lastModified: new Date(),
|
|
653
|
+
changeFrequency: 'weekly',
|
|
654
|
+
priority: 1,
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
url: 'https://agentic-sdlc.com/docs',
|
|
658
|
+
lastModified: new Date(),
|
|
659
|
+
changeFrequency: 'weekly',
|
|
660
|
+
priority: 0.8,
|
|
661
|
+
},
|
|
662
|
+
];
|
|
663
|
+
}
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
**Robots.txt**
|
|
667
|
+
```typescript
|
|
668
|
+
// app/robots.ts
|
|
669
|
+
import { MetadataRoute } from 'next';
|
|
670
|
+
|
|
671
|
+
export default function robots(): MetadataRoute.Robots {
|
|
672
|
+
return {
|
|
673
|
+
rules: {
|
|
674
|
+
userAgent: '*',
|
|
675
|
+
allow: '/',
|
|
676
|
+
disallow: ['/api/', '/admin/'],
|
|
677
|
+
},
|
|
678
|
+
sitemap: 'https://agentic-sdlc.com/sitemap.xml',
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
## 8. Analytics & Tracking
|
|
686
|
+
|
|
687
|
+
### 8.1 Analytics Implementation
|
|
688
|
+
|
|
689
|
+
**Google Analytics 4**
|
|
690
|
+
```typescript
|
|
691
|
+
// lib/analytics.ts
|
|
692
|
+
export const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_ID;
|
|
693
|
+
|
|
694
|
+
export const pageview = (url: string) => {
|
|
695
|
+
window.gtag('config', GA_TRACKING_ID, {
|
|
696
|
+
page_path: url,
|
|
697
|
+
});
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
export const event = ({ action, category, label, value }: {
|
|
701
|
+
action: string;
|
|
702
|
+
category: string;
|
|
703
|
+
label?: string;
|
|
704
|
+
value?: number;
|
|
705
|
+
}) => {
|
|
706
|
+
window.gtag('event', action, {
|
|
707
|
+
event_category: category,
|
|
708
|
+
event_label: label,
|
|
709
|
+
value: value,
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
**Track CTA Clicks**
|
|
715
|
+
```typescript
|
|
716
|
+
// components/landing/Hero.tsx
|
|
717
|
+
'use client'
|
|
718
|
+
|
|
719
|
+
import { event } from '@/lib/analytics';
|
|
720
|
+
|
|
721
|
+
export function Hero() {
|
|
722
|
+
const handleCTAClick = (ctaType: 'primary' | 'secondary') => {
|
|
723
|
+
event({
|
|
724
|
+
action: 'click',
|
|
725
|
+
category: 'CTA',
|
|
726
|
+
label: `hero_${ctaType}`,
|
|
727
|
+
});
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
return (
|
|
731
|
+
<Button onClick={() => handleCTAClick('primary')}>
|
|
732
|
+
Get Started
|
|
733
|
+
</Button>
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### 8.2 Conversion Tracking
|
|
739
|
+
|
|
740
|
+
**Key Events to Track**
|
|
741
|
+
1. **Page Views**
|
|
742
|
+
- Landing page view
|
|
743
|
+
- Scroll depth (25%, 50%, 75%, 100%)
|
|
744
|
+
|
|
745
|
+
2. **Engagement**
|
|
746
|
+
- CTA clicks (primary, secondary)
|
|
747
|
+
- Feature card interactions
|
|
748
|
+
- Navigation clicks
|
|
749
|
+
- External link clicks
|
|
750
|
+
|
|
751
|
+
3. **Conversions**
|
|
752
|
+
- Newsletter signup
|
|
753
|
+
- Documentation visit
|
|
754
|
+
- GitHub repository visit
|
|
755
|
+
- Contact form submission
|
|
756
|
+
|
|
757
|
+
4. **Performance**
|
|
758
|
+
- Core Web Vitals (LCP, FID, CLS)
|
|
759
|
+
- Time to Interactive
|
|
760
|
+
- First Contentful Paint
|
|
761
|
+
|
|
762
|
+
### 8.3 Vercel Analytics
|
|
763
|
+
|
|
764
|
+
**Built-in Web Vitals**
|
|
765
|
+
```typescript
|
|
766
|
+
// app/layout.tsx
|
|
767
|
+
import { Analytics } from '@vercel/analytics/react';
|
|
768
|
+
import { SpeedInsights } from '@vercel/speed-insights/next';
|
|
769
|
+
|
|
770
|
+
export default function RootLayout({ children }) {
|
|
771
|
+
return (
|
|
772
|
+
<html>
|
|
773
|
+
<body>
|
|
774
|
+
{children}
|
|
775
|
+
<Analytics />
|
|
776
|
+
<SpeedInsights />
|
|
777
|
+
</body>
|
|
778
|
+
</html>
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
---
|
|
784
|
+
|
|
785
|
+
## 9. Security Considerations
|
|
786
|
+
|
|
787
|
+
### 9.1 Content Security Policy (CSP)
|
|
788
|
+
|
|
789
|
+
```typescript
|
|
790
|
+
// next.config.js
|
|
791
|
+
const cspHeader = `
|
|
792
|
+
default-src 'self';
|
|
793
|
+
script-src 'self' 'unsafe-eval' 'unsafe-inline' https://www.googletagmanager.com;
|
|
794
|
+
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
|
|
795
|
+
img-src 'self' blob: data: https:;
|
|
796
|
+
font-src 'self' https://fonts.gstatic.com;
|
|
797
|
+
connect-src 'self' https://www.google-analytics.com;
|
|
798
|
+
frame-ancestors 'none';
|
|
799
|
+
base-uri 'self';
|
|
800
|
+
form-action 'self';
|
|
801
|
+
`;
|
|
802
|
+
|
|
803
|
+
module.exports = {
|
|
804
|
+
async headers() {
|
|
805
|
+
return [
|
|
806
|
+
{
|
|
807
|
+
source: '/(.*)',
|
|
808
|
+
headers: [
|
|
809
|
+
{
|
|
810
|
+
key: 'Content-Security-Policy',
|
|
811
|
+
value: cspHeader.replace(/\n/g, ''),
|
|
812
|
+
},
|
|
813
|
+
],
|
|
814
|
+
},
|
|
815
|
+
];
|
|
816
|
+
},
|
|
817
|
+
};
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
### 9.2 Security Headers
|
|
821
|
+
|
|
822
|
+
```typescript
|
|
823
|
+
// next.config.js
|
|
824
|
+
module.exports = {
|
|
825
|
+
async headers() {
|
|
826
|
+
return [
|
|
827
|
+
{
|
|
828
|
+
source: '/(.*)',
|
|
829
|
+
headers: [
|
|
830
|
+
{
|
|
831
|
+
key: 'X-DNS-Prefetch-Control',
|
|
832
|
+
value: 'on',
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
key: 'Strict-Transport-Security',
|
|
836
|
+
value: 'max-age=63072000; includeSubDomains; preload',
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
key: 'X-Frame-Options',
|
|
840
|
+
value: 'DENY',
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
key: 'X-Content-Type-Options',
|
|
844
|
+
value: 'nosniff',
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
key: 'X-XSS-Protection',
|
|
848
|
+
value: '1; mode=block',
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
key: 'Referrer-Policy',
|
|
852
|
+
value: 'origin-when-cross-origin',
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
key: 'Permissions-Policy',
|
|
856
|
+
value: 'camera=(), microphone=(), geolocation=()',
|
|
857
|
+
},
|
|
858
|
+
],
|
|
859
|
+
},
|
|
860
|
+
];
|
|
861
|
+
},
|
|
862
|
+
};
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
### 9.3 Input Validation & Sanitization
|
|
866
|
+
|
|
867
|
+
**Email Validation**
|
|
868
|
+
```typescript
|
|
869
|
+
// lib/validation.ts
|
|
870
|
+
import { z } from 'zod';
|
|
871
|
+
|
|
872
|
+
export const emailSchema = z.string().email().min(5).max(255);
|
|
873
|
+
|
|
874
|
+
export function validateEmail(email: string): boolean {
|
|
875
|
+
try {
|
|
876
|
+
emailSchema.parse(email);
|
|
877
|
+
return true;
|
|
878
|
+
} catch {
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
```
|
|
883
|
+
|
|
884
|
+
**Form Sanitization**
|
|
885
|
+
```typescript
|
|
886
|
+
import DOMPurify from 'isomorphic-dompurify';
|
|
887
|
+
|
|
888
|
+
export function sanitizeInput(input: string): string {
|
|
889
|
+
return DOMPurify.sanitize(input, {
|
|
890
|
+
ALLOWED_TAGS: [],
|
|
891
|
+
ALLOWED_ATTR: [],
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### 9.4 Rate Limiting
|
|
897
|
+
|
|
898
|
+
**API Route Protection**
|
|
899
|
+
```typescript
|
|
900
|
+
// lib/rate-limit.ts
|
|
901
|
+
import { Ratelimit } from '@upstash/ratelimit';
|
|
902
|
+
import { Redis } from '@upstash/redis';
|
|
903
|
+
|
|
904
|
+
const redis = new Redis({
|
|
905
|
+
url: process.env.UPSTASH_REDIS_URL,
|
|
906
|
+
token: process.env.UPSTASH_REDIS_TOKEN,
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
export const ratelimit = new Ratelimit({
|
|
910
|
+
redis,
|
|
911
|
+
limiter: Ratelimit.slidingWindow(10, '10 s'), // 10 requests per 10 seconds
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
// Usage in API route
|
|
915
|
+
export async function POST(request: Request) {
|
|
916
|
+
const ip = request.headers.get('x-forwarded-for') ?? 'anonymous';
|
|
917
|
+
const { success } = await ratelimit.limit(ip);
|
|
918
|
+
|
|
919
|
+
if (!success) {
|
|
920
|
+
return new Response('Too many requests', { status: 429 });
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
// Process request
|
|
924
|
+
}
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
---
|
|
928
|
+
|
|
929
|
+
## 10. Error Handling
|
|
930
|
+
|
|
931
|
+
### 10.1 Error Boundaries
|
|
932
|
+
|
|
933
|
+
**Global Error Boundary**
|
|
934
|
+
```typescript
|
|
935
|
+
// app/error.tsx
|
|
936
|
+
'use client'
|
|
937
|
+
|
|
938
|
+
export default function Error({
|
|
939
|
+
error,
|
|
940
|
+
reset,
|
|
941
|
+
}: {
|
|
942
|
+
error: Error & { digest?: string };
|
|
943
|
+
reset: () => void;
|
|
944
|
+
}) {
|
|
945
|
+
return (
|
|
946
|
+
<div className="flex min-h-screen items-center justify-center">
|
|
947
|
+
<div className="text-center">
|
|
948
|
+
<h2 className="text-2xl font-bold">Something went wrong!</h2>
|
|
949
|
+
<p className="mt-2 text-muted-foreground">{error.message}</p>
|
|
950
|
+
<button
|
|
951
|
+
onClick={reset}
|
|
952
|
+
className="mt-4 rounded-lg bg-primary px-4 py-2 text-white"
|
|
953
|
+
>
|
|
954
|
+
Try again
|
|
955
|
+
</button>
|
|
956
|
+
</div>
|
|
957
|
+
</div>
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
**Not Found Page**
|
|
963
|
+
```typescript
|
|
964
|
+
// app/not-found.tsx
|
|
965
|
+
export default function NotFound() {
|
|
966
|
+
return (
|
|
967
|
+
<div className="flex min-h-screen items-center justify-center">
|
|
968
|
+
<div className="text-center">
|
|
969
|
+
<h1 className="text-6xl font-bold">404</h1>
|
|
970
|
+
<p className="mt-4 text-xl">Page not found</p>
|
|
971
|
+
<a href="/" className="mt-4 inline-block text-primary underline">
|
|
972
|
+
Return home
|
|
973
|
+
</a>
|
|
974
|
+
</div>
|
|
975
|
+
</div>
|
|
976
|
+
);
|
|
977
|
+
}
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
### 10.2 API Error Responses
|
|
981
|
+
|
|
982
|
+
**Standardized Error Format**
|
|
983
|
+
```typescript
|
|
984
|
+
interface APIError {
|
|
985
|
+
success: false;
|
|
986
|
+
error: {
|
|
987
|
+
code: string;
|
|
988
|
+
message: string;
|
|
989
|
+
details?: any;
|
|
990
|
+
};
|
|
991
|
+
timestamp: string;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
export function createErrorResponse(
|
|
995
|
+
code: string,
|
|
996
|
+
message: string,
|
|
997
|
+
status: number,
|
|
998
|
+
details?: any
|
|
999
|
+
): Response {
|
|
1000
|
+
const error: APIError = {
|
|
1001
|
+
success: false,
|
|
1002
|
+
error: { code, message, details },
|
|
1003
|
+
timestamp: new Date().toISOString(),
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
return new Response(JSON.stringify(error), {
|
|
1007
|
+
status,
|
|
1008
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
---
|
|
1014
|
+
|
|
1015
|
+
## 11. Testing Strategy
|
|
1016
|
+
|
|
1017
|
+
### 11.1 Unit Testing
|
|
1018
|
+
|
|
1019
|
+
**Framework**: Vitest + React Testing Library
|
|
1020
|
+
|
|
1021
|
+
```typescript
|
|
1022
|
+
// components/landing/__tests__/Hero.test.tsx
|
|
1023
|
+
import { render, screen } from '@testing-library/react';
|
|
1024
|
+
import { Hero } from '../Hero';
|
|
1025
|
+
|
|
1026
|
+
describe('Hero Component', () => {
|
|
1027
|
+
it('renders headline correctly', () => {
|
|
1028
|
+
render(<Hero />);
|
|
1029
|
+
expect(screen.getByRole('heading', { level: 1 })).toBeInTheDocument();
|
|
1030
|
+
});
|
|
1031
|
+
|
|
1032
|
+
it('displays both CTA buttons', () => {
|
|
1033
|
+
render(<Hero />);
|
|
1034
|
+
expect(screen.getByText('Get Started Free')).toBeInTheDocument();
|
|
1035
|
+
expect(screen.getByText('View Documentation')).toBeInTheDocument();
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
### 11.2 Integration Testing
|
|
1041
|
+
|
|
1042
|
+
**API Route Testing**
|
|
1043
|
+
```typescript
|
|
1044
|
+
// app/api/newsletter/__tests__/subscribe.test.ts
|
|
1045
|
+
import { POST } from '../route';
|
|
1046
|
+
|
|
1047
|
+
describe('Newsletter Subscription API', () => {
|
|
1048
|
+
it('accepts valid email', async () => {
|
|
1049
|
+
const request = new Request('http://localhost:3000/api/newsletter', {
|
|
1050
|
+
method: 'POST',
|
|
1051
|
+
body: JSON.stringify({ email: 'test@example.com' }),
|
|
1052
|
+
});
|
|
1053
|
+
|
|
1054
|
+
const response = await POST(request);
|
|
1055
|
+
const data = await response.json();
|
|
1056
|
+
|
|
1057
|
+
expect(response.status).toBe(200);
|
|
1058
|
+
expect(data.success).toBe(true);
|
|
1059
|
+
});
|
|
1060
|
+
|
|
1061
|
+
it('rejects invalid email', async () => {
|
|
1062
|
+
const request = new Request('http://localhost:3000/api/newsletter', {
|
|
1063
|
+
method: 'POST',
|
|
1064
|
+
body: JSON.stringify({ email: 'invalid-email' }),
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
const response = await POST(request);
|
|
1068
|
+
expect(response.status).toBe(400);
|
|
1069
|
+
});
|
|
1070
|
+
});
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
### 11.3 E2E Testing
|
|
1074
|
+
|
|
1075
|
+
**Framework**: Playwright
|
|
1076
|
+
|
|
1077
|
+
```typescript
|
|
1078
|
+
// e2e/landing.spec.ts
|
|
1079
|
+
import { test, expect } from '@playwright/test';
|
|
1080
|
+
|
|
1081
|
+
test.describe('Landing Page', () => {
|
|
1082
|
+
test('should load successfully', async ({ page }) => {
|
|
1083
|
+
await page.goto('/');
|
|
1084
|
+
await expect(page).toHaveTitle(/Agentic SDLC/);
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
test('should navigate to documentation on CTA click', async ({ page }) => {
|
|
1088
|
+
await page.goto('/');
|
|
1089
|
+
await page.click('text=View Documentation');
|
|
1090
|
+
await expect(page).toHaveURL(/\/docs/);
|
|
1091
|
+
});
|
|
1092
|
+
|
|
1093
|
+
test('should toggle theme', async ({ page }) => {
|
|
1094
|
+
await page.goto('/');
|
|
1095
|
+
const themeToggle = page.locator('[aria-label="Toggle theme"]');
|
|
1096
|
+
await themeToggle.click();
|
|
1097
|
+
|
|
1098
|
+
const html = page.locator('html');
|
|
1099
|
+
await expect(html).toHaveAttribute('data-theme', 'dark');
|
|
1100
|
+
});
|
|
1101
|
+
});
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
### 11.4 Performance Testing
|
|
1105
|
+
|
|
1106
|
+
**Lighthouse CI**
|
|
1107
|
+
```yaml
|
|
1108
|
+
# .github/workflows/lighthouse.yml
|
|
1109
|
+
name: Lighthouse CI
|
|
1110
|
+
on: [push]
|
|
1111
|
+
jobs:
|
|
1112
|
+
lighthouse:
|
|
1113
|
+
runs-on: ubuntu-latest
|
|
1114
|
+
steps:
|
|
1115
|
+
- uses: actions/checkout@v3
|
|
1116
|
+
- uses: actions/setup-node@v3
|
|
1117
|
+
- run: npm ci
|
|
1118
|
+
- run: npm run build
|
|
1119
|
+
- run: npm run start &
|
|
1120
|
+
- uses: treosh/lighthouse-ci-action@v9
|
|
1121
|
+
with:
|
|
1122
|
+
urls: |
|
|
1123
|
+
http://localhost:3000
|
|
1124
|
+
uploadArtifacts: true
|
|
1125
|
+
temporaryPublicStorage: true
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
---
|
|
1129
|
+
|
|
1130
|
+
## 12. Deployment Architecture
|
|
1131
|
+
|
|
1132
|
+
### 12.1 Vercel Deployment
|
|
1133
|
+
|
|
1134
|
+
**Configuration**
|
|
1135
|
+
```json
|
|
1136
|
+
// vercel.json
|
|
1137
|
+
{
|
|
1138
|
+
"buildCommand": "npm run build",
|
|
1139
|
+
"devCommand": "npm run dev",
|
|
1140
|
+
"installCommand": "npm install",
|
|
1141
|
+
"framework": "nextjs",
|
|
1142
|
+
"regions": ["iad1", "sfo1"],
|
|
1143
|
+
"headers": [
|
|
1144
|
+
{
|
|
1145
|
+
"source": "/(.*)",
|
|
1146
|
+
"headers": [
|
|
1147
|
+
{
|
|
1148
|
+
"key": "X-Content-Type-Options",
|
|
1149
|
+
"value": "nosniff"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"key": "X-Frame-Options",
|
|
1153
|
+
"value": "DENY"
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
}
|
|
1157
|
+
]
|
|
1158
|
+
}
|
|
1159
|
+
```
|
|
1160
|
+
|
|
1161
|
+
**Environment Variables**
|
|
1162
|
+
```
|
|
1163
|
+
# .env.local
|
|
1164
|
+
NEXT_PUBLIC_SITE_URL=https://agentic-sdlc.com
|
|
1165
|
+
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
|
|
1166
|
+
|
|
1167
|
+
# Server-only
|
|
1168
|
+
RESEND_API_KEY=re_xxxxx
|
|
1169
|
+
UPSTASH_REDIS_URL=https://xxxxx
|
|
1170
|
+
UPSTASH_REDIS_TOKEN=xxxxx
|
|
1171
|
+
```
|
|
1172
|
+
|
|
1173
|
+
### 12.2 CI/CD Pipeline
|
|
1174
|
+
|
|
1175
|
+
**GitHub Actions Workflow**
|
|
1176
|
+
```yaml
|
|
1177
|
+
# .github/workflows/deploy.yml
|
|
1178
|
+
name: Deploy to Production
|
|
1179
|
+
|
|
1180
|
+
on:
|
|
1181
|
+
push:
|
|
1182
|
+
branches: [main]
|
|
1183
|
+
|
|
1184
|
+
jobs:
|
|
1185
|
+
deploy:
|
|
1186
|
+
runs-on: ubuntu-latest
|
|
1187
|
+
steps:
|
|
1188
|
+
- uses: actions/checkout@v3
|
|
1189
|
+
|
|
1190
|
+
- name: Setup Node.js
|
|
1191
|
+
uses: actions/setup-node@v3
|
|
1192
|
+
with:
|
|
1193
|
+
node-version: '20'
|
|
1194
|
+
cache: 'npm'
|
|
1195
|
+
|
|
1196
|
+
- name: Install dependencies
|
|
1197
|
+
run: npm ci
|
|
1198
|
+
|
|
1199
|
+
- name: Run linter
|
|
1200
|
+
run: npm run lint
|
|
1201
|
+
|
|
1202
|
+
- name: Run type check
|
|
1203
|
+
run: npm run type-check
|
|
1204
|
+
|
|
1205
|
+
- name: Run tests
|
|
1206
|
+
run: npm run test
|
|
1207
|
+
|
|
1208
|
+
- name: Build
|
|
1209
|
+
run: npm run build
|
|
1210
|
+
|
|
1211
|
+
- name: Deploy to Vercel
|
|
1212
|
+
uses: amondnet/vercel-action@v25
|
|
1213
|
+
with:
|
|
1214
|
+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
|
1215
|
+
vercel-org-id: ${{ secrets.ORG_ID }}
|
|
1216
|
+
vercel-project-id: ${{ secrets.PROJECT_ID }}
|
|
1217
|
+
vercel-args: '--prod'
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
### 12.3 Preview Deployments
|
|
1221
|
+
|
|
1222
|
+
- Automatic preview for every PR
|
|
1223
|
+
- Unique URL for each preview
|
|
1224
|
+
- Comment on PR with preview link
|
|
1225
|
+
- Lighthouse CI runs on preview
|
|
1226
|
+
|
|
1227
|
+
---
|
|
1228
|
+
|
|
1229
|
+
## 13. Monitoring & Observability
|
|
1230
|
+
|
|
1231
|
+
### 13.1 Performance Monitoring
|
|
1232
|
+
|
|
1233
|
+
**Vercel Analytics**
|
|
1234
|
+
- Real User Monitoring (RUM)
|
|
1235
|
+
- Core Web Vitals tracking
|
|
1236
|
+
- Geographic distribution
|
|
1237
|
+
- Device breakdown
|
|
1238
|
+
|
|
1239
|
+
**Custom Performance Metrics**
|
|
1240
|
+
```typescript
|
|
1241
|
+
// lib/performance.ts
|
|
1242
|
+
export function reportWebVitals(metric: any) {
|
|
1243
|
+
if (metric.label === 'web-vital') {
|
|
1244
|
+
// Send to analytics
|
|
1245
|
+
window.gtag('event', metric.name, {
|
|
1246
|
+
value: Math.round(metric.value),
|
|
1247
|
+
event_label: metric.id,
|
|
1248
|
+
non_interaction: true,
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
```
|
|
1253
|
+
|
|
1254
|
+
### 13.2 Error Tracking
|
|
1255
|
+
|
|
1256
|
+
**Sentry Integration** (Optional)
|
|
1257
|
+
```typescript
|
|
1258
|
+
// sentry.client.config.ts
|
|
1259
|
+
import * as Sentry from '@sentry/nextjs';
|
|
1260
|
+
|
|
1261
|
+
Sentry.init({
|
|
1262
|
+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
1263
|
+
tracesSampleRate: 0.1,
|
|
1264
|
+
environment: process.env.NODE_ENV,
|
|
1265
|
+
beforeSend(event, hint) {
|
|
1266
|
+
// Filter out non-critical errors
|
|
1267
|
+
if (event.exception) {
|
|
1268
|
+
// Custom filtering logic
|
|
1269
|
+
}
|
|
1270
|
+
return event;
|
|
1271
|
+
},
|
|
1272
|
+
});
|
|
1273
|
+
```
|
|
1274
|
+
|
|
1275
|
+
### 13.3 Uptime Monitoring
|
|
1276
|
+
|
|
1277
|
+
**Recommended Tools**
|
|
1278
|
+
- **Vercel Monitoring** - Built-in uptime checks
|
|
1279
|
+
- **UptimeRobot** - External monitoring
|
|
1280
|
+
- **Pingdom** - Advanced monitoring with alerts
|
|
1281
|
+
|
|
1282
|
+
---
|
|
1283
|
+
|
|
1284
|
+
## 14. Scalability Considerations
|
|
1285
|
+
|
|
1286
|
+
### 14.1 Traffic Handling
|
|
1287
|
+
|
|
1288
|
+
**Expected Load**
|
|
1289
|
+
- **Normal**: 1,000-5,000 concurrent users
|
|
1290
|
+
- **Peak**: 10,000+ concurrent users (product launch, HN front page)
|
|
1291
|
+
- **Geographic**: Global distribution
|
|
1292
|
+
|
|
1293
|
+
**Scaling Strategy**
|
|
1294
|
+
- Static pages served from CDN edge locations
|
|
1295
|
+
- No database queries for landing page (static content)
|
|
1296
|
+
- API routes scale automatically (serverless)
|
|
1297
|
+
- Rate limiting prevents abuse
|
|
1298
|
+
|
|
1299
|
+
### 14.2 CDN Strategy
|
|
1300
|
+
|
|
1301
|
+
**Vercel Edge Network**
|
|
1302
|
+
- 100+ edge locations globally
|
|
1303
|
+
- Automatic HTTPS
|
|
1304
|
+
- DDoS protection
|
|
1305
|
+
- Smart routing to nearest edge
|
|
1306
|
+
|
|
1307
|
+
**Cache Invalidation**
|
|
1308
|
+
- ISR handles automatic revalidation
|
|
1309
|
+
- Manual purge via Vercel API if needed
|
|
1310
|
+
- Versioned assets (automatic cache busting)
|
|
1311
|
+
|
|
1312
|
+
### 14.3 Database Considerations (Future)
|
|
1313
|
+
|
|
1314
|
+
**If Dynamic Content Needed**
|
|
1315
|
+
- **PostgreSQL** (Vercel Postgres, Supabase)
|
|
1316
|
+
- Testimonials management
|
|
1317
|
+
- Newsletter subscribers
|
|
1318
|
+
- Contact form submissions
|
|
1319
|
+
|
|
1320
|
+
- **Redis** (Upstash)
|
|
1321
|
+
- Rate limiting
|
|
1322
|
+
- Session storage
|
|
1323
|
+
- Real-time metrics
|
|
1324
|
+
|
|
1325
|
+
**Connection Pooling**
|
|
1326
|
+
```typescript
|
|
1327
|
+
// lib/db.ts
|
|
1328
|
+
import { Pool } from '@vercel/postgres';
|
|
1329
|
+
|
|
1330
|
+
const pool = new Pool({
|
|
1331
|
+
connectionString: process.env.POSTGRES_URL,
|
|
1332
|
+
max: 20, // Maximum connections
|
|
1333
|
+
idleTimeoutMillis: 30000,
|
|
1334
|
+
});
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
---
|
|
1338
|
+
|
|
1339
|
+
## 15. Development Workflow
|
|
1340
|
+
|
|
1341
|
+
### 15.1 Local Development
|
|
1342
|
+
|
|
1343
|
+
**Setup**
|
|
1344
|
+
```bash
|
|
1345
|
+
# Clone repository
|
|
1346
|
+
git clone https://github.com/org/agentic-sdlc-landing.git
|
|
1347
|
+
cd agentic-sdlc-landing
|
|
1348
|
+
|
|
1349
|
+
# Install dependencies
|
|
1350
|
+
npm install
|
|
1351
|
+
|
|
1352
|
+
# Copy environment variables
|
|
1353
|
+
cp .env.template .env.local
|
|
1354
|
+
|
|
1355
|
+
# Run development server
|
|
1356
|
+
npm run dev
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
**Available Scripts**
|
|
1360
|
+
```json
|
|
1361
|
+
{
|
|
1362
|
+
"scripts": {
|
|
1363
|
+
"dev": "next dev",
|
|
1364
|
+
"build": "next build",
|
|
1365
|
+
"start": "next start",
|
|
1366
|
+
"lint": "next lint",
|
|
1367
|
+
"type-check": "tsc --noEmit",
|
|
1368
|
+
"test": "vitest",
|
|
1369
|
+
"test:e2e": "playwright test",
|
|
1370
|
+
"format": "prettier --write ."
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
### 15.2 Code Quality
|
|
1376
|
+
|
|
1377
|
+
**ESLint Configuration**
|
|
1378
|
+
```javascript
|
|
1379
|
+
// .eslintrc.js
|
|
1380
|
+
module.exports = {
|
|
1381
|
+
extends: [
|
|
1382
|
+
'next/core-web-vitals',
|
|
1383
|
+
'plugin:@typescript-eslint/recommended',
|
|
1384
|
+
'prettier',
|
|
1385
|
+
],
|
|
1386
|
+
rules: {
|
|
1387
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
1388
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
1389
|
+
},
|
|
1390
|
+
};
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
**Prettier Configuration**
|
|
1394
|
+
```json
|
|
1395
|
+
{
|
|
1396
|
+
"semi": true,
|
|
1397
|
+
"trailingComma": "es5",
|
|
1398
|
+
"singleQuote": true,
|
|
1399
|
+
"printWidth": 100,
|
|
1400
|
+
"tabWidth": 2
|
|
1401
|
+
}
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
**Husky Pre-commit Hooks**
|
|
1405
|
+
```bash
|
|
1406
|
+
# .husky/pre-commit
|
|
1407
|
+
npm run lint
|
|
1408
|
+
npm run type-check
|
|
1409
|
+
npm run test
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
---
|
|
1413
|
+
|
|
1414
|
+
## 16. Documentation Requirements
|
|
1415
|
+
|
|
1416
|
+
### 16.1 Technical Documentation
|
|
1417
|
+
|
|
1418
|
+
**README.md**
|
|
1419
|
+
- Project overview
|
|
1420
|
+
- Setup instructions
|
|
1421
|
+
- Development workflow
|
|
1422
|
+
- Deployment process
|
|
1423
|
+
- Environment variables
|
|
1424
|
+
|
|
1425
|
+
**CONTRIBUTING.md**
|
|
1426
|
+
- Code style guidelines
|
|
1427
|
+
- Commit message conventions
|
|
1428
|
+
- PR process
|
|
1429
|
+
- Testing requirements
|
|
1430
|
+
|
|
1431
|
+
**API.md** (if applicable)
|
|
1432
|
+
- API endpoints documentation
|
|
1433
|
+
- Request/response examples
|
|
1434
|
+
- Error codes
|
|
1435
|
+
- Rate limits
|
|
1436
|
+
|
|
1437
|
+
### 16.2 Component Documentation
|
|
1438
|
+
|
|
1439
|
+
**Storybook** (Optional)
|
|
1440
|
+
```typescript
|
|
1441
|
+
// components/ui/Button.stories.tsx
|
|
1442
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
1443
|
+
import { Button } from './Button';
|
|
1444
|
+
|
|
1445
|
+
const meta: Meta<typeof Button> = {
|
|
1446
|
+
title: 'UI/Button',
|
|
1447
|
+
component: Button,
|
|
1448
|
+
tags: ['autodocs'],
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
export default meta;
|
|
1452
|
+
type Story = StoryObj<typeof Button>;
|
|
1453
|
+
|
|
1454
|
+
export const Primary: Story = {
|
|
1455
|
+
args: {
|
|
1456
|
+
variant: 'primary',
|
|
1457
|
+
children: 'Click me',
|
|
1458
|
+
},
|
|
1459
|
+
};
|
|
1460
|
+
```
|
|
1461
|
+
|
|
1462
|
+
---
|
|
1463
|
+
|
|
1464
|
+
## 17. Migration & Rollback Strategy
|
|
1465
|
+
|
|
1466
|
+
### 17.1 Deployment Strategy
|
|
1467
|
+
|
|
1468
|
+
**Blue-Green Deployment**
|
|
1469
|
+
- Deploy to new environment (green)
|
|
1470
|
+
- Test thoroughly
|
|
1471
|
+
- Switch traffic to green
|
|
1472
|
+
- Keep blue as fallback
|
|
1473
|
+
|
|
1474
|
+
**Canary Deployment**
|
|
1475
|
+
- Deploy to 10% of users
|
|
1476
|
+
- Monitor metrics
|
|
1477
|
+
- Gradually increase to 100%
|
|
1478
|
+
- Rollback if issues detected
|
|
1479
|
+
|
|
1480
|
+
### 17.2 Rollback Procedure
|
|
1481
|
+
|
|
1482
|
+
**Vercel Rollback**
|
|
1483
|
+
```bash
|
|
1484
|
+
# List deployments
|
|
1485
|
+
vercel ls
|
|
1486
|
+
|
|
1487
|
+
# Promote previous deployment
|
|
1488
|
+
vercel promote <deployment-url>
|
|
1489
|
+
```
|
|
1490
|
+
|
|
1491
|
+
**Automatic Rollback Triggers**
|
|
1492
|
+
- Error rate > 5%
|
|
1493
|
+
- Core Web Vitals degradation > 20%
|
|
1494
|
+
- 5xx errors > 1%
|
|
1495
|
+
|
|
1496
|
+
---
|
|
1497
|
+
|
|
1498
|
+
## 18. Cost Estimation
|
|
1499
|
+
|
|
1500
|
+
### 18.1 Infrastructure Costs (Monthly)
|
|
1501
|
+
|
|
1502
|
+
**Vercel Pro Plan**: $20/month
|
|
1503
|
+
- Unlimited bandwidth
|
|
1504
|
+
- Advanced analytics
|
|
1505
|
+
- Team collaboration
|
|
1506
|
+
- Preview deployments
|
|
1507
|
+
|
|
1508
|
+
**Optional Services**
|
|
1509
|
+
- **Upstash Redis**: $0-10/month (pay-as-you-go)
|
|
1510
|
+
- **Resend Email**: $0-20/month (based on volume)
|
|
1511
|
+
- **Sentry**: $0-26/month (error tracking)
|
|
1512
|
+
- **Domain**: $10-15/year
|
|
1513
|
+
|
|
1514
|
+
**Total Estimated Cost**: $20-50/month
|
|
1515
|
+
|
|
1516
|
+
### 18.2 Scaling Costs
|
|
1517
|
+
|
|
1518
|
+
**Traffic Scenarios**
|
|
1519
|
+
- **10K visitors/month**: $20/month (Vercel Pro)
|
|
1520
|
+
- **100K visitors/month**: $20/month (still within limits)
|
|
1521
|
+
- **1M visitors/month**: $20-100/month (may need Enterprise)
|
|
1522
|
+
|
|
1523
|
+
---
|
|
1524
|
+
|
|
1525
|
+
## 19. Success Criteria
|
|
1526
|
+
|
|
1527
|
+
### 19.1 Technical Metrics
|
|
1528
|
+
|
|
1529
|
+
- ✅ **Lighthouse Score**: 90+ across all categories
|
|
1530
|
+
- ✅ **LCP**: < 2.5 seconds
|
|
1531
|
+
- ✅ **FID**: < 100ms
|
|
1532
|
+
- ✅ **CLS**: < 0.1
|
|
1533
|
+
- ✅ **TTI**: < 3.8 seconds
|
|
1534
|
+
- ✅ **Bundle Size**: < 200KB initial JS
|
|
1535
|
+
- ✅ **Accessibility**: WCAG 2.1 AA compliant (0 critical issues)
|
|
1536
|
+
|
|
1537
|
+
### 19.2 Business Metrics
|
|
1538
|
+
|
|
1539
|
+
- ✅ **Conversion Rate**: 5%+ (visitor to signup/docs)
|
|
1540
|
+
- ✅ **Bounce Rate**: < 40%
|
|
1541
|
+
- ✅ **Avg. Session Duration**: 90+ seconds
|
|
1542
|
+
- ✅ **Scroll Depth**: 60%+ users reach features section
|
|
1543
|
+
|
|
1544
|
+
### 19.3 Operational Metrics
|
|
1545
|
+
|
|
1546
|
+
- ✅ **Uptime**: 99.9%+
|
|
1547
|
+
- ✅ **Error Rate**: < 0.1%
|
|
1548
|
+
- ✅ **API Response Time**: < 200ms (p95)
|
|
1549
|
+
- ✅ **Build Time**: < 2 minutes
|
|
1550
|
+
- ✅ **Deploy Time**: < 1 minute
|
|
1551
|
+
|
|
1552
|
+
---
|
|
1553
|
+
|
|
1554
|
+
## 20. Future Enhancements
|
|
1555
|
+
|
|
1556
|
+
### 20.1 Phase 2 Features
|
|
1557
|
+
|
|
1558
|
+
1. **Interactive Demo**
|
|
1559
|
+
- Live code playground
|
|
1560
|
+
- Interactive tutorial
|
|
1561
|
+
- Sandbox environment
|
|
1562
|
+
|
|
1563
|
+
2. **Personalization**
|
|
1564
|
+
- Dynamic content based on referrer
|
|
1565
|
+
- A/B testing framework
|
|
1566
|
+
- User segmentation
|
|
1567
|
+
|
|
1568
|
+
3. **Advanced Analytics**
|
|
1569
|
+
- Heatmaps (Hotjar, Microsoft Clarity)
|
|
1570
|
+
- Session recordings
|
|
1571
|
+
- Funnel analysis
|
|
1572
|
+
|
|
1573
|
+
4. **Content Management**
|
|
1574
|
+
- Headless CMS integration (Sanity, Contentful)
|
|
1575
|
+
- Admin dashboard for testimonials/metrics
|
|
1576
|
+
- Multi-language support (i18n)
|
|
1577
|
+
|
|
1578
|
+
### 20.2 Technical Improvements
|
|
1579
|
+
|
|
1580
|
+
1. **Progressive Web App (PWA)**
|
|
1581
|
+
- Service worker
|
|
1582
|
+
- Offline support
|
|
1583
|
+
- Install prompt
|
|
1584
|
+
|
|
1585
|
+
2. **Advanced Caching**
|
|
1586
|
+
- Service worker caching
|
|
1587
|
+
- IndexedDB for offline data
|
|
1588
|
+
- Background sync
|
|
1589
|
+
|
|
1590
|
+
3. **Real-time Features**
|
|
1591
|
+
- Live visitor count
|
|
1592
|
+
- Real-time metrics updates
|
|
1593
|
+
- WebSocket integration
|
|
1594
|
+
|
|
1595
|
+
---
|
|
1596
|
+
|
|
1597
|
+
## 21. Dependencies & Integrations
|
|
1598
|
+
|
|
1599
|
+
### 21.1 Core Dependencies
|
|
1600
|
+
|
|
1601
|
+
```json
|
|
1602
|
+
{
|
|
1603
|
+
"dependencies": {
|
|
1604
|
+
"next": "^14.2.0",
|
|
1605
|
+
"react": "^18.3.0",
|
|
1606
|
+
"react-dom": "^18.3.0",
|
|
1607
|
+
"typescript": "^5.4.0",
|
|
1608
|
+
"@radix-ui/react-*": "^1.0.0",
|
|
1609
|
+
"tailwindcss": "^3.4.0",
|
|
1610
|
+
"framer-motion": "^11.0.0",
|
|
1611
|
+
"lucide-react": "^0.index.html",
|
|
1612
|
+
"class-variance-authority": "^0.7.0",
|
|
1613
|
+
"clsx": "^2.1.0",
|
|
1614
|
+
"tailwind-merge": "^2.2.0"
|
|
1615
|
+
},
|
|
1616
|
+
"devDependencies": {
|
|
1617
|
+
"@types/node": "^20.0.0",
|
|
1618
|
+
"@types/react": "^18.3.0",
|
|
1619
|
+
"eslint": "^8.57.0",
|
|
1620
|
+
"eslint-config-next": "^14.2.0",
|
|
1621
|
+
"prettier": "^3.2.0",
|
|
1622
|
+
"vitest": "^1.4.0",
|
|
1623
|
+
"@testing-library/react": "^14.2.0",
|
|
1624
|
+
"@playwright/test": "^1.42.0"
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
```
|
|
1628
|
+
|
|
1629
|
+
### 21.2 External Services
|
|
1630
|
+
|
|
1631
|
+
**Required**
|
|
1632
|
+
- Vercel (hosting)
|
|
1633
|
+
- Google Fonts (typography)
|
|
1634
|
+
|
|
1635
|
+
**Optional**
|
|
1636
|
+
- Google Analytics 4 (analytics)
|
|
1637
|
+
- Resend (email)
|
|
1638
|
+
- Upstash Redis (rate limiting)
|
|
1639
|
+
- Sentry (error tracking)
|
|
1640
|
+
|
|
1641
|
+
---
|
|
1642
|
+
|
|
1643
|
+
## 22. Handoff & Next Steps
|
|
1644
|
+
|
|
1645
|
+
### 22.1 Backend Deliverables
|
|
1646
|
+
|
|
1647
|
+
✅ **Completed**
|
|
1648
|
+
- System architecture design
|
|
1649
|
+
- Data models and API specifications
|
|
1650
|
+
- Rendering strategy (SSG + ISR)
|
|
1651
|
+
- Performance optimization plan
|
|
1652
|
+
- Security implementation
|
|
1653
|
+
- Analytics and tracking setup
|
|
1654
|
+
- Deployment architecture
|
|
1655
|
+
- Testing strategy
|
|
1656
|
+
|
|
1657
|
+
### 22.2 Implementation Checklist
|
|
1658
|
+
|
|
1659
|
+
**Phase 1: Foundation** (Week 1)
|
|
1660
|
+
- [ ] Initialize Next.js project
|
|
1661
|
+
- [ ] Setup Tailwind CSS + shadcn/ui
|
|
1662
|
+
- [ ] Configure TypeScript
|
|
1663
|
+
- [ ] Setup ESLint + Prettier
|
|
1664
|
+
- [ ] Create design tokens (CSS variables)
|
|
1665
|
+
- [ ] Setup Git repository
|
|
1666
|
+
|
|
1667
|
+
**Phase 2: Core Components** (Week 2)
|
|
1668
|
+
- [ ] Implement shadcn/ui base components
|
|
1669
|
+
- [ ] Build custom components (GradientText, AnimatedCounter, etc.)
|
|
1670
|
+
- [ ] Create layout components (Navigation, Footer)
|
|
1671
|
+
- [ ] Implement theme toggle (dark mode)
|
|
1672
|
+
|
|
1673
|
+
**Phase 3: Landing Page Sections** (Week 3)
|
|
1674
|
+
- [ ] Hero section
|
|
1675
|
+
- [ ] Features section
|
|
1676
|
+
- [ ] Social proof section
|
|
1677
|
+
- [ ] Testimonials section
|
|
1678
|
+
- [ ] CTA section
|
|
1679
|
+
- [ ] Footer
|
|
1680
|
+
|
|
1681
|
+
**Phase 4: Optimization** (Week 4)
|
|
1682
|
+
- [ ] Image optimization
|
|
1683
|
+
- [ ] Font optimization
|
|
1684
|
+
- [ ] Code splitting
|
|
1685
|
+
- [ ] SEO implementation (metadata, structured data)
|
|
1686
|
+
- [ ] Analytics integration
|
|
1687
|
+
- [ ] Accessibility audit
|
|
1688
|
+
|
|
1689
|
+
**Phase 5: Testing & Deployment** (Week 5)
|
|
1690
|
+
- [ ] Unit tests
|
|
1691
|
+
- [ ] Integration tests
|
|
1692
|
+
- [ ] E2E tests
|
|
1693
|
+
- [ ] Performance testing (Lighthouse)
|
|
1694
|
+
- [ ] Security headers
|
|
1695
|
+
- [ ] Deploy to Vercel
|
|
1696
|
+
- [ ] Setup CI/CD pipeline
|
|
1697
|
+
|
|
1698
|
+
### 22.3 Required Coordination
|
|
1699
|
+
|
|
1700
|
+
**With @UIUX**
|
|
1701
|
+
- Confirm design token values
|
|
1702
|
+
- Review component implementations
|
|
1703
|
+
- Validate responsive behavior
|
|
1704
|
+
- Approve final visual design
|
|
1705
|
+
|
|
1706
|
+
**With @QA**
|
|
1707
|
+
- Accessibility testing
|
|
1708
|
+
- Cross-browser testing
|
|
1709
|
+
- Performance validation
|
|
1710
|
+
- Security testing
|
|
1711
|
+
|
|
1712
|
+
**With @DEVOPS**
|
|
1713
|
+
- Deployment configuration
|
|
1714
|
+
- Environment variables
|
|
1715
|
+
- Monitoring setup
|
|
1716
|
+
- CI/CD pipeline
|
|
1717
|
+
|
|
1718
|
+
---
|
|
1719
|
+
|
|
1720
|
+
## Next Step
|
|
1721
|
+
|
|
1722
|
+
### Handoff to Development & QA Teams
|
|
1723
|
+
|
|
1724
|
+
- **@UIUX** - Please review backend architecture and confirm alignment with UI/UX design specification
|
|
1725
|
+
- **@QA** - Please review technical design for testability, identify test scenarios, and prepare test plan
|
|
1726
|
+
- **@SECA** - Please conduct security review of architecture, API design, and data handling
|
|
1727
|
+
- **@DEV** - Once approved, please begin implementation following both UI/UX and Backend specifications
|
|
1728
|
+
|
|
1729
|
+
### Status
|
|
1730
|
+
✅ **Ready for Technical Review**
|
|
1731
|
+
|
|
1732
|
+
---
|
|
1733
|
+
|
|
1734
|
+
#designing #backend-architecture #system-design #landing-page #nextjs #sprint-5
|