A React TypeScript web application for monitoring power usage and managing users.
WorkWatt Frontend is a web interface for WorkWatt - a system designed to track computer power usage across an organization. It provides real-time monitoring, usage analytics, and user management.
- User authentication and role-based access control
- Real-time active user monitoring via WebSockets
- Power usage visualization with charts
- User registration via confirmation on email and management
- Responsive Material UI interface
- Node.js (v16+)
- npm or yarn
- Clone the repository
- Navigate to the project directory
- Install dependencies
npm installnpm run dev
/src - Source code
/api - API configuration and interceptors
/components - Reusable UI components
/pages - Page components
/App.tsx - Main application component
/main.tsx - Entry point
LoginForm - User authentication
RegisterForm - New user registration
SingleUserChart - Power usage visualization
ActiveUsers - Real-time user activity monitoring
Navbar - Navigation component
React 19
TypeScript
Material UI 7
Vite
Axios
STOMP WebSockets
React Router
React Hook Form
The application connects to a backend server at http://localhost:8080 with the following endpoints:
Authentication: /api/v1/auth/authenticate
User registration: /api/v1/user/password/set
Usage history: /api/v1/usage/history
Active users WebSocket: /api/v1/usage/active
wortwatt-desktop: Desktop client for tracking computer power usage





