A modern, React-based frontend application for managing enterprise inventory, employee resources, and organizational structure. This system provides role-based interfaces for employees, managers, administrators, and enterprise owners, offering tailored functionality for each user type.
- Personal and enterprise information view
- Current inventory items in use
- Item request management
- Request status tracking
- Team member management
- Pending requests approval/rejection
- Department inventory oversight
- Team performance metrics
- Enterprise-wide statistics
- Department overview
- Complete employee listing
- Resource allocation insights
- Employee management (CRUD operations)
- Role assignment
- Department configuration
- System access control
- React 18.x
- React Router 6 for routing
- Axios for API communication
- Bootstrap 5 for styling
- Context API for state management
- JWT for authentication
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/your-username/enterprise-inventory-frontend.git
-
Navigate to the project directory
cd enterprise-inventory-frontend -
Install dependencies
npm install # or yarn install -
Create a
.envfile in the root directoryREACT_APP_API_URL=http://localhost:8080
-
Start the development server
npm start # or yarn start
The application uses JWT (JSON Web Tokens) for authentication. Tokens are stored in localStorage and automatically included in API requests through an Axios interceptor.
Login Flow
- User submits credentials.
- Backend validates and returns JWT.
- Token stored in
localStorage. - User redirected to role-specific dashboard.
Public Routes
/login- Login page/register- Registration page
Protected Routes
/employee-dashboard- Employee view/manager-dashboard- Manager view/owner-dashboard- Owner view/admin-dashboard- Admin panel/unaffiliated-dashboard- Unaffiliated user view
The application uses React Context API for state management, particularly for:
- User authentication state
- Current user information
- Role-based permissions
- Bootstrap 5 for responsive design
- Custom CSS modules for component-specific styling
- Responsive design for all screen sizes
API calls are handled through a centralized api.js service using Axios:
- Interceptors for token management
- Error handling
- Response transformation
- JWT-based authentication
- Role-based access control
- Protected routes
- XSS protection
- CSRF protection
Run tests with:
npm testKey test areas:
- Component rendering
- Authentication flow
- Protected routes
- API integration
The application is fully responsive and tested on:
- Desktop browsers
- Tablets
- Mobile devices
Environment variables can be configured in .env:
REACT_APP_API_URL=backend_url
REACT_APP_VERSION=version_number- Fork the repository
- Create a feature branch
- Commit changes
- Push to the branch
- Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [email protected] or raise an issue in the repository.
- Vladyslav Shupliakov - Initial work - DatenFluss
- React team for the amazing framework
- Bootstrap team for the UI components
- All contributors who help improve the system