Prerequisites
Before you begin, ensure you have the following installed:Node.js 18+
Download from nodejs.org
npm 9+
Included with Node.js installation
Verify Installation
Check that Node.js and npm are installed correctly:If the commands above don’t work, you need to install Node.js from nodejs.org. Download the LTS (Long Term Support) version.
Installation
Step 1: Clone the Repository
Don't have Git installed?
Don't have Git installed?
You can download the project as a ZIP file:
- Visit the GitHub repository
- Click the green Code button
- Select Download ZIP
- Extract the ZIP file to your preferred location
- Open a terminal in the extracted folder
Step 2: Install Dependencies
Install all required npm packages:This process typically takes 2-5 minutes depending on your internet connection. The command installs all dependencies listed in
package.json.Step 3: Start Development Server
Run the development server:Development Workflow
Available Commands
Here are the main npm scripts you’ll use during development:Hot Module Replacement (HMR)
Vite provides instant hot module replacement. When you save a file, changes appear immediately in the browser without a full page reload.
- Reloads when you save files
- Preserves component state when possible
- Shows compilation errors in the browser
Project Structure
Key directories and files:Configuration
Vite Configuration
Thevite.config.js file contains:
Environment Variables
Vite supports environment variables through.env files:
.env.local
Environment variables must be prefixed with
VITE_ to be exposed to the client-side code.Troubleshooting
Port 5173 already in use
Port 5173 already in use
If port 5173 is already occupied, use a different port:Or set it in
vite.config.js:Module not found errors
Module not found errors
This usually means dependencies weren’t installed correctly:
npm install takes too long
npm install takes too long
The initial installation can take 2-5 minutes. If it’s taking longer:
- Check your internet connection
- Try a different npm registry:
- If behind a proxy, configure npm:
Changes not reflecting in browser
Changes not reflecting in browser
Vite has automatic hot reload, but if changes don’t appear:
- Check the terminal for compilation errors
- Hard reload the browser (Ctrl+Shift+R or Cmd+Shift+R)
- Restart the dev server:
Blank page or styling issues
Blank page or styling issues
This might be a cache issue:
- Clear browser cache (Ctrl+Shift+Delete)
- Hard reload (Ctrl+F5 or Cmd+Shift+R)
- Try in an incognito/private window
- Check the browser console (F12) for errors
Next Steps
Build for Production
Learn how to create optimized production builds
Docker Deployment
Deploy using Docker containers