Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mich9025/vencol-front/llms.txt
Use this file to discover all available pages before exploring further.
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
For the best development experience, we recommend Node.js 18.x or 20.x LTS with pnpm as the package manager.
Installation Methods
Option 1: Using npm (Default)
Install Dependencies
Navigate to your project directory and install all required packages:This installs all dependencies from
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
Confirm all packages installed correctly:You should see all packages listed without errors.
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
If you don’t have pnpm installed, install it globally:Or use Corepack (Node.js 16.13+):
Install Dependencies
Install project dependencies with pnpm:pnpm uses the existing
pnpm-lock.yaml for deterministic installations.Option 3: Using Yarn
Install Dependencies
Install all packages:Yarn will generate a
yarn.lock file for dependency resolution.Environment Configuration
The application supports environment variables for API configuration.Creating Environment File
Create a.env file in the project root:
.env
Environment Variables in Vite
Vite exposes environment variables throughvite.config.ts:13-16:
vite.config.ts
TypeScript Configuration
The project uses TypeScript 5.8.2 with strict type checking. Thetsconfig.json includes:
tsconfig.json
- 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:
vite.config.ts
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:
lib/wordpress.ts
WordPress API Functions
Two main functions handle WordPress integration:Fetch Blog Posts
lib/wordpress.ts
Fetch Pages by Slug
lib/wordpress.ts
Testing WordPress Connection
Verify the WordPress API is accessible:data/data.tsx.
Production Build
Build the application for production deployment.Run Production Build
Compile and optimize the application:This creates an optimized build in the
dist/ directory.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:
vercel.json
Netlify Deployment
Create anetlify.toml in the project root:
netlify.toml
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
✓ Dev server runs on port 3000
✓ Hot Module Replacement works
✓ No console errors
✓ Hot Module Replacement works
✓ No console errors
Verify WordPress Integration
✓ Blog posts load from WordPress
✓ Featured images display correctly
✓ Fallback content works if API fails
✓ Featured images display correctly
✓ Fallback content works if API fails
Test Routing
✓ All routes navigate correctly
✓ Solution detail pages load
✓ Blog detail pages work
✓ 404 handling for unknown routes
✓ Solution detail pages load
✓ Blog detail pages work
✓ 404 handling for unknown routes
Troubleshooting Installation Issues
npm install fails with permission errors
npm install fails with permission errors
On Linux/macOS:Or use a Node version manager:
TypeScript compilation errors
TypeScript compilation errors
Ensure TypeScript version matches Reinstall dependencies:
package.json:21:Vite build fails
Vite build fails
Clear Vite cache:Check Node.js version:
Port 3000 already in use
Port 3000 already in use
Find and kill the process:Or change the port in
vite.config.ts:9.WordPress API CORS errors
WordPress API CORS errors
The WordPress server must allow CORS from your domain. Contact your WordPress admin to add CORS headers:
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
Return to the Quickstart Guide to begin building features.
Explore Architecture
Learn about the project structure and design patterns.
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
Installation complete! Your VENCOL Front Template is ready for development. Start the dev server and begin customizing your application.