Installation Guide
This guide provides comprehensive instructions for installing and configuring the Pizza Chef Frontend application.System Requirements
Required Software
- Node.js: Version 18 or higher
- Package Manager: npm (comes with Node.js), yarn, or pnpm
- Operating System: Windows, macOS, or Linux
- Browser: Modern browser with ES6+ support (Chrome, Firefox, Safari, Edge)
Recommended Tools
- Git: For cloning the repository
- VS Code: Or any modern code editor with TypeScript support
- Terminal: Command-line interface for running scripts
Installation Steps
Verify Node.js Installation
Check that Node.js is installed and meets the minimum version requirement:You should see version 18.x.x or higher. If Node.js is not installed or outdated:
- Download from nodejs.org
- Or use a version manager like nvm
Clone the Repository
Clone the project repository to your local machine:Verify you’re in the correct directory:You should see
package.json and other project files.Install Dependencies
Install all required dependencies using your preferred package manager:This will install all dependencies listed in
package.json, including:Core Dependencies:- React 19.2.0
- TypeScript 5.9.3
- Redux Toolkit 2.11.2
- React Router DOM 7.13.1
- Tailwind CSS 4.2.1
- React Hook Form 7.71.2
- Zod 4.3.6
- Framer Motion 12.35.0
- Lucide React 0.577.0
- Recharts 3.7.0
- Vite 7.3.1
- Vitest 4.0.18
- ESLint 9.39.1
- React Testing Library 16.3.2
Configuration
Vite Configuration
The project uses Vite as the build tool with the following configuration:- React Plugin: Uses SWC for faster compilation
- Tailwind CSS: Integrated via Vite plugin
- Test Configuration: Vitest with jsdom environment
TypeScript Configuration
The project is built with TypeScript and requires type checking during build:Project Structure
After installation, your project structure will include:Running the Application
After successful installation, start the development server:http://localhost:5173.
Development Scripts
Thepackage.json defines the following scripts:
Development
Building
tsc -b) and creates an optimized production build using Vite.
Preview
Testing
Linting
Environment Configuration
Local Storage
The application uses browser LocalStorage for data persistence:pizza_current_order: Active cart statepizza_orders: Order history for analyticscustom_pizzas: User-created custom pizzaspizza_filters: User filter preferences
Build Output
Production builds are output to thedist/ directory:
Troubleshooting
Installation Issues
Problem: Dependencies fail to install Solution: Clear cache and reinstall:TypeScript Errors
Problem: Type errors during development or build Solution: Ensure TypeScript dependencies are installed:Vite Port Conflicts
Problem: Port 5173 is already in use Solution: Vite will automatically use the next available port. Check terminal output for the actual port, or specify a custom port:Test Environment Issues
Problem: Tests fail to run or environment errors Solution: Verify test dependencies are installed:Build Failures
Problem: Production build fails Solution:- Check for TypeScript errors:
npx tsc --noEmit - Verify all dependencies are installed
- Clear Vite cache:
rm -rf node_modules/.vite
Next Steps
Now that you have successfully installed the Pizza Chef Frontend:- Start Development: Run
npm run devto launch the development server - Explore the Code: Review the source code in the
src/directory - Run Tests: Execute
npm run testto ensure everything works - Build for Production: Create a production build with
npm run build