Deployment Guide
This guide covers the deployment process, environment configuration, and production considerations for the Yemira Services Nettoyages website.Production Environment
The website is deployed on Vercel at:Production URL
Vercel provides automatic deployments, serverless functions, edge network CDN, and optimized performance for Next.js applications.
Build Process
Local Build
To create a production build locally:Build Output
The build process generates:- Static Assets
- Server Components
- Client Components
- Build Analytics
- Optimized images
- Minified CSS
- Bundled JavaScript
- Font files
Build Commands
Vercel Deployment
Automatic Deployments
Vercel provides automatic deployments from Git:Production
Automatic deployment on push to
main branchPreview
Preview deployments for all pull requests
Instant Rollback
One-click rollback to previous deployments
Custom Domains
Support for custom domain configuration
Deployment Configuration
Vercel automatically detects Next.js projects. The default configuration:vercel.json (implicit)
Advanced Vercel Configuration
Advanced Vercel Configuration
Create a
vercel.json file for custom configuration:Environment Variables
Set environment variables in Vercel dashboard:Navigate to Project Settings
Go to your project in Vercel dashboard → Settings → Environment Variables
Add Variables
Add any required environment variables:
- API keys
- Third-party service tokens
- Feature flags
SEO & Metadata Configuration
Metadata Function
The website uses a centralized metadata function for SEO optimization. Location:lib/utils.ts
SEO Features
- Open Graph
- Twitter Cards
- Structured Data
Facebook & LinkedIn Sharing
- Custom title and description
- OG image (1200x630 recommended)
- Site name and URL
- Locale: French (fr_FR)
- Type: website
Usage in Layout
app/layout.tsx
Performance Optimization
Next.js Optimizations
Image Optimization
- Automatic image optimization
- WebP/AVIF format conversion
- Lazy loading by default
- Responsive images
Code Splitting
- Automatic route-based splitting
- Dynamic imports for components
- Shared chunk optimization
- Tree shaking
Server Components
- Zero-JS server components
- Reduced client bundle size
- Faster initial page load
- Better SEO
Edge Runtime
- Vercel Edge Network
- Global CDN distribution
- Low latency worldwide
- Automatic caching
Lighthouse Scores
Target Lighthouse scores for production:Fast load times with optimized assets
WCAG 2.1 AA compliance
Security headers and HTTPS
Complete meta tags and structured data
Performance Best Practices
Image Optimization
Image Optimization
Font Optimization
Font Optimization
Dynamic Imports
Dynamic Imports
CSS Optimization
CSS Optimization
- Tailwind CSS purges unused styles in production
- Critical CSS inlined automatically
- CSS modules for component styles
Production Checklist
Pre-Deployment
Test production build locally (
npm run build && npm start)Verify all images have proper alt text
Check responsive design on all breakpoints
Test all links and navigation
Validate forms and interactive elements
Configuration
Set environment variables in Vercel
Configure custom domain (if applicable)
Set up SSL certificate (automatic on Vercel)
Configure redirects and rewrites
SEO & Analytics
Verify meta tags and Open Graph data
Submit sitemap to Google Search Console
Set up analytics (Google Analytics, Plausible, etc.)
Configure robots.txt
Performance
Run Lighthouse audit (aim for 90+ scores)
Test on slow 3G network
Verify Core Web Vitals
Check bundle sizes
Monitoring & Maintenance
Vercel Analytics
Vercel provides built-in analytics:Real User Monitoring
Track actual user performance metrics
Core Web Vitals
LCP, FID, CLS measurements
Function Logs
Monitor serverless function execution
Edge Logs
Track edge function performance
Error Tracking
Consider integrating error tracking:- Sentry
- LogRocket
- Vercel Logs
Update Strategy
Troubleshooting
Build Failures
Build Failures
Common Issues:
- TypeScript errors: Run
npm run buildlocally - Missing dependencies: Check
package.json - Image optimization errors: Verify image imports
Performance Issues
Performance Issues
Diagnosis:
- Run Lighthouse audit
- Check Vercel Analytics
- Analyze bundle sizes
- Lazy load components
- Optimize images
- Enable compression
- Use server components
Deployment Errors
Deployment Errors
Check:
- Vercel build logs
- Environment variables
- Next.js version compatibility
- Node.js version (specified in
package.json)
package.json
Security Considerations
HTTPS
Automatic SSL on Vercel with Let’s Encrypt
Security Headers
Configure CSP, HSTS, X-Frame-Options
Environment Variables
Never commit secrets to Git
Dependency Scanning
Regular
npm audit checksRecommended Headers
vercel.json
Related Resources
Architecture
Learn about the website architecture and technology stack
Components
Explore component documentation
Vercel Docs
Official Vercel documentation
Next.js Docs
Official Next.js documentation