You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Start development server with hot reload
npm run dev
# Open browser at http://localhost:3000
Build
# Create production build
npm run build
# Preview production build locally
npm run preview
Testing
# Run tests once
npm run test# Run tests in watch mode
npm run test:watch
# Run tests with coverage report
npm run test:coverage
Docker Deployment
Build and Run with Docker
# Build Docker image
npm run docker:build
# or
docker build -t floor-plan-editor .# Run container
npm run docker:run
# or
docker run -p 8080:80 floor-plan-editor
# Access at http://localhost:8080
Docker Compose
# Production (nginx)
docker-compose up -d
# Development with hot reload
docker-compose --profile dev up
# Node.js production server
docker-compose --profile node up
Multi-Stage Build Targets
The Dockerfile supports multiple build targets:
Target
Description
Port
production
Nginx static server (default)
80
node-production
Node.js Express server
8080
# Build specific target
docker build --target production -t floor-plan-editor:nginx .
docker build --target node-production -t floor-plan-editor:node .
Project Structure
shopfloor/
├── floor-plan-editor.html # Main application (single HTML file)
├── package.json # Project configuration
├── vite.config.js # Vite build configuration
├── vitest.config.js # Test configuration
├── server.js # Production Node.js server
├── Dockerfile # Multi-stage Docker build
├── Dockerfile.dev # Development Docker build
├── docker-compose.yml # Docker Compose configuration
├── nginx.conf # Nginx configuration
├── tests/ # Test files
│ ├── setup.js # Test setup and mocks
│ ├── utils.test.js # Unit tests
│ └── integration.test.js # Integration tests
└── dist/ # Build output (generated)