An open API service indexing awesome lists of open source software.

https://github.com/augustoneves/employee-management-system

This project is a Full-Stack Employee Management System built with .NET API, React (Vite), and SQL Server, containerized with Docker Compose for seamless deployment
https://github.com/augustoneves/employee-management-system

csharp docker docker-compose dotnet-core entity-framework-core material-ui reactjs sqlserver vitejs

Last synced: 3 months ago
JSON representation

This project is a Full-Stack Employee Management System built with .NET API, React (Vite), and SQL Server, containerized with Docker Compose for seamless deployment

Awesome Lists containing this project

README

          

# Employee Management





Logo

Employee Management System

## Table of contents

- [Employee Management](#employee-management)
- [Table of contents](#table-of-contents)
- [About The Project](#about-the-project)
- [Built with](#built-with)
- [Entity Relationship Diagram](#entity-relationship-diagram)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation and usage](#installation-and-usage)
- [1. Clone the Repository](#1-clone-the-repository)
- [2. Run the Entire Application with Docker](#2-run-the-entire-application-with-docker)
- [3. Navigate to the application](#3-navigate-to-the-application)
- [Functional Testing Instructions](#functional-testing-instructions)
- [Running the Tests](#running-the-tests)

## About The Project

This project is a **Full-Stack Employee Management System** built with **.NET API**, **React (Vite)**, and **SQL Server**, containerized with **Docker Compose** for seamless deployment. It follows **Clean Architecture** principles and uses **MediatR** for handling commands and queries **(CQRS)** efficiently.The solution includes **TestContainers** for reliable, isolated end-to-end functional testing that ensures API functionality across environments.

### Built with

[![.NET][.NET]][.NET-url] [![React][React.js]][React-url] [![Docker][Docker]][Docker-url][![MSSQL][MSSQL]][MSSQL-url]

### Entity Relationship Diagram

**Entity relationship between Department and Employee**



Logo

(back to top)

## Getting Started

### Prerequisites

Before running this project, ensure you have the following installed:

**[Docker & Docker Compose](https://www.docker.com/get-started/)** – To run the entire stack in containers.
**[Node.js (18+)](https://nodejs.org/)** – Required for the frontend.
**[.NET SDK (8.0+)](https://dotnet.microsoft.com/en-us/download)** – To build and run the API manually.

(back to top)

### Installation and usage

Follow these steps to set up and run the project.

### 1. Clone the Repository

```sh
git clone https://github.com/AugustoNeves/employee-management-system.git
cd employee-management-system
```

### 2. Run the Entire Application with Docker

```sh
docker-compose up -d --build
```

### 3. Navigate to the application

Open your browser and access the frontend app in the URL: http://localhost:4173

- **Data:** An initial set of data will be seeded on the running API.

The home page displays the list of employees registered in the database, as shown below:

![alt text](./docs/employee-list.png)

- **Swagger Documentation:** If you prefer you can navigate to the swagger API in the URL: https://localhost:5001/swagger/index.html

(back to top)

[.NET]: https://img.shields.io/badge/.NET-512BD4?style=for-the-badge
[.NET-url]: https://dotnet.microsoft.com/en-us/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Docker]: https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white
[Docker-url]: https://www.docker.com/
[MSSQL]: https://img.shields.io/badge/MSSQL-black?style=for-the-badge&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAIR0lEQVR4nO1Ze4xUVxm%2Frdi09VFbtOzc75vZbB8byyqIWChQFAwpuLSJ1VqrtQVRq1Ex1Tb2LaZRqLykD1NbAxrTELqiUJg5Z%2FYBQ6EsUGfOuQuz95y551yW5S20vCmvwJjvziwZMf1zZ%2BcPfskkc889Z%2BZ7%2Fr5zvuM4l3EZtQHPDxulto9KZVcKbfYXi8UrnFpHVvd8Vmo7T2pr6CO0fS1XsA8IbU9sDoJPOrWKbdt3DRfKbhcqPOip4BURBEMr3wttCp5vP%2BfUIqQ290tt9pGQQttjFC5S2%2FekMh1S2%2FmiYB6WyqwhTzi1iI1z5p6KQqdQAFJEKjMx6%2B%2BICW2%2FJpR5Wii7WShzQepwqVOLSA8bfqp15MhsEmC0p%2B1XpTZ7SSF6J1T43cgb2v6acqImE7lt2LDJHPFkCrGHIx5sHzVarn%2Fs8SPvzFuQ37JilZXrO8fRPKlMFyno1CIY4r0MYG86kRjLXPeejubm5W2j78gyA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SY8ZSZ72h6IChOFhjY9QtvjUtm3iXm6VPj5Ui7YTtq0Va4lD9AcotccUawyx7P5sPqHli2mt0loK6QyKqfMTM%2Fzol4ogeiRFKNqS6xDHvBUOENqs7TcZt8kdPBTT9lfCG1XOQMJQRcY2qwu3ciYV2XBLo4uMko3Mxsjz5S8tETq4HtUqWld586d11CoeYXCaKcWkM2HCanNz4QyvVFlVXYfsY5U4fOeNt%2BW2o7LBsHNtHUoFTY6hdkVTi0ik8kMigpUafs8j7YX5A2qB%2BW9%2Fwn6UPIPtKyXcRmX4dQm%2FguvH%2BRcw0PJ2AAAAABJRU5ErkJggg%3D%3D
[MSSQL-url]: https://www.microsoft.com/en-us/sql-server/sql-server-downloads

## Functional Testing Instructions

This project includes functional tests to ensure the reliability and correctness of the application. The tests are located in the `tests/Employee.Application.FunctionalTesting` folder. Follow the steps below to run the tests.

### Running the Tests

1. **Navigate to the Testing Folder**
Open a terminal and navigate to the testing folder:

```sh
cd tests/Employee.Application.FunctionalTesting
```

2. **Run the Tests**
Execute the following command to run all the tests:

```sh
dotnet run
```

3. **Test Containers**
The tests use TestContainers to create a SQL Server container for testing purposes. Ensure that Docker is running before executing the tests.
The container will be automatically created and destroyed during the test execution.