This project is a backend API server for managing employees, built using Laravel 11. It implements GraphQL for CRUD operations and user authentication via Passport. Users can perform various employee management operations, including creating employees, viewing a list of employees, updating and deleting records, and exporting/importing employee data to/from Excel.
- User Login: Authentication via Laravel Passport.
- Employee Creation: Users can create up to 10,000 employees using Faker.
- Employee Listing: View a list of employees with GraphQL queries.
- Employee Deletion: Remove employee records.
- Employee Update: Edit employee details.
- Excel Export: Export up to 10,000 employee records to an Excel file.
- Excel Import: Import employee data from an Excel file.
- Framework: Laravel 11
- GraphQL Package: nuwave/lighthouse for GraphQL implementation.
- Authentication: Laravel Passport for user authentication and token management.
- Excel: Laravel Excel package for importing and exporting employee data.
-
Clone the repository:
git clone git@github.com:katherinekhine/employee_management.git
-
Navigate to the project directory:
cd employee_management
-
Install dependencies:
composer install
-
Set up the .env file by copying the .env.example file and configuring your database connection.
cp .env.example .env
-
Generate an application key:
php artisan key:generate
-
Run database migrations:
php artisan migrate
-
Install Passport:
php artisan passport:install
-
Seed the database with 10,000 employees (using Faker):
php artisan db:seed --class=EmployeeSeeder
-
Start the server:
php artisan serve