This project is automatically deployed to Netlify.
The deployment is configured in netlify.toml with the following settings:
[build]
command = "npm run parse-readme && npm run build"
publish = "dist"Build Process:
- Parse README.md to generate JSON files
- Build React app with Vite
- Output to
distdirectory
[build.environment]
NODE_VERSION = "20"React Router is configured with a redirect rule:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200This ensures all routes are handled by React Router.
npm run parse-readme && npm run buildnpm run parse-readme- Generates JSON files from README.mdnpm run build- Builds the React app with Vite
Production:
- Triggers on push to
masterbranch - Netlify automatically builds and deploys
- Available at: https://mossaique.netlify.app/
Preview Deployments:
- Created for every pull request
- Test changes before merging
- Temporary URL provided in PR comments
You can also trigger manual deployments from Netlify dashboard:
- Go to https://app.netlify.com
- Select your site
- Click "Trigger deploy" → "Deploy site"
The following security headers are configured:
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"Static assets (JS, CSS, images) are cached for 1 year:
Cache-Control = "public, max-age=31536000, immutable"JSON data files are cached for 1 hour with revalidation:
Cache-Control = "public, max-age=3600, must-revalidate"Issue: "npm run parse-readme failed"
- Solution: Check README.md format
- Solution: Ensure all links have proper format:
[Title](URL): Description
Issue: "npm run build failed"
- Solution: Check for TypeScript/linting errors
- Solution: Run
npm run buildlocally to debug
Issue: 404 on direct route access (e.g., /category/color)
- Solution: Ensure
netlify.tomlhas the redirect rule - Solution: Clear Netlify cache and redeploy
Issue: JSON files not updating
- Solution: Ensure GitHub Actions ran successfully
- Solution: Manually run
npm run parse-readmeand commit - Solution: Trigger a Netlify rebuild
Typical build times:
- ⚡ Parser: ~2 seconds (24 categories, 292 resources)
- 🏗️ Vite Build: ~10-15 seconds
- ✅ Total: ~15-20 seconds
- Live Site: https://mossaique.netlify.app/
- Netlify Dashboard: https://app.netlify.com/sites/mossaique
- GitHub Repository: https://github.com/selfishprimate/mossaique
- GitHub Actions: https://github.com/selfishprimate/mossaique/actions
- Preview Deployments: Use pull requests to preview changes before merging
- Deploy Notifications: Enable Slack/Discord notifications in Netlify settings
- Environment Variables: Add in Netlify dashboard if needed (none required currently)
- Custom Domain: Configure in Netlify DNS settings if you have one
- Analytics: Enable Netlify Analytics for traffic insights
Questions? Check the Netlify documentation or open an issue on GitHub.