Deploy the VoteQuest frontend to Netlify with drag-and-drop simplicity
- ✅ Frontend fully built (run
npm run buildto generate/outfolder) - ✅
netlify.tomlconfiguration file present - ✅ Netlify account created at netlify.app
cd frontend
npm install
npm run build✅ This creates the /out folder with all static files ready to deploy
Go to app.netlify.com and log in to your Netlify account
- Look for "Drag and drop your site output folder here" section
- Drag the
frontend/outfolder into the drop zone - Netlify will automatically upload and deploy your site
- Your site will be live at a temporary URL (e.g.,
https://xyz123.netlify.app)
✨ That's it! Your frontend is now live!
- Click "Deploy with Git" on Netlify Dashboard
- Authorize Netlify to access your GitHub
- Select repository (your VoteQuest repo)
- Configure build settings:
- Build command:
npm run build - Publish directory:
out - Node version:
18.17.0
- Build command:
- Deploy - Netlify will build and deploy automatically on every push to main
- Go to Site Settings → Domain Management
- Click Add custom domain
- Enter your domain name
- Follow DNS setup instructions for your domain registrar
✅ Automatically configured with free SSL certificate via Let's Encrypt
In Netlify Dashboard, go to Site Settings → Build & Deploy → Environment
Add:
NEXT_PUBLIC_API_URL=https://your-backend-api.com
Then rebuild the site or redeploy.
The /out folder contains:
- Static HTML files - all pages pre-rendered
- CSS bundles - optimized Tailwind CSS
- JavaScript bundles - React components compiled
- Assets - images, fonts, icons
- API routes (if any) - handled by Netlify Functions
Total Size: ~2-5 MB (gzipped)
| File | Purpose |
|---|---|
next.config.mjs |
Next.js configuration with output: 'export' |
netlify.toml |
Netlify build & deployment settings |
.gitignore |
Excludes build artifacts from Git |
out/ |
Deployment folder - ready for Netlify |
After deployment, verify:
- Home page loads:
https://your-site.netlify.app/ - Auth pages accessible:
/auth/login,/auth/signup - Game pages load:
/game,/game/level/1 - API calls working: Check Network tab in DevTools
- No console errors: Open DevTools (F12)
- Check build logs in Netlify Dashboard
- Ensure
npm run buildworks locally - Verify all dependencies are in
package.json
- Ensure
netlify.tomlredirects are configured - Check that
out/folder is correctly set as publish directory
- Update
NEXT_PUBLIC_API_URLenvironment variable - Rebuild site after changing env vars
- Ensure backend API is running and accessible
- Clear browser cache (Ctrl+Shift+Delete)
- Rebuild and redeploy
- Check Tailwind CSS is properly built into
out/folder
- Go to Deploys tab in Netlify Dashboard
- See all previous deployments and logs
- Rollback to previous version if needed
- Go to Site Settings → Notifications
- Setup email alerts for deployments
- Integrate with Slack or Discord
- Create new branch:
staging - Create new Netlify site for staging
- Connect staging branch
- Deploy changes to staging before production
- Keep
mainbranch for production - Netlify auto-deploys on merge to
main - Use pull requests for code review before merge
Questions? Check Netlify support or visit the Netlify Community