localgreenchain/package.json
Claude 7098335ce7
Add real-time updates system with Socket.io
Implement Agent 6: Real-Time Updates feature for LocalGreenChain:

- Add Socket.io server with room-based subscriptions
- Create client-side hooks (useSocket, useLiveFeed, usePlantUpdates)
- Add SocketProvider context for application-wide state
- Implement UI components:
  - ConnectionStatus: Shows WebSocket connection state
  - LiveFeed: Real-time event feed display
  - NotificationToast: Toast notifications with auto-dismiss
  - LiveChart: Real-time data visualization
- Add event type definitions and formatting utilities
- Create socket API endpoint for WebSocket initialization
- Add socket stats endpoint for monitoring
- Extend tailwind with fadeIn/slideIn animations

Integrates with existing EventStream SSE system for fallback.
2025-11-23 03:51:51 +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",
"next": "^12.2.3",
"next-drupal": "^1.6.0",
"nprogress": "^0.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.8.6",
"socket.io": "^4.7.2",
"socket.io-client": "^4.7.2",
"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"
}
}