Skip to Content
Housr WebappDeployment

Deployment

Build Process

npm run build

This 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 enabled
  • poweredByHeader: falseX-Powered-By header removed
  • generateEtags: false — ETag generation disabled

Security Headers

All routes receive these headers:

  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY
  • X-XSS-Protection: 1; mode=block
  • Referrer-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 revalidate in fetch options
  • unstable_cache for 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 SourceCache DurationMechanism
REST API GET requests1 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 counts3 hours (10800s)unstable_cache with revalidate: 10800
Map-bounds queriesNo cacheDirect DB query
Blog postsNo cacherevalidate: 0 on blog pages
Sitemap / robots.txt1 hour client, 24 hours CDNCache-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 succeeds
Last updated on