Installation Guide
This comprehensive guide covers everything you need to know about installing and configuring Plugin Agency, including prerequisites, detailed setup instructions, and troubleshooting common issues.Prerequisites
Before installing Plugin Agency, ensure your development environment meets these requirements:Node.js and npm
Recommended: Node.js 18.x or higher with npm 9.x or higher
Git
You’ll need Git to clone the repository:Email Account (Gmail)
For the contact form to work, you’ll need:- A Gmail account
- An App Password generated for your account
Google reCAPTCHA Keys
Register your site at the Google reCAPTCHA Admin Console to obtain:- reCAPTCHA Site Key (client-side)
- reCAPTCHA Secret Key (server-side)
Installation Steps
1. Clone the Repository
Clone the Plugin Agency repository from GitHub:2. Install Dependencies
Install all required packages using your preferred package manager:Production Dependencies
- react (^19.2.0): Core React library
- react-dom (^19.2.0): React DOM rendering
- nodemailer (^7.0.13): Email sending functionality
- react-google-recaptcha (^3.1.0): reCAPTCHA integration
- lucide-react (^0.575.0): Icon components
- @vercel/analytics (^1.6.1): Analytics tracking
Development Dependencies
- vite (^7.2.4): Build tool and dev server
- @vitejs/plugin-react (^5.1.1): Vite React plugin
- eslint (^9.39.1): Code linting
- sharp (^0.34.5): Image optimization
Environment Configuration
Create Environment File
Create a.env file in the root directory:
Environment Variables Explained
Add the following variables to your.env file:
EMAIL_USER
Your Gmail email address that will be used to send emails from the contact form. Example:[email protected]
EMAIL_PASS
Your Gmail App Password. To generate one:- Go to your Google Account
- Navigate to Security > 2-Step Verification
- Scroll down to App passwords
- Generate a new app password for “Mail”
- Copy the 16-character password
EMAIL_PASS=abcd efgh ijkl mnop (without spaces)
Learn more about App Passwords
VITE_RECAPTCHA_SITE_KEY
Your reCAPTCHA v2 Site Key (client-side key). This key is prefixed withVITE_ to make it available in the frontend.
Example: VITE_RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
RECAPTCHA_SECRET_KEY
Your reCAPTCHA v2 Secret Key (server-side key). This key is used to verify reCAPTCHA responses on the backend. Example:RECAPTCHA_SECRET_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
To obtain reCAPTCHA keys:
- Visit Google reCAPTCHA Admin
- Register a new site with reCAPTCHA v2 (“I’m not a robot” Checkbox)
- Add your domain(s) (use
localhostfor development) - Copy both keys to your
.envfile
Development Server
Start the Vite development server:http://localhost:5173 with:
- Hot Module Replacement (HMR) for instant updates
- Fast refresh for React components
- Network access enabled for testing on other devices
Production Build
Build the Application
Create an optimized production build:- Runs ESLint to check for code issues
- Bundles and minifies JavaScript and CSS
- Optimizes images and assets
- Generates a production-ready build in the
dist/directory
Preview Production Build
Test the production build locally:dist/ directory, allowing you to test it before deployment.
Code Quality
Run Linting
Check your code for issues with ESLint:- React hooks rules
- React refresh compatibility
- Modern JavaScript standards
Troubleshooting
Port 5173 is already in use
Port 5173 is already in use
If port 5173 is already in use, Vite will automatically try the next available port (5174, 5175, etc.).To use a specific port, modify the
vite.config.js file:Email not sending from contact form
Email not sending from contact form
Common causes and solutions:
- Invalid App Password: Make sure you’re using an App Password, not your regular Gmail password
- 2-Step Verification not enabled: App Passwords require 2-Step Verification to be enabled on your Google account
- Environment variables not loaded: Ensure your
.envfile is in the root directory and variables are correctly named - Gmail security block: Check your Gmail security settings and ensure “Less secure app access” is not blocking the connection
reCAPTCHA not displaying
reCAPTCHA not displaying
If the reCAPTCHA widget doesn’t appear:
- Check environment variable: Ensure
VITE_RECAPTCHA_SITE_KEYis set correctly (note theVITE_prefix) - Domain restrictions: If you set domain restrictions in reCAPTCHA admin, make sure
localhostis included for development - Browser console errors: Check for CORS or network errors in the browser console
- Key type mismatch: Ensure you’re using reCAPTCHA v2 keys, not v3
Build fails with ESLint errors
Build fails with ESLint errors
If the build process fails due to linting errors:
- Run
npm run lintto see all linting issues - Fix the reported issues in your code
- Alternatively, temporarily disable ESLint during build by modifying the build script (not recommended for production)
- Unused variables or imports
- Missing prop types
- React hooks dependency warnings
Module not found errors
Module not found errors
If you see “Cannot find module” errors:
-
Delete
node_modulesand lock file: -
Clear npm cache:
-
Reinstall dependencies:
-
If using yarn or pnpm, delete
yarn.lockorpnpm-lock.yamlrespectively
Video background not loading
Video background not loading
If the hero video background doesn’t display:
- Check file path: Ensure video files exist in
public/assets/hero/ - Video format: Make sure the video format is supported by browsers (MP4 with H.264 codec is recommended)
- File size: Large video files may take time to load; consider optimizing or compressing
- Browser autoplay policy: Some browsers block autoplay; the video should be muted to autoplay
Responsive design issues
Responsive design issues
If the layout doesn’t respond correctly on mobile:
- Clear browser cache: Hard refresh your browser (Ctrl+Shift+R or Cmd+Shift+R)
- Check viewport meta tag: Ensure
index.htmlhas the proper viewport meta tag - CSS variables: Verify that CSS variables are supported by your browser
- Browser dev tools: Use responsive design mode in browser dev tools to debug breakpoints
Next Steps
Configuration
Learn how to customize Plugin Agency for your needs.
Deployment
Deploy your Plugin Agency site to production.
Components
Explore the component library and customization options.
API Reference
View the complete API documentation.