Prerequisites
Before installing the system, ensure you have the following installed on your machine:- Node.js (v18 or higher)
- npm, yarn, or pnpm package manager
- Git for version control
- A modern web browser (Chrome, Firefox, Safari, or Edge)
Installation Steps
1. Clone the Repository
First, clone the project repository to your local machine:2. Install Dependencies
Install all required dependencies using your preferred package manager:- React 18.3.1 - UI framework
- Vite 6.4.1 - Build tool and dev server
- TypeScript 5.8.3 - Type safety
- Radix UI - Accessible component primitives
- TanStack Query - Data fetching and state management
- React Router DOM - Client-side routing
- Tailwind CSS - Utility-first styling
- Zod - Schema validation
- ExcelJS - Report generation
3. Configure Environment Variables
Create a.env file in the root directory and configure the required environment variables:
.env file with your settings:
4. Start the Development Server
Run the development server:http://localhost:5173 by default.
Build for Production
To create an optimized production build:Build Modes
The system supports different build modes: Production Build (default)- Optimized for performance
- Source maps disabled
- Console logs removed
- Debug statements stripped
- Includes debugging information
- Source maps enabled
- Suitable for testing
Preview Production Build
To preview the production build locally:Code Quality
Linting
Run ESLint to check code quality:TypeScript Configuration
The project uses TypeScript with the following configuration (seetsconfig.json:4-15):
- Path aliases:
@/*maps to./src/* - Relaxed type checking for rapid development
- Skip library checks for faster compilation
- Null checks disabled
Deployment
The built application can be deployed to any static hosting service:- Build the application:
npm run build - Deploy the
distfolder to your hosting provider - Configure environment variables on your hosting platform
Recommended Hosting Platforms
- Vercel - Zero-config deployment
- Netlify - Continuous deployment
- AWS S3 + CloudFront - Scalable hosting
- GitHub Pages - Free static hosting
Troubleshooting Installation
Port 5173 already in use
Port 5173 already in use
The Vite dev server uses port 5173 by default. If it’s occupied:
- Stop the process using the port
- Or modify
vite.config.ts:10to use a different port:
Module not found errors
Module not found errors
If you encounter module resolution errors:
- Delete
node_modulesand lock files: - Reinstall dependencies:
- Clear Vite cache:
TypeScript errors
TypeScript errors
If you see TypeScript compilation errors:
- Ensure you’re using TypeScript 5.8.3 or higher
- Check that
tsconfig.jsonincludes the correct paths - Restart your IDE/editor
- Run
npx tsc --noEmitto check for type errors
Next Steps
Configuration
Configure the application settings
Environment Setup
Set up development and production environments
User Management
Manage users and authentication