EstateHub

Frontend Hosting

Deploy this app after the backend has a stable HTTPS URL. Vercel is one example; any host that supports this Next.js version and its server runtime may work. This guide does not deploy Django, PostgreSQL, or storage.

1. Import the frontend

Import the repository into your host and set its root directory to frontend/. Install dependencies using the package manager and lockfile selected for your release, then use the existing build and start scripts. See Vercel's monorepo guide for root-directory setup.

2. Set environment variables before building

VariableExamplePurpose
NEXT_PUBLIC_API_BASE_URLhttps://api.example.com/api/v1Backend REST base; the included frontend example points to a development /api/v2 URL, so replace it.
NEXT_PUBLIC_SITE_URLhttps://app.example.comCanonical URLs, metadata, and sitemap.
NEXT_PUBLIC_WS_BASE_URLwss://api.example.comOptional override for WebSockets when it cannot be derived from the API host.

NEXT_PUBLIC_* values are included in the browser build. Changing them requires a new deployment, not just a runtime variable update. Select the production environment for production variables; use separate values for preview environments. See Vercel environment variables.

3. Connect the domains

Attach the frontend domain and confirm HTTPS. In Django, set the frontend origin in CORS_ALLOWED_ORIGINS and CSRF_TRUSTED_ORIGINS, set EMAIL_FRONTEND_URL, and ensure PUBLIC_API_BASE_URL points to the backend. Set ALLOWED_HOSTS to the backend hostname, not the frontend URL. Do not use permissive CORS in production.

4. Verify the site

Open the site and test a page that calls the API, sign-in, and any chat uploads or WebSockets you enabled. Chat uploads use the backend-managed Storage integration, not Vercel Cloudinary credentials. Check the browser network requests: they must target the production /api/v1 endpoint over HTTPS. If they still point to the development /api/v2 host, update the build-time variable and redeploy.

For a full release checklist, return to Production Deployment.