- Push your code to GitHub
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
- Vercel will auto-detect Vite and configure build settings
- Click "Deploy"
Build Settings (auto-configured):
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Push your code to GitHub
- Go to netlify.com
- Click "Add new site" → "Import an existing project"
- Connect to GitHub and select your repository
- Configure build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Click "Deploy site"
- Install gh-pages:
npm install --save-dev gh-pages- Add to
package.json:
{
"homepage": "https://yourusername.github.io/sales-dashboard",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}
}- Update
vite.config.ts:
export default defineConfig({
base: '/sales-dashboard/',
plugins: [react()]
})- Deploy:
npm run deploy- Push code to GitHub
- Go to AWS Amplify Console
- Click "New app" → "Host web app"
- Connect your repository
- Build settings:
- Build command:
npm run build - Output directory:
dist
- Build command:
- Click "Save and deploy"
Create Dockerfile:
FROM node:18-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Build and run:
docker build -t sales-dashboard .
docker run -p 8080:80 sales-dashboardFor production, create .env.production:
VITE_API_URL=https://your-api.com
VITE_WS_URL=wss://your-websocket.com
The production build is already optimized with:
- Code splitting
- Tree shaking
- Minification
- Asset optimization
Build size: ~150KB gzipped
- Test all interactive features
- Verify drag-and-drop works
- Check responsive design
- Test in multiple browsers
- Verify all animations work
- Check console for errors
- Test call completion flow
- Verify notifications appear
- Go to Project Settings → Domains
- Add your custom domain
- Configure DNS with provided records
- Go to Domain Settings
- Add custom domain
- Configure DNS or use Netlify DNS
- Enable CDN caching for static assets
- Use HTTP/2
- Enable Brotli compression
- Set proper cache headers
- Use a CDN for faster global delivery
Consider adding:
- Error tracking (Sentry)
- Analytics (Google Analytics, Plausible)
- Performance monitoring (Web Vitals)