- Issue: ZIP 91403 (Sherman Oaks) is not mapped to any Regional Center in the database
- Impact: Users searching for this ZIP code will see "Regional Center (Not Found)"
- Expected RC: North Los Angeles County Regional Center
- Status: Awaiting data update from user
- API Endpoint:
/api/regional-centers/service_area_boundaries/returns all RC polygons with their ZIP codes - Verification:
curl "http://127.0.0.1:8000/api/regional-centers/lookup_by_zip/?zip_code=91403"returns 404
- Framework: Vue 3 with Vite
- UI Library: Bootstrap 5 + Custom CSS
- Map: Mapbox GL JS
- Hosting: AWS S3 + CloudFront
- URL: https://kinddhelp.com
- S3 Bucket: kinddhelp-frontend-1755148345
- CloudFront ID: E2W6EECHUV4LMM
- Framework: Django 5.2 with Django REST Framework
- Language: Python 3.12
- Hosting: AWS Elastic Beanstalk
- Environment: chla-api-docker2
- URL: https://api.kinddhelp.com
- SSL Certificate: arn:aws:acm:us-west-2:795519544722:certificate/77514a62-6636-4fdb-8360-863aa711859e
- Type: PostgreSQL (AWS RDS)
- Host: chla-postgres-db.cpkvcu4f59w6.us-west-2.rds.amazonaws.com
- Database Name: postgres
- Username: chla_admin
/CHLAProj/
├── map-frontend/ # Vue.js frontend application
│ ├── src/
│ │ ├── views/ # Vue components
│ │ ├── services/ # API services
│ │ └── assets/ # Static assets
│ ├── dist/ # Built files for deployment
│ ├── package.json # Node dependencies
│ ├── vite.config.js # Vite configuration
│ └── switch-env.sh # Environment switcher script
├── maplocation/ # Django backend application
│ ├── locations/ # Main app with models/views
│ ├── users/ # User authentication app
│ ├── maplocation/ # Django settings
│ ├── manage.py # Django management script
│ ├── requirements.txt # Python dependencies
│ ├── Procfile # EB deployment config
│ └── .ebextensions/ # EB configuration files
└── .venv/ # Python virtual environment
cd maplocation
source venv/bin/activate # Activate Python virtual environment
pip install -r requirements.txt
python3 manage.py runserver 127.0.0.1:8000cd map-frontend
npm install
./switch-env.sh dev # Switch to development environment
npm run dev # Starts on http://localhost:3000The switch-env.sh script manages environment variables:
./switch-env.sh dev- Points to local backend (http://127.0.0.1:8000)./switch-env.sh prod- Points to production backend (https://api.kinddhelp.com)
cd maplocation
eb deploy --profile personal --region us-west-2cd map-frontend
./switch-env.sh prod # Switch to production URLs
npm run build # Build for production
aws s3 sync dist/ s3://kinddhelp-frontend-1755148345 --delete --profile personal --region us-west-2
aws cloudfront create-invalidation --distribution-id E2W6EECHUV4LMM --paths "/*" --profile personalDJANGO_SECRET_KEY: Django secret keyDJANGO_DEBUG: false (in production)ALLOWED_HOSTS: api.kinddhelp.com,.elasticbeanstalk.com,localhostCORS_ALLOWED_ORIGINS: https://kinddhelp.com,https://www.kinddhelp.comDB_HOST: RDS endpointDB_NAME: postgresDB_USER: chla_adminDB_PASSWORD: [stored in EB]DB_SSL_REQUIRE: true
VITE_API_BASE_URL: API endpoint URLVITE_MAPBOX_TOKEN: Mapbox access token
/api/providers-v2/- Provider listings/api/providers-v2/comprehensive_search/- Provider search with filters/api/regional-centers/- Regional center listings/api/regional-centers/service_area_boundaries/- Service area GeoJSON/api/regional-centers/by_zip_code/- Find regional center by ZIP/api/users/auth/login/- User authentication
- Provider Map: Shows healthcare providers with filtering
- Regional Centers: Display service areas and boundaries
- Search: Location-based search with radius
- Filtering: Insurance, languages, specializations
- User Authentication: Client portal access
- Cause: Usually unhealthy EB environment or SSL issues
- Fix: Check EB health, ensure ALLOWED_HOSTS includes load balancer IPs
- Cause: Frontend/backend domain mismatch
- Fix: Update CORS_ALLOWED_ORIGINS in EB environment variables
- Cause: Django not responding to ELB health checks
- Fix: Ensure ALLOWED_HOSTS includes internal IPs (172.31.x.x)
- Cause: HTTP/HTTPS mismatch
- Fix: Ensure all URLs use HTTPS in production
cd maplocation
python3 manage.py makemigrations
python3 manage.py migrate
git add .
git commit -m "Add migrations"
git push origin main # Auto-deploys with migrationspsql -h chla-postgres-db.cpkvcu4f59w6.us-west-2.rds.amazonaws.com -U chla_admin -d postgreseb status --profile personal --region us-west-2
eb health --profile personal --region us-west-2
eb logs --profile personal --region us-west-2# Test HTTPS
curl -I https://api.kinddhelp.com/api/regional-centers/
# Test with auth
curl -H "Authorization: Token YOUR_TOKEN" https://api.kinddhelp.com/api/providers-v2/aws cloudfront get-distribution --id E2W6EECHUV4LMM --profile personal- Production Frontend: https://kinddhelp.com
- Production API: https://api.kinddhelp.com
- S3 Direct: http://kinddhelp-frontend-1755148345.s3-website-us-west-2.amazonaws.com
- EB Direct: https://chla-api-docker2.eba-9aiqcppx.us-west-2.elasticbeanstalk.com
- Region: us-west-2
- AWS Profile: personal
- EB Application: chla-api
- EB Environment: chla-api-docker2
- RDS Instance: chla-postgres-db
- Always use
python3(notpython) for macOS compatibility [[memory:6681121]] - Use
./switch-env.shto manage environment switching - Hard refresh (Cmd+Shift+R) after frontend deployments
- Check EB health before assuming API issues
- CloudFront invalidation takes 5-15 minutes
- S3 direct URL is useful for testing without CloudFront
- Check EB health:
eb health - Redeploy:
eb deploy - Check logs:
eb logs
- Clear CloudFront cache
- Check S3 sync completed
- Use S3 direct URL to bypass cache
- Check RDS security groups
- Verify DB_SSL_REQUIRE=true
- Check VPC settings