Prerequisites
Before you begin, ensure you have the following installed:- Node.js >= 14.0.0
- npm (comes with Node.js)
Clone and Install
Clone the repository and install dependencies:react(^18.3.1) - UI frameworkstyled-components(^6.1.14) - CSS-in-JS stylingvite(^6.2.0) - Build tool and dev serverwebamp(^1.3.2-beta.2) - Winamp playerreact-use(^17.6.0) - React hooks library
Development Workflow
Start Development Server
Run the Vite development server:- Start the dev server at
http://localhost:3000 - Automatically open your browser
- Enable hot module replacement (HMR) for instant updates
- Port:
3000 - Auto-open browser:
true - Custom middleware for serving public HTML files
Path Aliases
Vite is configured with path aliases for convenient imports:assets→src/assetscomponents→src/componentshooks→src/hookscontext→src/contextWinXP→src/WinXP
Build and Preview
Production Build
Create an optimized production build:dist/ directory, ready for deployment.
Preview Production Build
Test the production build locally:dist/ directory to verify the production build works correctly.
Linting with ESLint
The project uses ESLint with Prettier integration for code quality:ESLint Configuration
The project extends:react-app- React-specific linting rulesplugin:prettier/recommended- Prettier integration
Prettier Configuration
Code formatting rules (.prettierrc):
Browser Support
The project targets:>0.2%- Browsers with >0.2% market sharenot dead- Actively maintained browsersnot ie <= 11- No Internet Explorer 11 or belownot op_mini all- No Opera Mini
Troubleshooting
Port Already in Use
If port 3000 is already in use, Vite will automatically try the next available port. You can also manually specify a port invite.config.js.
Module Not Found
If you encounter module resolution errors:-
Clear your
node_modulesand reinstall: -
Verify path aliases in
vite.config.jsmatch your imports
HMR Not Working
If hot module replacement isn’t working:- Check that your components are exported properly
- Restart the dev server
- Clear browser cache
