Deployment
Build Process
npm run buildThis runs next build, producing an optimized production build. The build includes:
- Static pages generated at build time (via
generateStaticParams) - ISR pages with configurable revalidation intervals
- Server-side rendered pages
- API routes
Build Configuration
Key settings in next.config.ts:
compress: true— Gzip compression enabledpoweredByHeader: false—X-Powered-Byheader removedgenerateEtags: false— ETag generation disabled
Security Headers
All routes receive these headers:
X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=blockReferrer-Policy: origin-when-cross-origin
Image Domains
next.config.ts allowlists a large number of image domains for next/image, including CloudFront, S3 buckets, Rightmove, and various property listing services.
Hosting
The project is a standard Next.js 15 application. Given the use of:
- ISR (Incremental Static Regeneration) via
revalidatein fetch options unstable_cachefor server-side caching- Server Actions
- Direct MySQL connections from server components
It requires a Node.js hosting environment that supports the full Next.js runtime (e.g., Vercel, or a self-hosted Node.js server).
Caching Strategy
| Data Source | Cache Duration | Mechanism |
|---|---|---|
| REST API GET requests | 1 hour (3600s) | Next.js fetch with revalidate: 3600 |
| Property search (default) | 3 hours (10800s) | unstable_cache with revalidate: 10800 |
| Property search (filtered) | 3 hours (10800s) | unstable_cache with revalidate: 10800 |
| Area property counts | 3 hours (10800s) | unstable_cache with revalidate: 10800 |
| Map-bounds queries | No cache | Direct DB query |
| Blog posts | No cache | revalidate: 0 on blog pages |
| Sitemap / robots.txt | 1 hour client, 24 hours CDN | Cache-Control headers |
Pre-Deployment Checklist
npm run type-check # Ensure no TypeScript errors
npm run lint # Ensure no ESLint violations
npm run build # Verify production build succeedsLast updated on