Installation Guide
This comprehensive guide covers everything you need to install, configure, and deploy the VENCOL Front Template application. Whether you’re setting up a development environment or preparing for production deployment, this guide has you covered.System Requirements
Before installing, ensure your system meets these requirements:- Node.js: Version 16.x or higher (18.x recommended)
- Package Manager: npm 7+, pnpm 7+, or yarn 1.22+
- Operating System: Windows, macOS, or Linux
- Memory: 2GB RAM minimum, 4GB recommended
- Disk Space: 500MB for dependencies
Installation Methods
Option 1: Using npm (Default)
Install Dependencies
package.json:- react (18.3.1) - Core React library
- react-dom (18.3.1) - React rendering
- react-router-dom (6.22.3) - Client-side routing
- lucide-react (0.358.0) - Icon library
- react-helmet-async (2.0.4) - SEO meta tags
- @vitejs/plugin-react (5.0.0) - Vite React plugin
- typescript (5.8.2) - TypeScript compiler
- vite (6.2.0) - Build tool and dev server
Verify Installation
Start Development Server
http://localhost:3000 (configured in vite.config.ts:9).Option 2: Using pnpm (Recommended)
pnpm is faster and more disk-efficient than npm. The project includes apnpm-lock.yaml:1-39052 lockfile.
Install pnpm
Install Dependencies
pnpm-lock.yaml for deterministic installations.Start Development Server
Option 3: Using Yarn
Install Yarn
Install Dependencies
yarn.lock file for dependency resolution.Start Development Server
Environment Configuration
The application supports environment variables for API configuration.Creating Environment File
Create a.env file in the project root:
Environment Variables in Vite
Vite exposes environment variables throughvite.config.ts:13-16:
TypeScript Configuration
The project uses TypeScript 5.8.2 with strict type checking. Thetsconfig.json includes:
- strict: Enables all strict type-checking options
- jsx: Uses React 17+ JSX transform
- moduleResolution: Bundler mode for Vite compatibility
Vite Configuration Deep Dive
Thevite.config.ts:5-23 provides advanced configuration:
Configuration Options Explained
- port: 3000 - Custom development port (default is 5173)
- host: ‘0.0.0.0’ - Allows network access (useful for mobile testing)
- plugins: [react()] - Enables React Fast Refresh and JSX
- define - Injects environment variables at build time
- alias - Path alias
@for cleaner imports
Customizing the Port
To change the development port, editvite.config.ts:9:
WordPress API Setup
The application integrates with WordPress for blog content vialib/wordpress.ts:3:
WordPress API Functions
Two main functions handle WordPress integration:Fetch Blog Posts
Fetch Pages by Slug
Testing WordPress Connection
Verify the WordPress API is accessible:data/data.tsx.
Production Build
Build the application for production deployment.Run Production Build
dist/ directory.Preview Production Build
Verify Build Output
dist/ directory contains:Build Optimization
Vite automatically optimizes your production build:- Code Splitting - Automatic chunk splitting for better caching
- Tree Shaking - Removes unused code
- Minification - Compresses JavaScript and CSS
- Asset Optimization - Optimizes images and fonts
- Source Maps - Generated for debugging (can be disabled)
Deployment Options
The project is configured for easy deployment to multiple platforms.Vercel Deployment (Recommended)
The project includesvercel.json:1-80:
Install Vercel CLI
Deploy
Configure Environment Variables
GEMINI_API_KEY- Any other production variables
Netlify Deployment
Create anetlify.toml in the project root:
Manual Deployment
For static hosting (Nginx, Apache, AWS S3, etc.):- Build the project:
npm run build - Upload
dist/folder contents to your server - Configure server rewrites to
index.htmlfor SPA routing
Post-Installation Checklist
After installation, verify everything works:Check Development Server
✓ Hot Module Replacement works
✓ No console errors
Verify WordPress Integration
✓ Featured images display correctly
✓ Fallback content works if API fails
Test Routing
✓ Solution detail pages load
✓ Blog detail pages work
✓ 404 handling for unknown routes
Validate SEO
✓ Open Graph tags present
✓ Page titles update per route
Production Build
✓ Preview server runs correctly
✓ All assets load properly
Troubleshooting Installation Issues
npm install fails with permission errors
npm install fails with permission errors
TypeScript compilation errors
TypeScript compilation errors
package.json:21:Vite build fails
Vite build fails
Port 3000 already in use
Port 3000 already in use
vite.config.ts:9.WordPress API CORS errors
WordPress API CORS errors
Updating Dependencies
Keep your dependencies up to date for security and features.Check for Updates
Update All Dependencies
Update to Latest Versions
Development Best Practices
For optimal development experience:- Use TypeScript strictly - Don’t use
anytypes - Follow component patterns - See existing components in
components/ - Test WordPress integration - Ensure fallbacks work
- Optimize images - Use appropriate formats and sizes
- Keep dependencies updated - Run
npm outdatedregularly - Use ESLint (if configured) - Maintain code quality
- Git commit regularly - Track changes incrementally
Next Steps
Start Development
Explore Architecture
Additional Resources
- Vite Documentation - Build tool and dev server
- React Documentation - React 18 features
- TypeScript Handbook - TypeScript guide
- React Router - Client-side routing
- Tailwind CSS - Utility-first CSS
- Lucide Icons - Icon library