Deployment Guide
Overview
This guide covers how to deploy and configure the TrafficPOS system in a production retail environment. The system is designed for cannabis dispensaries with offline-first architecture.
Production Ready: TrafficPOS is designed for production use with robust offline capabilities and comprehensive data protection.
System Requirements
Minimum Hardware
Component | Minimum | Recommended |
---|---|---|
Device | iPad (iOS 12+), Android tablet (Chrome 80+), or Windows/Mac computer | iPad Pro, high-end Android tablet, or modern computer |
RAM | 2GB | 4GB+ |
Storage | 500MB free space | 2GB+ for local data |
Network | WiFi or ethernet (can work offline) | Stable broadband connection |
Supported Browsers
- Chrome/Edge 80+ (Recommended)
- Safari 12+ (iOS/macOS)
- Firefox 75+
Optional Hardware
- Thermal receipt printer (USB/Bluetooth)
- Barcode scanner (USB/Bluetooth)
- Cash drawer with electronic release
- Customer display screen
- Card payment terminal
Deployment Options
Option 1: Cloud Hosted (Recommended)
Host the frontend on a service like Vercel, Netlify, or AWS Amplify.
Pros:
- Automatic updates and deployments
- No local server maintenance needed
- Easy multi-location setup
- Built-in CDN for fast loading
- SSL certificates included
Cons:
- Requires internet for updates
- Monthly hosting costs ($0-20/month)
- Less control over infrastructure
Option 2: Local Server
Run on a local computer/server in the store.
Pros:
- Complete control over system
- Works on local network only
- No ongoing hosting costs
- Maximum security and privacy
- Custom configurations possible
Cons:
Option 3: Hybrid Approach
Cloud hosting with local backup server.
Best for:
- Multi-location businesses
- High-availability requirements
- Compliance-sensitive environments
- Businesses with IT support
Cloud Deployment (Vercel - Recommended)
1
Prepare Source Code
- Clone or download the TrafficPOS repository
- Ensure all dependencies are installed
- Test the build process locally
- Configure environment variables
npm install
npm run build
npm run preview
2
Set Up Vercel Account
- Create account at vercel.com
- Connect your Git repository (GitHub/GitLab)
- Configure project settings
- Set build commands and output directory
3
Configure Environment Variables
Set up the following environment variables in Vercel:
VITE_API_BASE_URL=https://your-api-server.com
VITE_USE_MOCK_API=false
VITE_OPENAI_API_KEY=your-openai-key (optional)
4
Deploy and Test
- Trigger deployment from Git push
- Verify build completes successfully
- Test PWA installation
- Verify offline functionality
- Test on target devices
5
Configure Custom Domain
- Purchase domain (e.g., pos.yourdispensary.com)
- Add domain in Vercel dashboard
- Update DNS settings
- Verify SSL certificate
Local Server Deployment
1
Prepare Server Environment
- Install Node.js 18+ on server
- Install web server (nginx or Apache)
- Configure firewall and security
- Set up SSL certificates
2
Build and Deploy Application
# Build the application
npm install
npm run build
# Copy build files to web server
sudo cp -r dist/* /var/www/html/
sudo chown -R www-data:www-data /var/www/html/
3
Configure Web Server
Example nginx configuration:
server {
listen 80;
listen 443 ssl;
server_name pos.local;
root /var/www/html;
index index.html;
# PWA support
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
4
Set Up SSL/HTTPS
- Generate SSL certificate (Let's Encrypt or self-signed)
- Configure HTTPS in web server
- Test HTTPS access
- Redirect HTTP to HTTPS
HTTPS Required: PWA features and microphone access require HTTPS in production.
Post-Deployment Configuration
PWA Installation
1
Install on Each Device
- Open the deployed URL in browser
- Look for "Install App" prompt
- Accept installation to add to home screen
- Verify offline functionality works
2
Configure App Settings
- Set app to Offline Mode (recommended)
- Import product catalog
- Create employee accounts
- Configure business information
- Enable automated backups
Hardware Integration
Optional Hardware: All hardware is optional. The system works fully with just a tablet or computer.
Receipt Printer Setup
- Connect printer via USB or Bluetooth
- Install printer drivers if needed
- Test printing from browser
- Configure print settings in app
Barcode Scanner Setup
- Connect USB or Bluetooth scanner
- Configure scanner to send Enter after scan
- Test scanning in product search
- Train staff on scanning procedures
Security Configuration
Network Security
- Use WPA3 WiFi encryption
- Separate guest network
- Firewall configuration
- Regular security updates
Application Security
- HTTPS/SSL encryption
- Strong employee passwords
- Regular backup verification
- Access control by role
Data Protection
- Encrypted backup storage
- Local data encryption
- Regular backup testing
- Incident response plan
Performance Optimization
Device Optimization
- Clear Browser Cache: Regularly clear cache to free space
- Close Unused Tabs: Keep only POS tab open
- Restart Daily: Restart device daily for optimal performance
- Monitor Storage: Ensure adequate free space
Network Optimization
- Bandwidth Management: Prioritize POS traffic
- Redundant Connections: Multiple internet connections
- Local Caching: Cache static resources locally
- Quality of Service: Configure QoS rules
Troubleshooting Common Issues
Application Won't Load
Symptoms: White screen, loading errors, or crashes
Solutions:
- Check internet connection
- Clear browser cache and data
- Disable browser extensions
- Try different browser
- Check browser console for errors
- Verify HTTPS certificate
PWA Installation Issues
Symptoms: No install prompt or installation fails
Solutions:
- Ensure HTTPS connection
- Check manifest.json is accessible
- Verify service worker registration
- Clear browser data and retry
- Use supported browser
Offline Mode Not Working
Symptoms: App doesn't work without internet
Solutions:
- Verify PWA is installed
- Check service worker status
- Ensure app was loaded while online first
- Clear cache and reload
- Reinstall PWA
Maintenance Procedures
Daily Tasks
- Check backup completion status
- Monitor system performance
- Verify internet connectivity
- Review error logs
Weekly Tasks
- Test backup and restore procedures
- Update browser if needed
- Clean temporary files
- Review security logs
Monthly Tasks
- Update application if new version available
- Review and update security settings
- Conduct full system backup
- Performance optimization review
Scaling and Multi-Location
Single Location Setup
- One PWA installation per terminal
- Shared network and printer access
- Centralized backup storage
- Role-based access control
Multi-Location Setup
- Separate PWA instance per location
- Centralized user management (with API)
- Location-specific product catalogs
- Consolidated reporting
Production Ready: Following this deployment guide ensures a robust, secure, and scalable TrafficPOS installation suitable for production dispensary operations.
Support and Resources
Technical Resources
- Feature Reference
- Browser developer tools
Emergency Procedures
- System recovery procedures
- Data loss incident response
- Emergency contact information
- Backup restoration guides