This command-line tool is intended to assist companies with managing an employee database.
The goal of this project is to create a Content Management System (CMS) using Node.js, Inquirer, and MySQL.
The database is mapped according to the following schema:
This application supports the following functionalities:
- View all departments in the database
- View all roles in the database
- View all employees in the database
- Add a department
- Add a role
- Add an employee
- Update an employee's role
Click the following link to view a walkthrough video on the usage of the application: Walkthrough Video: MySQL Employee Tracker
Use the following steps to install and run the application locally:
- Clone this repository to your local machine. (For reference, visit the Cloning a Repository GitHub Docs article.)
- Run
npm install
in your CLI to download the npm package dependencies. - Run
npm start
on your CLI to intialize the application.
This project requires the following npm package dependencies:
After launching the application, the user will be prompted to select an action from a list of options.
Selecting View all departments
, View all roles
, or View all employees
will display a table of the requested data.
View all departments
will display the department name and its department ID.View all roles
will display the role ID, title, department it belongs to, and the salary.View all employees
will display the employee ID, first name, last name, role title, role department, salary, and the manager the respective employee reports to. Themanager
field will shownull
if the associated employee does not have one.
Selecting Add a department
will prompt the user for the name of department to add, then add the department into the database.
Selecting Add a role
will prompt the user to enter the role title, salary, and the department it belongs to, then add the role into the database. The user will be given a list of available departments in the database to choose from.
Selecting Add an employee
will prompt the user to enter the employee first name, last name, role, and the manager name, then add the employee into the database. The user will be given a list of available roles and managers in the database to choose from.
Selecting Update an employee role
will prompt the user to enter the name of the employee to update and which role to assign them to, then update the database. The user will be given a list of available employees and role titles in the database to choose from.
No test suites have been written for this application. Please refer to the Installation section to run the application locally.
To make contributions to this project:
- Fork the repository
- Make some commits to improve the application
- Open a Pull Request on GitHub
- From there, we can discuss your changes and merge the pull request once your contributions have been approved!
This GitHub repository is licensed under the MIT license. Please refer to the license documentation here.
This project was created by dymoy.
For any related questions, please contact me via email at [email protected].