Spaces:
Sleeping
Sleeping
|
Download DEPLOY_CHECKLIST.md from 01ammu/data-cleaning-openenv: direct link, hf CLI and curl.
- Browser
- Download file 5.17 kB
-
https://huggingface.co/spaces/01ammu/data-cleaning-openenv/resolve/main/DEPLOY_CHECKLIST.md
- Command line
-
hf download hf://spaces/01ammu/data-cleaning-openenv/DEPLOY_CHECKLIST.md
-
curl -L -o DEPLOY_CHECKLIST.md https://huggingface.co/spaces/01ammu/data-cleaning-openenv/resolve/main/DEPLOY_CHECKLIST.md
5.17 kB
π Phase 4.2 - Production Deployment Checklist
Status: Ready for Production | Estimated Time: 5 minutes | Cost: $0 (NO CREDIT CARD NEEDED)
β What's Already Done
- Backend deployed to HuggingFace Spaces (
https://01ammu-data-cleaning-openenv.hf.space) - Database: SQLite (included with HF Spaces)
- API endpoints working
- Frontend deployed β You are here
π― Your Task: Deploy Frontend to Vercel (5 minutes)
Step 1: Go to Vercel
- Open https://vercel.com
- Click Sign Up
- Choose GitHub (simplest)
- Authorize Vercel to access your repos
Step 2: Import Your Project
- Click + New Project
- Search for:
data-cleaning-openenv - Click Import
Step 3: Configure Project
- Framework: Vite
- Root Directory:
frontend - Build Command:
npm run build(auto-filled) - Output Directory:
dist(auto-filled)
Step 4: Add Environment Variable
- Scroll to Environment Variables
- Click + Add
- Name:
VITE_API_BASE_URL - Value:
https://01ammu-data-cleaning-openenv.hf.space/api - Click Add
Step 5: Deploy!
- Click Deploy
- Wait 1-2 minutes
- β Done! Vercel shows your live URL
β¨ Your Live URLs
Once deployed, you'll have:
| Service | URL |
|---|---|
| Frontend | https://data-cleaning-openenv.vercel.app (or custom domain) |
| Backend | https://01ammu-data-cleaning-openenv.hf.space |
| API Docs | https://01ammu-data-cleaning-openenv.hf.space/docs |
π§ͺ Verify It Works
Test in Browser
- Open your Vercel URL
- Upload a CSV file
- Click "Start Cleaning"
- Wait for job to complete
- Download cleaned data
Test API
# Check backend is alive
curl https://01ammu-data-cleaning-openenv.hf.space/health
# Expected: {"status": "ok"}
β οΈ Important Notes
HF Spaces Sleep Behavior
- Sleeps after: 48 hours without access
- Wake-up time: ~30 seconds (auto-wakes on first request)
- Why: Free tier pauses unused services
- Solution: Just refresh the page, it'll wake up
No Credit Card Needed
- β HuggingFace Spaces: No credit card
- β Vercel: No credit card
- β SQLite Database: Included (no separate DB)
- β Total Cost: $0 forever
π Update Your Portfolio
Once live, add to your resume:
Live Demo: https://data-cleaning-openenv.vercel.app
(Backend: HuggingFace Spaces, Frontend: Vercel)
π What This Deployment Shows
β¨ Full-Stack Skills:
- React + TypeScript frontend (Vercel)
- FastAPI backend (HF Spaces)
- SQLite database
- Production deployment experience
β¨ Cloud Knowledge:
- Multiple cloud platforms (Vercel + HF Spaces)
- Environment variable management
- CI/CD (Vercel auto-deploys on git push)
- Free tier optimization (no credit card = resourcefulness)
Done! π
When all checkboxes above are complete:
- β Frontend is live on Vercel
- β Backend is live on HF Spaces
- β File upload β cleaning β download works
- β You have a production-grade portfolio project
- β Zero cost, zero credit cards, 5 minutes setup
Next: Share your live link! This is portfolio gold π
Deploying via Docker Compose & GHCR (alternative)
If you prefer running the full stack yourself (self-hosted or cloud VM), this repo includes Dockerfiles and compose manifests.
Build & publish images (CI does this automatically to GHCR):
- ghcr.io//data-cleaning-openenv-backend:latest
- ghcr.io//data-cleaning-openenv-frontend:latest
Use docker-compose.prod.yml to run services locally or on a host:
- Copy .env.example to .env and set production secrets (DATABASE_URL, POSTGRES_PASSWORD, JWT_SECRET)
- docker compose -f docker-compose.prod.yml pull
- docker compose -f docker-compose.prod.yml up -d
Verify health endpoints:
- curl http://:8000/api/health
Notes on secrets & TLS:
- Use environment variables or a secrets manager (Vault, cloud secrets)
- Terminate TLS at a reverse proxy (NGINX, cloud LB) and ensure JWT_SECRET is kept secret
Troubleshooting
"Vercel deployment failed"
- Check GitHub repo is public (Vercel needs access)
- Verify
frontenddirectory exists - Check
package.jsonhas correct build script - View Vercel logs for details
"Frontend can't reach backend"
- Make sure
VITE_API_BASE_URLis set to:https://01ammu-data-cleaning-openenv.hf.space/api - Backend URL must end with
/api(don't forget!) - Re-deploy frontend: Vercel dashboard β Deployments β Redeploy
"Backend is slow / timing out"
HF Spaces might be sleeping. Just refresh the page. It'll wake up in 30 seconds.
Cost Breakdown
| Component | Service | Monthly Cost | Credit Card |
|---|---|---|---|
| Frontend | Vercel | $0 | No β |
| Backend | HF Spaces | $0 | No β |
| Database | SQLite | $0 | No β |
| Total | $0 | No β |
Perfect for a student portfolio! π