Overview
The standalone deployment runs APTIV Scrap Control as a pure frontend application without requiring a backend server. All data is stored locally in the browser’slocalStorage, making it perfect for:
- Quick demos and testing
- Single-user installations
- Offline-capable deployments
- Development environments
Prerequisites
Check Node.js Version
Modern Web Browser
Any modern browser with JavaScript enabled:
- Google Chrome 90+
- Mozilla Firefox 88+
- Microsoft Edge 90+
- Safari 14+
Installation
Install Dependencies
Install all required npm packages:This installs the following key dependencies:
- react 19.2.3 - UI framework
- tailwindcss 4.1.17 - Styling
- recharts 3.7.0 - Data visualization
- lucide-react 0.574.0 - Icons
- date-fns 4.1.0 - Date utilities
- jspdf / jspdf-autotable - PDF export
Build the Application
Compile the React application for production:This creates an optimized build in the
dist/ directory using Vite.Default Access Credentials
The standalone deployment includes pre-configured demo users for testing:| Username | Password | Role | Permissions |
|---|---|---|---|
admin | admin123 | Administrator | Full system access, user management, configuration |
calidad | calidad123 | Quality | View global reports, manage catalogs, audit logs |
supervisor1 | super123 | Supervisor | View area reports, edit daily records, export data |
operador1 | oper123 | Operator | Register scrap, view own records only |
Data Storage
localStorage Structure
Standalone mode uses browser localStorage with the following keys:scrap_areas- Production areas catalogscrap_catnp- Part number catalogscrap_fallas- Failure modes catalogscrap_turnos- Shift catalog with schedulesscrap_cadenas- Production chainsscrap_lineas- Production linesscrap_categorias- Scrap categoriesscrap_unidades- Units of measurescrap_usuarios- System usersscrap_roles- User roles and permissionsscrap_pesaje- Scrap records (main data)scrap_auditoria- Audit logscrap_tolerancias- Tolerance thresholdsscrap_auth_token- Current session token
Storage Limits
Browser Storage Capacity
- Chrome/Edge: ~10 MB per origin
- Firefox: ~10 MB per origin
- Safari: ~5 MB per origin
Data Backup and Restore
Export Data
- Log in as administrator
- Navigate to Settings → Backup
- Click Export All Data
- Save the JSON file to a safe location
Import Data
- Go to Settings → Backup
- Click Import Data
- Select your backup JSON file
- Confirm the restoration
Development Server
For active development with hot-reload:http://localhost:5173 with:
- Hot Module Replacement (HMR)
- Fast refresh for React components
- Source maps for debugging
Build Configuration
The build process uses Vite with the following optimizations:Barcode Scanner Integration
Standalone mode fully supports USB barcode scanners:Scanner Requirements
- USB HID mode (keyboard emulation)
- Configure to append Enter/CR after scan
- No drivers required - works as keyboard input
Troubleshooting
Application Not Loading
localStorage Full Error
- Export and archive old scrap records
- Delete unnecessary audit logs
- Consider migrating to Docker deployment for unlimited storage
Blank Screen After Login
- Open browser Developer Tools (F12)
- Check Console tab for JavaScript errors
- Verify localStorage is enabled:
- Disable browser extensions that block localStorage
- Check if running in private/incognito mode (limited storage)
Data Not Persisting
Ensure:- Not in private browsing mode
- Browser storage settings allow site data
- Regular backups are exported
Performance Optimization
Recommended Settings
Browser Optimization
- Disable extensions when using the app
- Enable hardware acceleration in browser settings
- Close unused tabs to free memory
- Clear browser cache weekly
Large Datasets
When localStorage contains >1000 scrap records:- Archive old data: Export records older than 6 months
- Paginate queries: Limit date ranges in reports
- Upgrade to Docker: For unlimited database storage
Next Steps
Docker Deployment
Scale to multi-user with MySQL backend
Network Setup
Configure LAN access for multiple clients
User Management
Configure user accounts and permissions
Data Management
Import/export data and backups