The Employee Management System is a command-line application that allows users to manage a company's employee database. It provides functionalities to view, add, and update employees, roles, and departments, leveraging Node.js, PostgreSQL, and the Inquirer package.
In this video, I am explaining how my app work.
https://drive.google.com/file/d/1o4edQ9H3KcoXvy1AfNKnZnyeV_h6s5NE/view?usp=sharing
- View all employees, roles, and departments.
- Add new employees, roles, and departments.
- Update an employee's role.
- Assign managers to employees.
- Node.js: Backend runtime environment.
- PostgreSQL: Database for storing employee, role, and department information.
- Inquirer: Command-line interaction.
- TypeScript: Ensures type safety and modern JavaScript features.
- Express.js: Backend framework to create connection between the database and code.
- pg-node: Library to handle database and typescript
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd employee-management-system - Install dependencies:
npm install
- Set up the database:
- Ensure PostgreSQL is installed and running.
- Create a database and configure connection details in
connection.ts. - Run the SQL schema and seed files to populate initial data:
psql -U <username> -d <database_name> -f schema.sql psql -U <username> -d <database_name> -f seeds.sql
- Start the application:
npm start
- Follow the prompts to interact with the system:
- Select options from the menu.
- Provide required details for adding or updating records.
- department
id: Primary key.name: Department name.
- role
id: Primary key.title: Role title.salary: Role salary.department_id: Foreign key referencing the department.
- employee
id: Primary key.first_name: Employee first name.last_name: Employee last name.role_id: Foreign key referencing the role.manager_id: Foreign key referencing another employee.
- Start Application:
npm start - Run TypeScript Build:
npm run build - Lint Code:
npm run lint
- Select "View All Employees" from the menu to see a table of all employees.
- Select "Add Employee".
- Provide the following details:
- First name
- Last name
- Role (select from a list of existing roles)
- Manager (select from a list of existing employees or leave blank)
- Select "Update Employee Role".
- Choose an employee to update.
- Select a new role for the employee.
- Add functionality to delete employees, roles, and departments.
- Provide additional filtering and search capabilities.
- Enhance user experience with better error handling and validations.
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes" - Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License.