Prerequisites
Before installing labelWise, ensure you have the following installed on your system:Node.js
labelWise requires Node.js to run the development server and build the application.Recommended Version: Node.js 18 or higherCheck your version:
- Download: Visit nodejs.org and download the LTS version
- Using nvm (recommended):
Git
Git is required to clone the repository.Installation
Development
Start the Development Server
Run the app in development mode with hot module replacement:http://localhost:5173.
Project Structure
Understanding the codebase structure:Key Type Definitions
The app uses TypeScript for type safety. Main types fromsrc/features/labelwise/types.ts:
Production Build
Build the Application
Create an optimized production build:- Runs TypeScript compiler (
tsc -b) to check for type errors - Bundles the app with Vite for production
- Outputs optimized files to the
dist/directory
The build process typically takes 10-30 seconds and creates a
dist/ folder with all static assets.Preview Production Build
Test the production build locally before deployment:dist/ folder at http://localhost:4173.
Deployment
labelWise is a static web application that can be deployed to any hosting platform that serves static files.Vercel (Recommended)
The official demo is hosted on Vercel: https://label-wise-ashen.vercel.app/Netlify
Deploy to Netlify with drag-and-drop or the CLI:Deploy
Option 1 - Drag & Drop:
- Go to netlify.com/drop
- Drag the
dist/folder onto the page
GitHub Pages
Deploy to GitHub Pages with GitHub Actions:-
Create
.github/workflows/deploy.yml: -
Enable GitHub Pages in repository settings and select the
gh-pagesbranch
Static File Servers
Serve thedist/ folder with any static file server:
Environment Setup
Development Environment
labelWise runs entirely in the browser with no backend required. However, you may want to configure:Port Configuration
Change the default Vite dev server port by editingvite.config.ts or using CLI flags:
Editor Setup
Recommended VS Code extensions:- ESLint: For linting
- Prettier: For code formatting
- Tailwind CSS IntelliSense: For Tailwind class autocomplete
- TypeScript: Built-in, but ensure itβs enabled
Linting
Run ESLint to check for code quality issues:Troubleshooting
Common Issues
Port 5173 already in use
Port 5173 already in use
Either kill the process using the port or specify a different port:
TypeScript errors during build
TypeScript errors during build
Ensure all type errors are resolved:This runs the TypeScript compiler without emitting files to check for errors.
Module not found errors
Module not found errors
Delete
node_modules and reinstall:Images not loading after deployment
Images not loading after deployment
Check that your static asset paths are correct. Vite automatically handles asset imports, but ensure:
- Image imports use relative paths
- Public assets are in the
public/directory - Base URL is configured correctly in
vite.config.tsif deploying to a subdirectory
Next Steps
Quick Start
Learn how to create your first annotation
Introduction
Explore all features and use cases