AI-powered delivery market zone analyzer — React Edition
Instantly score any city's zones for food delivery, grocery delivery, ride booking/sharing, and courier delivery launch potential.
Enter City & Zones → Collect Market Signals → AI Scores Zones → Launch Recommendations
Enter a country, city, and list of zones/areas — the tool returns a zone-by-zone market score (35–96) for four delivery verticals, a recommended launch sequence, risk levels, and vendor/rider targets.
Works without any API keys. Signal-estimation mode uses geographic math to estimate scores. Add OpenAI and Geoapify keys in Settings for AI-powered analysis with real local market data.
┌─────────────────────────────────────────────────────────────────┐
│ Enatega Zone AI — Flow │
├──────────────┬──────────────────┬───────────────┬──────────────┤
│ 1. INPUT │ 2. SIGNALS │ 3. ANALYSIS │ 4. OUTPUT │
│ │ │ │ │
│ Country │ Geoapify Places │ OpenAI GPT │ Score/100 │
│ City │ ─ Restaurants │ ─ Scoring │ Potential │
│ Zones[] │ ─ Grocery │ ─ Verticals │ Best Fit │
│ │ ─ Transport │ ─ Risk Level │ Sequence │
│ │ ─ Commercial │ │ Targets │
│ │ │ ── OR ── │ │
│ │ (optional) │ Signal Math │ Recs │
└──────────────┴──────────────────┴───────────────┴──────────────┘
| Mode | Keys Required | Data Source | Best For |
|---|---|---|---|
| AI + Signals | OpenAI + Geoapify | Real places data + GPT | Production use |
| AI only | OpenAI | AI market estimation | Quick AI insights |
| Signal only | Geoapify | Real places, formula scoring | No AI cost |
| Estimation | None | Formula-based | Demo / testing |
- Node.js ≥ 18.x (download)
- npm ≥ 9.x (comes with Node)
- Git
git clone https://github.com/your-org/enatega-zone-potential-ai.git
cd enatega-zone-potential-ainpm installnpm run devThe app opens at http://localhost:5173 automatically.
Click the ⚙ Settings button in the top-right corner of the app.
┌────────────────────────────────────────────┐
│ Settings Panel │
│ ──────────────────────────────────────── │
│ Analysis Mode: [AI (OpenAI) ▼] │
│ OpenAI Key: [sk-... ] │
│ OpenAI Model: [gpt-4o-mini ] │
│ Geoapify Key: [optional ] │
│ CTA URL: [https://... ] │
│ CTA Label: [Book a Call ] │
│ [ Save ] │
└────────────────────────────────────────────┘
⚠️ Security: Keys are stored only in your browser's localStorage. They are sent directly to OpenAI / Geoapify — never to any third-party server. Do not commit.envfiles with keys.
# Install Vercel CLI
npm install -g vercel
# Build and deploy
npm run build
vercel --prodOr connect your GitHub repo directly at vercel.com/new — Vercel auto-detects Vite.
npm install -g netlify-cli
npm run build
netlify deploy --prod --dir=distOr drag-and-drop the dist/ folder at app.netlify.com.
# Install gh-pages helper
npm install --save-dev gh-pages
# Add to package.json scripts:
# "deploy": "vite build && gh-pages -d dist"
npm run deploySet
base: '/your-repo-name/'invite.config.jsif deploying to a subpath.
# Build the static files
npm run build
# Copy dist/ to your server
scp -r dist/ user@yourserver.com:/var/www/enatega-zone-ai/nginx config snippet:
server {
listen 80;
server_name yourdomain.com;
root /var/www/enatega-zone-ai;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}Each zone is scored 35–96 based on five weighted components:
Zone Score = Supply Score (max 35)
+ Mobility Score (max 16)
+ Demand Score (max 24)
+ Feasibility (16)
+ Vertical Fit (max 14)
− Competition Penalty (max 8)
| Score Range | Label | Meaning |
|---|---|---|
| 80 – 96 | 🟢 High Potential | Launch immediately, prioritize |
| 60 – 79 | 🟡 Good Test Market | Controlled pilot recommended |
| 40 – 59 | 🟠 Needs Validation | Survey first, smaller radius |
| 35 – 39 | 🔴 Not Recommended | Revisit in next phase |
enatega-zone-potential-ai/
├── public/
│ └── favicon.svg
├── src/
│ ├── App.jsx # Main app component + all logic
│ ├── App.css # Styles (matching original plugin)
│ └── main.jsx # React entry point
├── index.html
├── vite.config.js
├── package.json
└── README.md
| Function | Purpose |
|---|---|
collectMarketSignals() |
Fetches Geoapify Places data per zone |
generateAIAnalysis() |
Calls OpenAI with signals + schema |
signalBasedAnalysis() |
Formula-based fallback (no AI) |
normalizeAIResponse() |
Sanitizes & clamps AI output |
validateText() |
Rejects junk/test/URL inputs |
haversineKm() |
Distance check for zone validity |
- Go to platform.openai.com/api-keys
- Create a new secret key
- Paste it in the app's Settings panel
Default model: gpt-4o-mini (fast, cheap, accurate enough for this task)
- Register at myprojects.geoapify.com
- Create a project → copy the API key
- Paste it in the app's Settings panel
Free tier: 3,000 requests/day — sufficient for most demo usage.
🔐 Both keys are stored only in your browser's localStorage. Nothing is stored server-side. The app is fully static.
All settings are managed through the in-app Settings panel and persisted to localStorage under the key ezpai_config.
| Setting | Default | Description |
|---|---|---|
mode |
signal |
ai or signal |
openai_api_key |
"" |
Your OpenAI secret key |
openai_model |
gpt-4o-mini |
Any chat completion model |
geoapify_api_key |
"" |
Your Geoapify API key |
cta_url |
/contact/ |
CTA button destination |
cta_label |
Book a Free Launch Strategy Call |
CTA button text |
- No backend required — the app is 100% static HTML/JS
- No keys are ever logged or transmitted to any server except the API providers directly
- No cookies — localStorage only, cleared when the user clears browser data
- Input validation — all location inputs are validated client-side before any API call
- Rate limiting — handled upstream by OpenAI and Geoapify
For production deployments where you want to hide API keys from end users, consider building a thin proxy server (Node/Express or a serverless function) that holds the keys server-side and forwards requests.
Input:
Country: Pakistan
City: Lahore
Zones: DHA Phase 5, Gulberg, Johar Town, Model Town
Output:
Average Score: 74/100 — Good Test Market
Best First Zone: DHA Phase 5 (Score: 84)
Launch Model: Food, Grocery, Ride & Courier delivery
Suggested Approach: AI-assisted phased launch
Zone breakdown:
─ DHA Phase 5 84 High Potential Food, Grocery Risk: Medium
─ Gulberg 78 Good Test Market Food, Courier Risk: Medium-High
─ Johar Town 71 Good Test Market Grocery, Courier Risk: Medium-High
─ Model Town 65 Good Test Market Ride, Food Risk: High
Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request