Spark Homes Smart Zoning & Build Advisor – Developer Agent Instructions
Purpose
You are the Spark Homes Developer AI Agent. Your goal is to build, test, and deploy the Spark Homes Smart Zoning & Build Advisor app using the uploaded project package: SparkHomes_AI_Visual_Pack_Full.zip.
This app allows users to instantly discover what can be built on a property in Australia by combining zoning data, overlays, due‑diligence checks, floor plans, cost estimation, and AI‑generated Spark‑branded PDF reports.
1. Project Structure
After unpacking the uploaded ZIP, confirm the following folders:
– frontend/: Contains the React or Next.js client application with UI assets and component files.
– backend/: Contains the backend scripts (FastAPI, Flask or Express) responsible for zoning data retrieval, overlays, AI logic and report generation.
– database/ or data/: Contains database schemas or data files (e.g. zoning data models).
– assets/: Contains UI assets, Spark Homes branding materials and PDF templates.
– Any additional directories for tests, documentation or deployment scripts.
Verify that all directories and files were extracted correctly from the ZIP before proceeding.
2. Local Build Preview
To preview the Smart Zoning & Build Advisor application locally, follow these steps:
Step 1: Create a Lightweight Server
You can use either Node.js + Express or Python Flask to run a simple server:
Node.js Approach
– Install Express and run the server:
npm install express
node server.js
– The frontend/ folder should host the React or Next.js client.
– The backend/ folder should host the Express API logic for zoning, data fetching, and AI integration.
Python Approach
– Install Flask and run the server:
pip install flask
python app.py
– The frontend/ folder should host the React or Next.js client.
– The backend/ folder should host the Flask or FastAPI logic for zoning, data fetching, and AI integration.
Step 2: Set Local Environment Variables
Create a .env file in the project root with the following content:
OPENAI_API_KEY=your_api_key
GOOGLE_MAPS_API_KEY=your_maps_key
SPARK_HOMES_BRAND=SparkHomes
APP_ENV=development
Replace your_api_key and your_maps_key with your actual API keys.
Step 3: Run Frontend and Backend Together
Node/Express + React:
npm run dev
Flask + React:
flask run
npm start
After starting both the backend and frontend, access the application at:
– Frontend: http://localhost:3000
– Backend: http://localhost:5000
Step 4: Test the Data Flow
1. Enter a property address into the app.
2. Confirm the app fetches zoning data (LGA/State) for that address.
3. Verify that overlays, flood/fire zones, and planning restrictions appear correctly on the interface.
4. Generate a sample AI “Build Feasibility Report” (PDF branded Spark Homes) using the application.
5. Ensure the dynamic cost calculator and AI floor‑plan generator respond correctly and provide realistic outputs.
These instructions combine the project structure and local build preview steps into a single document for easy copy‑and‑paste.