Overview
The Bİ DOLU İÇECEK application is a static React app that can be deployed to various hosting platforms. This guide covers deployment to popular platforms and configuration requirements.Prerequisites
Before deploying, ensure you have:- Built the application (
npm run build) - A Git repository with your code
- An account on your chosen hosting platform
This application uses static hosting and doesn’t require a server-side runtime. Any platform that can serve static files will work.
Deployment Platforms
- Vercel (Recommended)
- Netlify
- GitHub Pages
- Custom Server
Vercel offers the best integration for React applications with Edge Config support.
Deploy the Project
From your project directory:Follow the prompts:
- Link to existing project or create new
- Confirm project settings
- Deploy
Automatic Deployment
Connect your Git repository for automatic deployments:- Go to Vercel Dashboard
- Click “New Project”
- Import your Git repository
- Configure build settings:
- Build Command:
npm run build - Output Directory:
build - Install Command:
npm install
- Build Command:
- Click “Deploy”
Vercel automatically deploys on every push to your main branch, and creates preview deployments for pull requests.
Environment Variables
Configure environment variables for your deployment:Required Variables
For Vercel Edge Config integration, you’ll need the
EDGE_CONFIG environment variable.Setting Environment Variables
- Vercel
- Netlify
- Local .env
- Go to Project Settings → Environment Variables
- Add variables for each environment:
- Production
- Preview
- Development
- Redeploy for changes to take effect
Edge Config Setup (Vercel)
The application uses Vercel Edge Config for remote configuration of service hours, store status, and emergency messages.Create Edge Config Store
- Go to Vercel Dashboard
- Navigate to Storage → Edge Config
- Click “Create Edge Config”
- Name it
suapp-config
Connect to Project
- In Edge Config, go to Tokens tab
- Copy the Connection String
- Add to Project Environment Variables:
- Name:
EDGE_CONFIG - Value: Your connection string
- Environments: All (Production, Preview, Development)
- Name:
Edge Config Features
With Edge Config, you can remotely control:- Service Hours - Change opening/closing times without redeploying
- Store Status - Temporarily close the store or enable maintenance mode
- Emergency Messages - Display urgent notifications to customers
Edge Config changes propagate globally within 2 minutes and don’t require rebuilding or redeploying the application.
Managing Edge Config
Temporarily Close Store:src/config/edgeConfig.js:1 for implementation details.
Post-Deployment Checklist
After deploying, verify:Check Application Loads
- Visit your deployment URL
- Verify the homepage loads correctly
- Test navigation between sections
Test Core Features
- Product selection and cart functionality
- WhatsApp order integration
- Service hours display
- Responsive design on mobile
Verify Edge Config (Vercel)
- Check browser console for Edge Config logs
- Test service hours enforcement
- Verify store status updates
Performance Check
- Run Lighthouse audit
- Check page load times
- Test on various devices and networks
Common Deployment Issues
Blank Page After Deployment
Cause: Incorrect base URL or routing configuration Solution:- Check
homepageinpackage.json - Ensure server redirects all routes to
index.html - Verify build output in deployment logs
Assets Not Loading
Cause: Incorrect asset paths Solution:- Use relative imports:
import logo from './logo.png' - Place static assets in
public/folder - Reference public assets with
process.env.PUBLIC_URL
Environment Variables Not Working
Cause: Variables not prefixed or not set at build time Solution:- Prefix with
REACT_APP_ - Set variables before building
- Redeploy after changing variables
Edge Config Not Loading
Cause: Missing or incorrect connection string Solution:Continuous Deployment
Set up automatic deployments for a seamless workflow:Connect Git Repository
Link your hosting platform to your Git repository (GitHub, GitLab, or Bitbucket)
Configure Build Settings
- Build command:
npm run build - Output directory:
build - Node version: 16.x or higher
Set Up Branch Deployments
- Production: Deploy from
mainbranch - Preview: Deploy from pull requests
- Development: Deploy from
developbranch (optional)
Monitoring and Analytics
After deployment, monitor your application:- Vercel Analytics - Built-in performance monitoring
- Google Analytics - User behavior tracking
- Sentry - Error tracking and monitoring
- Web Vitals - Core web vitals reporting
The application includes web-vitals package for performance monitoring. Check
src/reportWebVitals.js for configuration.Next Steps
- Review Building Guide for build optimization tips
- Set up monitoring and analytics
- Configure custom domain
- Enable HTTPS/SSL certificate
- Set up staging environment