localgreenchain/package.json
Claude c2a1b05677
Implement Agent 10: Mobile Optimization with PWA capabilities
This implements the mobile optimization agent (P3 - Enhancement) with:

PWA Configuration:
- Add next-pwa integration with offline caching strategies
- Create web app manifest for installability
- Add service worker with background sync support
- Create offline fallback page

Mobile Components:
- BottomNav: Touch-friendly bottom navigation bar
- MobileHeader: Responsive header with back navigation
- InstallPrompt: Smart PWA install prompt (iOS & Android)
- SwipeableCard: Gesture-based swipeable cards
- PullToRefresh: Native-like pull to refresh
- QRScanner: Camera-based QR code scanning

Mobile Library:
- camera.ts: Camera access and photo capture utilities
- offline.ts: IndexedDB-based offline storage and sync
- gestures.ts: Touch gesture detection (swipe, pinch, tap)
- pwa.ts: PWA status, install prompts, service worker management

Mobile Pages:
- /m: Mobile dashboard with quick actions and stats
- /m/scan: QR code scanner for plant lookup
- /m/quick-add: Streamlined plant registration form
- /m/profile: User profile with offline status

Dependencies added: next-pwa, idb
2025-11-23 03:56:30 +00:00

50 lines
1.4 KiB
JSON

{
"name": "localgreenchain",
"version": "1.0.0",
"private": true,
"license": "MIT",
"scripts": {
"dev": "next dev -p 3001",
"build": "next build",
"start": "next start -p 3001",
"preview": "bun run build && bun run start",
"lint": "next lint",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"cy:open": "cypress open",
"cy:run": "cypress run",
"test:e2e": "start-server-and-test 'bun run preview' http://localhost:3001 cy:open",
"test:e2e:ci": "start-server-and-test 'bun run preview' http://localhost:3001 cy:run"
},
"dependencies": {
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.1",
"@tanstack/react-query": "^4.0.10",
"classnames": "^2.3.1",
"drupal-jsonapi-params": "^1.2.2",
"html-react-parser": "^1.2.7",
"idb": "^7.1.1",
"next": "^12.2.3",
"next-drupal": "^1.6.0",
"next-pwa": "^5.6.0",
"nprogress": "^0.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.8.6",
"socks-proxy-agent": "^8.0.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/jest": "^29.5.0",
"@types/node": "^17.0.21",
"@types/react": "^17.0.0",
"autoprefixer": "^10.4.2",
"eslint-config-next": "^12.0.10",
"jest": "^29.5.0",
"postcss": "^8.4.5",
"tailwindcss": "^3.0.15",
"ts-jest": "^29.1.0",
"typescript": "^4.5.5"
}
}