Field PWA¶
The JDX Field PWA is a mobile-first Progressive Web Application designed for field technicians and sales representatives. Built with Flask 3.x and integrating with Odoo via JSON-RPC and REST APIs.
Features¶
| Feature | Description |
|---|---|
| Offline Support | Service worker with intelligent caching strategies |
| Job Management | View, filter, and manage FSM orders with stage workflow |
| Digital Signatures | Capture customer signatures with S3 storage |
| Sales Dashboard | Track sales performance with weekly/monthly analytics |
| Quote Builder | Create and edit quotes from CRM leads |
| CRM Pipeline | Swipeable stage-based lead management |
| Inventory | Manage incoming (WH-IN) and outgoing (WH-OUT) pickings |
| SMS Integration | Send messages and view conversation history via JustCall |
| Photo Gallery | Attach photos/videos to quotes with S3 storage |
Access¶
| Environment | URL |
|---|---|
| Test | http://localhost:8000 |
| Production | https://field.yourdomain.com |
Technology Stack¶
| Component | Technology | Version |
|---|---|---|
| Backend | Flask | 3.0+ |
| WSGI Server | Gunicorn | 21.0+ |
| Frontend | HTML5, Bootstrap 5, JavaScript | |
| Storage | AWS S3 (signatures, photos) | |
| API | Odoo JSON-RPC + REST API | |
| Authentication | Session-based with Odoo |
Architecture Overview¶
flowchart TB
subgraph "Mobile Device"
Browser[Browser/PWA]
SW[Service Worker]
Cache[(IndexedDB/Cache)]
end
subgraph "PWA Server"
Flask[Flask App]
Gunicorn[Gunicorn]
end
subgraph "Backend Services"
Odoo[Odoo 15]
S3[AWS S3]
JustCall[JustCall API]
end
Browser --> SW
SW --> Cache
Browser --> Gunicorn
Gunicorn --> Flask
Flask -->|JSON-RPC| Odoo
Flask -->|REST API| Odoo
Flask --> S3
Odoo --> JustCall
Modules¶
| Module | Route | Description |
|---|---|---|
| Dashboard | /dashboard |
Admin infographics (jobs, inventory stats) |
| Jobs | /jobs/* |
FSM order management and signatures |
| Sales | /sales/* |
Sale orders, quotes, and dashboard |
| CRM | /crm/* |
Lead pipeline and opportunity management |
| Inventory | /inventory/* |
Incoming/outgoing stock pickings |
| Customers | /customers/* |
Customer search and details |
| SMS | /api/sms/* |
JustCall SMS integration |
Quick Start¶
# Access PWA locally
open http://localhost:8000
# Login with Odoo credentials
# Username: your_odoo_username
# Password: your_odoo_password
Configuration¶
Environment variables for PWA (.env in pwa/ directory):
# Flask
FLASK_APP=run.py
FLASK_ENV=production
SECRET_KEY=your-secret-key
# Odoo Connection (JSON-RPC + REST)
ODOO_BASE_URL=http://odoo:8069
ODOO_DB=odoo_production
ODOO_CLIENT_ID=your-oauth-client-id
ODOO_CLIENT_SECRET=your-oauth-client-secret
ODOO_API_KEY=your-api-key
# Service Account (for JSON-RPC operations)
ODOO_SERVICE_USERNAME=service-user@domain.com
ODOO_SERVICE_PASSWORD=service-password
# AWS S3 (signatures and photos)
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_REGION=us-east-1
S3_BUCKET=jdx-field-signatures
# Timezone
APP_TIMEZONE=America/Chicago
Health Check¶
The PWA provides a health endpoint:
Response:
Documentation Sections¶
- Architecture - Technical architecture and service worker
- Authentication - Login flow and session management
- Jobs Module - FSM job management and signatures
- Sales Module - Sales orders, quotes, and dashboard
- CRM Module - Lead pipeline management
- Inventory Module - Stock picking operations
- SMS Integration - JustCall SMS features