Prerequisites
Node.js and npm
labelWise requires Node.js to run the development server and build tools. Required version:- Node.js 18.0 or higher (20.x LTS recommended)
- npm 9.0 or higher (comes with Node.js)
-
macOS/Linux: Use nvm (Node Version Manager)
- Windows: Download from nodejs.org or use nvm-windows
Git
You’ll need Git to clone the repository:Getting the Code
Clone the Repository
Installing Dependencies
Install all required npm packages:- React 19 and React DOM - UI framework
- TypeScript - Type checking
- Vite - Build tool and dev server
- Tailwind CSS v4 - Styling
- ESLint - Code linting
- And all other dependencies from
package.json
The installation process downloads packages from npm and may take 1-3 minutes depending on your internet connection.
Running the Development Server
Start the Vite development server:Development Server Features
- Hot Module Replacement (HMR) - Changes appear instantly without full page reload
- Fast Refresh - React component state preserved during updates
- TypeScript checking - Type errors shown in the browser and terminal
- Error overlay - Build errors displayed directly in the browser
Available npm Scripts
labelWise provides several npm scripts for development:npm run dev
Starts the Vite development server with HMR.
- Port: 5173 (default)
- Use case: Daily development work
npm run build
Builds the application for production.
- TypeScript compilation -
tsc -bchecks types across all TypeScript files - Vite build - Bundles the application into
dist/directory
dist/
npm run lint
Runs ESLint to check code quality.
npm run preview
Serves the production build locally for testing.
- Port: 4173 (default)
- Use case: Testing the production build before deployment
Project File Structure
After installation, your project structure should look like this:IDE Setup
VS Code (Recommended)
labelWise works best with Visual Studio Code. Install these extensions:Essential Extensions
-
ESLint (
dbaeumer.vscode-eslint)- Real-time linting in the editor
- Auto-fix on save
-
Prettier - Code formatter (
esbenp.prettier-vscode)- Consistent code formatting
- Format on save
-
Tailwind CSS IntelliSense (
bradlc.vscode-tailwindcss)- Autocomplete for Tailwind classes
- Hover previews of styles
-
TypeScript and JavaScript Language Features (built-in)
- TypeScript IntelliSense
- Auto-imports
Recommended Extensions
-
Error Lens (
usernamehw.errorlens)- Inline error messages
-
Auto Rename Tag (
formulahendry.auto-rename-tag)- Automatically rename paired HTML/JSX tags
-
Path Intellisense (
christian-kohler.path-intellisense)- Autocomplete for file paths
VS Code Settings
Create or update.vscode/settings.json:
Other IDEs
labelWise should work with any modern IDE that supports TypeScript and React:- WebStorm - Excellent TypeScript support out of the box
- Sublime Text - Install TypeScript and ESLint plugins
- Vim/Neovim - Use CoC or built-in LSP with
typescript-language-server
Debugging
Browser DevTools
The development build includes full source maps for debugging:- Open browser DevTools (F12)
- Go to the Sources tab
- Navigate to
webpack://→src/ - Set breakpoints in your TypeScript files
VS Code Debugging
Create.vscode/launch.json for debugging in VS Code:
Common Debugging Scenarios
React DevTools: Install the React DevTools browser extension: Inspect component state, props, and hooks in the React tab of DevTools. TypeScript Errors: If you see TypeScript errors in the terminal:- Check the error message and file location
- Run
npm run buildto see all errors at once - Use your IDE’s TypeScript features to see inline errors
- Ensure
@tailwindcss/viteplugin is loaded invite.config.ts - Check that
index.cssimports Tailwind directives - Restart the dev server (
Ctrl+C, thennpm run dev)
Troubleshooting
Port Already in Use
If port 5173 is already in use:Module Not Found Errors
If you see module import errors:TypeScript Configuration Issues
If path aliases (@/) don’t work:
- Ensure
tsconfig.jsonhas the correctbaseUrlandpaths - Restart your IDE to reload TypeScript configuration
- Run
npx tsc --showConfigto verify configuration
Build Failures
Ifnpm run build fails:
- Check for TypeScript errors:
npx tsc --noEmit - Ensure all dependencies are installed:
npm install - Clear Vite cache:
rm -rf node_modules/.vite - Check Node.js version:
node --version(must be 18+)
Next Steps
Now that you have labelWise running locally:- Explore the code - Start with
src/App.tsxto understand the application flow - Read the architecture - Check Architecture for technical details
- Make changes - Try modifying the UI or adding a feature
- Contribute - See Contributing for guidelines
Getting Help
If you encounter issues not covered here:- Check GitHub Issues for similar problems
- Search the Vite documentation
- Ask in the project’s discussion forum or chat
- Review the Contributing guide for support channels