A professional floor planning application with floating panels, 3D visualization, and collaboration features.
- ποΈ Intuitive Drag & Drop Interface - One-click wall placement with automatic alignment
- π¨ Real-time 3D Visualization - Instant 2D-to-3D sync without rendering delays
- π― Floating Panel System - Repositionable, resizable panels with shadcn UI
- π€ Real-time Collaboration - Multi-user editing with shared cursors
- π Automated Measurements - Auto-calculated dimensions and clearance validation
- π€ Advanced Export - 8K renders, PDFs, and virtual walkthroughs
- π± Mobile Optimized - Touch controls and responsive design
- π§ CAD Import - Support for DXF, DWG, IFC, and Revit formats
- Node.js 18+
- npm or pnpm
# Clone the repository
git clone <repository-url>
cd floorplanner/frontend
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Start development server
npm run dev:standaloneThe application will be available at http://localhost:5173
# Development
npm run dev:standalone # Start standalone development server
npm run dev # Start with Django integration
# Building
npm run build:standalone # Build for standalone deployment
npm run build:django # Build for Django integration
npm run build # Default build
# Testing & Quality
npm run test # Run tests
npm run test:watch # Run tests in watch mode
npm run lint # Check code quality
npm run lint:fix # Fix linting issues
npm run type-check # TypeScript type checking
# Utilities
npm run preview:standalone # Preview standalone build
npm run clean # Clean build directories- Standalone Build:
npm run build:standalone(outputs todist/) - Django Build:
npm run build:django(outputs to../static/floorplanner/js) - Preview:
npm run preview:standalone(serves production build) - Bundle Analysis: After build, open
dist/bundle-analysis.htmlfor bundle stats - PWA: Manifest and service worker are auto-injected; see
public/manifest.jsonandpublic/sw.js - Production Optimizations: Minification, code splitting, and tree-shaking are enabled by default
- Hot Module Replacement: Enabled in development mode
The application uses environment variables for configuration. Copy .env.example to .env and customize:
# Application
VITE_APP_TITLE=FloorPlanner
VITE_APP_VERSION=1.0.0
# API Configuration
VITE_API_BASE_URL=http://localhost:3001/api
VITE_WS_URL=ws://localhost:3001/ws
# Authentication
VITE_ENABLE_AUTH=false
VITE_AUTH_PROVIDER=local
# Features
VITE_ENABLE_COLLABORATION=true
VITE_ENABLE_3D_VIEW=true
VITE_ENABLE_EXPORT=true
VITE_ENABLE_CAD_IMPORT=true
# Storage
VITE_STORAGE_TYPE=localStorage
VITE_AUTO_SAVE_INTERVAL=30000
# Development
VITE_DEBUG_MODE=true
VITE_MOCK_API=trueThe following environment variables are used for configuration. Set these in your .env file:
| Variable | Description | Example Value |
|---|---|---|
| VITE_APP_TITLE | Application title | FloorPlanner |
| VITE_APP_VERSION | Application version | 1.0.0 |
| VITE_API_BASE_URL | API base URL | http://localhost:3001/api |
| VITE_WS_URL | WebSocket URL | ws://localhost:3001/ws |
| VITE_ENABLE_AUTH | Enable authentication (true/false) | false |
| VITE_AUTH_PROVIDER | Auth provider (local, firebase, auth0) | local |
| VITE_ENABLE_COLLABORATION | Enable real-time collaboration | true |
| VITE_ENABLE_3D_VIEW | Enable 3D view | true |
| VITE_ENABLE_EXPORT | Enable export features | true |
| VITE_ENABLE_CAD_IMPORT | Enable CAD import | true |
| VITE_STORAGE_TYPE | Storage type (localStorage, indexedDB) | localStorage |
| VITE_AUTO_SAVE_INTERVAL | Auto-save interval (ms) | 30000 |
| VITE_DEBUG_MODE | Enable debug mode | true |
| VITE_MOCK_API | Use mock API (true/false) | true |
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- shadcn/ui - UI components
- Zustand - State management
- Konva.js - 2D canvas rendering
- Three.js - 3D visualization
- React Three Fiber - React Three.js integration
src/
βββ components/ # React components
β βββ panels/ # Floating panel components
β βββ ui/ # shadcn UI components
β βββ ...
βββ config/ # Configuration management
βββ hooks/ # Custom React hooks
βββ services/ # API and external services
βββ stores/ # Zustand state stores
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
The application features a sophisticated floating panel system with:
- Draggable & Resizable Panels - Move and resize panels anywhere on screen
- State Persistence - Panel positions saved between sessions
- Keyboard Shortcuts - Quick panel operations
- Mobile Responsive - Adaptive layouts for different screen sizes
- Accessibility - Full keyboard navigation and screen reader support
- Build the application:
npm run build:standalone-
Deploy the
distfolder to your web server or CDN -
Configure your web server to serve
index.htmlfor all routes (SPA routing)
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build:standalone
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]The application is ready for deployment on modern hosting platforms:
- Vercel: Connect your repository and deploy automatically
- Netlify: Drag and drop the
distfolder or connect via Git
The application includes a mock API service for standalone operation:
- Local Storage - Data persisted in browser
- Simulated Network Delays - Realistic API behavior
- Sample Data - Pre-loaded floor plans and projects
To integrate with your own backend:
- Set
VITE_MOCK_API=falsein.env - Update API endpoints in
src/config/app.config.ts - Implement authentication if needed
- Update WebSocket configuration for real-time features
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Code Splitting - Automatic chunk splitting for optimal loading
- Tree Shaking - Unused code elimination
- Asset Optimization - Compressed images and fonts
- Service Worker - Offline support and caching
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.
For support and questions:
- π§ Email: support@floorplanner.com
- π Documentation: docs.floorplanner.com
- π Issues: GitHub Issues
- Run all tests:
npm run test - Watch mode UI:
npm run test:watch - Coverage:
vitest run --coverage - Test files:
src/components/__tests__/**/*.test.{ts,tsx,js,jsx}
- Start dev server:
npm run dev:standalone - Run E2E tests:
npx playwright test - E2E test files:
src/e2e/*.spec.ts - Playwright config:
playwright.config.ts
- Jest and related dependencies have been removed.
- All unit/integration tests should use Vitest syntax (
describe,it,expectfromvitest). - E2E tests use Playwright and require the app to be running locally.
- See
vitest.config.tsandplaywright.config.tsfor configuration details.
- If tests are not discovered, check file extensions and config include patterns.
- For E2E, ensure the dev server is running before executing Playwright tests.
- For new tests, prefer Vitest for logic/components, Playwright for user flows.