Prerequisites
Before you begin, ensure you have the following installed:Node.js
Node.js version 18.x or higher is required. We recommend using the latest LTS version.Check your Node.js version:
Installation Steps
Install Dependencies
Install the required dependencies using your preferred package manager:This will install all dependencies defined in
package.json, including:- React 19 and React DOM
- Material-UI components
- Auth0 React SDK
- React Router
- TypeScript and build tools
Configure Environment Variables
Create a
.env file in the root directory with the required configuration.See the Configuration guide for detailed setup instructions.Once the development server is running, you should see the login page when you navigate to
http://localhost:5173.Project Structure
After installation, your project structure will look like this:Available Scripts
The following npm scripts are available:npm run dev
Starts the development server with hot module replacement. Changes to your code will be instantly reflected in the browser.
npm run build
Builds the application for production. This compiles TypeScript and creates optimized bundles:
dist/ directory.
npm run lint
Runs ESLint to check your code for potential issues:
npm run preview
Serves the production build locally for testing:
Always run
npm run build before npm run preview to ensure you’re previewing the latest build.Troubleshooting
Port 5173 is already in use
Port 5173 is already in use
If port 5173 is already in use, Vite will automatically try the next available port. You can also specify a custom port in
vite.config.ts:Module not found errors
Module not found errors
If you encounter module not found errors:
-
Delete
node_modulesand lock files: -
Reinstall dependencies:
TypeScript errors
TypeScript errors
Ensure you’re using TypeScript 5.7 or compatible version:If needed, update TypeScript:
Next Steps
Now that you have Cat Web installed, proceed to configure your environment variables and Auth0 settings.Configuration
Set up environment variables and Auth0 authentication
