This document describes how to deploy the MCP Registry Growth Dashboard to production.
The dashboard is built as a static Next.js export optimized for GitHub Pages deployment.
- Node.js 18+
- npm 8+
- 2GB RAM minimum for build process
- Modern browser support (Chrome 88+, Firefox 78+, Safari 14+)
The project includes automated GitHub Actions deployment:
- Push to main branch triggers automatic deployment
- Tests run first - deployment only proceeds if all tests pass
- Build verification ensures static export is valid
- Deploy to GitHub Pages - live site updates automatically
If you need to deploy manually:
# 1. Install dependencies
npm ci
# 2. Run all tests
npm test
npx playwright test
# 3. Build for production
npm run build:prod
# 4. Verify build quality
npm run verify-build
# 5. Preview locally (optional)
npm run preview
# 6. Deploy static files from ./out directory
# Upload contents of ./out to your static hosting providerSet these in your deployment environment:
NODE_ENV=production
NEXT_PUBLIC_BASE_PATH=/mcp-registry-growth # Adjust for your domain
NEXT_PUBLIC_ASSET_PREFIX=/mcp-registry-growth/Copy .env.example to .env.local and customize:
cp .env.example .env.local
# Edit .env.local with your local settingsThe production build includes:
- Code splitting - Chart libraries loaded on demand
- Static generation - Pre-built HTML for optimal loading
- Asset optimization - Minified CSS/JS with compression
- Image optimization - WebP format with fallbacks
- Caching headers - Long-term caching for static assets
The deployment process includes automated checks:
- ✅ Required files exist (
index.html, static assets, data files) - ✅ HTML contains proper meta tags and content
- ✅ Analytics data is valid JSON
- ✅ All dependencies are resolved
- ✅ No broken links or missing assets
- GitHub Actions provides build status
- Failed builds prevent deployment
- Email notifications on build failures
- Lighthouse scores tracked in CI/CD
- Core Web Vitals compliance required
- Bundle size monitoring
- CSV data converted to JSON during build
- Static data embedded in deployment
- No runtime API dependencies
"Module not found" errors:
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installStatic export fails:
# Check for dynamic imports or SSR features
npm run type-check
npm run lintTests fail in CI:
# Run tests locally first
npm test
npx playwright testLarge bundle size:
- Check dynamic imports are working
- Verify code splitting is enabled
- Run
npm run buildand check bundle analyzer
Slow loading:
- Verify static export is working
- Check CDN configuration
- Validate asset compression
- No server-side code in production
- All data is static and public
- No API keys or secrets in frontend
- HTTPS enforced via GitHub Pages
- CSP headers recommended for additional security
For deployment issues:
- Check GitHub Actions logs
- Verify build passes locally
- Review environment variables
- Check static hosting provider configuration