A shared folder with AI prompts and code snippets
From workspace: Bolt
Team: Main
Total snippets: 7
7 snippets
Add an `.env` file for environment variables with instructions for local setup.
Create a `.env` file to store secrets and config variables. Include: – Add placeholder keys for API keys, DB URL, etc. – Load from `.env` in app – Ignore in Git using `.gitignore`
Ensure the build script is correctly defined in `package.json`.
Add a build script to `package.json`. Include: – Command: `next build` or `vite build` depending on the framework – Ensure it runs without errors – Compatible with your deploy target
Ensure lint checks run in CI and fail the build on error.
Update CI workflow to include lint step. Include: – Use `npm run lint` – Fail build if linting fails – Output errors in logs
Set up GitHub Actions to lint, test, and build the app on every push.
Add GitHub Actions workflow for CI. Include: – Trigger on push to main – Run `npm install`, `npm run lint`, `npm run test`, `npm run build` – Use latest Node.js version
Configure the project for Vercel deployment using a `vercel.json` file.
Configure this project for Vercel deployment. Include: – Add a `vercel.json` config file – Set default build command and output directory – Ignore test files during deploy
Add a deployment status badge to the README file.
Add a deployment status badge to the top of the README.md file. Include: – Use badge from GitHub Actions or Vercel – Link to live site – Make sure it updates on every commit
Minify and optimize static assets before deployment.
Optimize static assets for production deployment. Include: – Compress images (JPEG, PNG) – Minify CSS and JS – Remove unused code or libraries