Skip to content

πŸ“± Modern employee management system built with LitElement & Web Components. Simplified HR tasks with Vite bundling, Vitest testing, local storage, and multi-language support. Responsive UI with no external frameworks! ✨

Notifications You must be signed in to change notification settings

mustafacagri/litelement-employee-management

Repository files navigation

πŸš€ LitElement Employee Management App

Version Status Tech

A modern, responsive employee management application built with LitElement and Web Components. This application helps HR staff manage company employee information with ease.

✨ Features

  • πŸ“‹ List, filter and search employees
  • πŸ‘₯ Add new employee records
  • ✏️ Edit existing employee information
  • πŸ—‘οΈ Delete employee records
  • πŸ”„ Toggle between table and card views
  • πŸ“± Fully responsive design
  • 🌐 Localization support (English and Turkish)
  • πŸ” Field validation
  • 🧩 Modular and reusable component architecture

πŸ› οΈ Technology Stack

  • Web Components with LitElement
  • Routing with Vaadin Router
  • Module Bundling with Vite
  • Testing with Web Test Runner
  • CSS Custom Properties for theming

πŸŽ₯ Demo Video

litelement-employee-management.mp4

🎬 Live Demo

πŸ‘‰ https://litelement-employee-management.web.app

🚦 Getting Started

Prerequisites

Installation

# Install dependencies
yarn install

Development

# Start development server
yarn dev

Build

# Build for production
yarn build

Testing

# Run all tests
yarn test

# Run specific tests
yarn test -- --group <file-pattern>

πŸ“Š Sample Data

The application includes a sample data generator that populates the app with employee records for testing purposes. Sample data is automatically added if no existing data is found.

How Sample Data Works

  • The app checks for existing employee data in local storage
  • If no data exists, it generates a set of sample employees
  • Sample data includes random names, emails, departments, and other required fields
  • You can view the sample data generation in the browser console

Disabling Sample Data

If you prefer to start with an empty database, you can reset the storage by clearing your browser's local storage:

  1. Open your browser's developer tools (F12)
  2. Navigate to the "Application" tab
  3. Select "Local Storage" in the sidebar
  4. Right-click on the application's URL and select "Clear"

🌍 Localization

The application supports multiple languages:

  • πŸ‡ΊπŸ‡Έ English (default)
  • πŸ‡ΉπŸ‡· Turkish

Language is automatically detected from the browser settings but can be changed using the language selector in the application.

πŸ“± Responsive Design

The app is designed to work on various screen sizes:

  • πŸ“± Mobile: < 768px
  • πŸ’» Tablet: 768px - 1024px
  • πŸ–₯️ Desktop: > 1024px

No external CSS frameworks are used - all responsive layouts are implemented with CSS Grid and Flexbox.

πŸ§ͺ Testing

The application has extensive test coverage:

# Run tests with coverage report
yarn test

βœ… Test Results

  • πŸ“Š Test Files: 23 passed (23 total)
  • 🧩 Tests: 177 passed (177 total)
  • πŸš€ Components Tested: UI elements, services, utilities, and employee management features

πŸ“¦ Project Structure

project/
β”œβ”€β”€ public/               # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ common/       # Generic components
β”‚   β”‚   β”œβ”€β”€ employee/     # Employee-specific components
β”‚   β”‚   β”œβ”€β”€ layout/       # Layout components
β”‚   β”‚   └── ui/           # UI element components
β”‚   β”œβ”€β”€ constants/        # Application constants
β”‚   β”‚   β”œβ”€β”€ animation/    # Animation constants
β”‚   β”‚   β”œβ”€β”€ domain/       # Domain-specific constants
β”‚   β”‚   β”œβ”€β”€ event/        # Event constants
β”‚   β”‚   β”œβ”€β”€ format/       # Formatting constants
β”‚   β”‚   β”œβ”€β”€ localization/ # Localization constants
β”‚   β”‚   β”œβ”€β”€ routing/      # Routing constants
β”‚   β”‚   β”œβ”€β”€ storage/      # Storage constants
β”‚   β”‚   β”œβ”€β”€ ui/           # UI constants
β”‚   β”‚   └── validation/   # Validation constants
β”‚   β”œβ”€β”€ i18n/             # Localization
β”‚   β”œβ”€β”€ models/           # Data models
β”‚   β”œβ”€β”€ router/           # Application routing
β”‚   β”œβ”€β”€ services/         # Business logic and services
β”‚   β”œβ”€β”€ stores/           # State management
β”‚   β”œβ”€β”€ styles/           # Global styles and theme
β”‚   β”œβ”€β”€ utils/            # Utility functions
β”‚   β”œβ”€β”€ views/            # Page views
β”‚   β”œβ”€β”€ app.js            # Main app component
β”‚   └── index.js          # Application entry point
β”œβ”€β”€ test/                 # Test files
β”œβ”€β”€ index.html            # Entry HTML file
└── vite.config.js        # Vite configuration

🀝 Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run tests to ensure everything works
  4. Submit a pull request

πŸ“œ License

This project is licensed under the MIT License.

About

πŸ“± Modern employee management system built with LitElement & Web Components. Simplified HR tasks with Vite bundling, Vitest testing, local storage, and multi-language support. Responsive UI with no external frameworks! ✨

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published