3.6 KiB
3.6 KiB
✅ Web Apps Setup Complete
Summary of Changes
1. Created webapps/ Hub
New central folder for all web applications at:
webapps/
├── index.html (dashboard hub)
├── README.md
├── sugar_mill_locator/ (✨ NEW - with email integration)
└── data_validation_tool/ (✓ MOVED from root)
2. Sugar Mill Locator 🗺️
Location: webapps/sugar_mill_locator/
Features:
- ✅ Interactive map with 60+ African sugar mills
- ✅ Color-coded by country (11 countries)
- ✅ Size-coded by production volume
- ✅ Rich popups with all facility details
- ✅ Draw mode to add new mills
- ✅ Email submission to timon@resiliencebv.com
Export Options:
- Download CSV - Save locally, send manually (secure, no internet)
- Email Directly - Opens email client pre-filled (instant, transparent)
Data Format: Same as original CSV - easy to merge
Files:
index.html- Map interfaceapp.js- Full app logic with email supportsugar_cane_factories_africa.csv- Data fileREADME.md- Documentation
3. Data Validation Tool ✓
Location: webapps/data_validation_tool/ (moved from root)
Features:
- Validates Excel & GeoJSON files
- Traffic light system (green/yellow/red)
- Detailed error reporting
- Client-side processing (secure, no data sent anywhere)
Files:
index.html- Interfacevalidator.js- Validation logicREADME.md- Documentation
4. Webapps Hub Page
Location: webapps/index.html
- Central dashboard for all apps
- Links to both Sugar Mill Locator & Data Validation Tool
- Beautiful gradient design
- Responsive layout
How It Works: Email Submission
Workflow
- Colleague opens Sugar Mill Locator → "Draw & Add" mode
- Draws mill locations on map, fills data form
- Clicks "Export as CSV"
- Chooses "Email Directly"
- Their email client opens pre-filled with:
- To: timon@resiliencebv.com
- Subject: "New Sugar Cane Mills Data - YYYY-MM-DD"
- Body: Summary + full CSV data
- They click "Send"
- You receive email with data
- You integrate into
sugar_cane_factories_africa.csv
Why This Approach?
- ✅ No backend needed - Static hosting on Netlify works
- ✅ Secure - Data stays in browser, nothing sent to external servers
- ✅ Transparent - Colleagues see exactly what's being sent
- ✅ Offline-friendly - Also supports manual CSV download + email
- ✅ Works everywhere - Gmail, Outlook, Apple Mail, etc.
Deployment to Netlify
- Connect GitHub repo to Netlify
- Set publish directory:
webapps/ - Deploy
- Access at your Netlify URL
Testing Locally
Sugar Mill Locator
# Open in browser
file:///path/to/webapps/sugar_mill_locator/index.html
# Or run a local server
cd webapps/sugar_mill_locator
python -m http.server 8000
# Open http://localhost:8000
Both Apps
cd webapps
python -m http.server 8000
# Open http://localhost:8000
# Click links to access each app
For Your Colleagues
Adding Mills
- Go to app → "Draw & Add" mode
- Draw points on map
- Fill forms with mill details
- Click "Export"
- Choose email option
- Send email to you
- Done! ✨
Next Steps (Optional)
- Test locally - Make sure everything works
- Deploy to Netlify - Share URL with team
- Share instructions - Give colleagues the app URL
- Monitor emails - You'll receive submissions directly
File Locations
- Root app dashboard:
/webapps/index.html - Mill locator:
/webapps/sugar_mill_locator/ - Data validator:
/webapps/data_validation_tool/
Setup complete! Ready to use. 🎉