Prerequisites
Before setting up the frontend, ensure you have:- Node.js: Version 18.x or higher recommended
- Package Manager: npm, yarn, or pnpm
- Git: For version control
Installation
Navigate to the frontend directory and install dependencies:Dependencies
The frontend uses a modern React stack with the following core dependencies:Core Dependencies
| Package | Version | Purpose |
|---|---|---|
react | ^18.3.1 | Core React library |
react-dom | ^18.3.1 | React DOM rendering |
Development Dependencies
| Package | Version | Purpose |
|---|---|---|
vite | ^6.0.5 | Build tool and dev server |
@vitejs/plugin-react | ^4.3.4 | React support for Vite |
typescript | ~5.6.2 | TypeScript compiler |
tailwindcss | ^3.4.17 | Utility-first CSS framework |
autoprefixer | ^10.4.20 | PostCSS plugin for vendor prefixes |
postcss | ^8.4.49 | CSS transformation tool |
eslint | ^9.17.0 | Code linting |
typescript-eslint | ^8.18.2 | TypeScript ESLint support |
eslint-plugin-react-hooks | ^5.0.0 | React Hooks linting rules |
eslint-plugin-react-refresh | ^0.4.16 | React Fast Refresh validation |
Package.json Overview
Thepackage.json file defines the project configuration:
Key Configuration
type: "module": Enables ES modules supportprivate: true: Prevents accidental publishing to npm- TypeScript: Type checking before build with
tsc -b
Node Version Requirements
The project requires Node.js 18.x or higher. Vite 6.x has dropped support for Node.js versions below 18.
Check Your Node Version
Recommended Node Versions
- Node.js 18.x: Minimum supported version
- Node.js 20.x: LTS (Long Term Support) - Recommended
- Node.js 22.x: Latest stable version
Using Node Version Managers
- nvm (Linux/macOS)
- nvm-windows
- fnm
Project Structure
After installation, your frontend directory structure looks like:Verification
Verify your setup by running the development server:http://localhost:5173.
Troubleshooting
Port Already in Use
If port 5173 is already in use, Vite will automatically try the next available port (5174, 5175, etc.).Module Not Found Errors
If you encounter module resolution errors:TypeScript Errors
Clear TypeScript build cache:Next Steps
Development
Learn how to run the dev server and build the application
Configuration
Explore Vite, TypeScript, and TailwindCSS configuration