Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashlynn4567/employee-tracker
Employee Tracker is an application that uses Node.js, Inquirer, and SQL to create a database that connects with the command line interface. Users can search for employee information by entering key words into each inquiry prompt.
https://github.com/ashlynn4567/employee-tracker
consoletablejs dotenv inquirerjs javascript mysql2 nodejs npm
Last synced: about 1 month ago
JSON representation
Employee Tracker is an application that uses Node.js, Inquirer, and SQL to create a database that connects with the command line interface. Users can search for employee information by entering key words into each inquiry prompt.
- Host: GitHub
- URL: https://github.com/ashlynn4567/employee-tracker
- Owner: ashlynn4567
- Created: 2022-04-15T21:24:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-04T17:57:03.000Z (over 2 years ago)
- Last Synced: 2024-07-30T18:10:30.641Z (5 months ago)
- Topics: consoletablejs, dotenv, inquirerjs, javascript, mysql2, nodejs, npm
- Language: JavaScript
- Homepage:
- Size: 67.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Employee Tracker
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Table-of-Contents
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Technologies](#technologies)
- [Future Development](#future-development)
- [Credits](#credits)## Description
Employee Tracker is an application that uses Node.js, Inquirer, and SQL to create a database that connects with the command line interface. Users can search for employee information by entering key words into each inquiry prompt.
This application is useful to employers who wish to track their employees in one central database. They can view departments, roles, or employee tables. They can also add, delete, or update each of these tables.
## Features
This application is run using the user's terminal. Before running this application, please see the [Installation](#installation) section.
1. It is invoked using the command `npm start`, which will then begin to prompt the user for input regarding which action they want to take to interact with their employee database.
2. Users can navigate the menu to choose between the following options:
- View
- Departments
- Roles
- Employees
- Add
- Departments
- Roles
- Employees
- Delete
- Departments
- Roles
- Employees
- Update
- Employee's Role
- Employee's Manager
3. If the user chooses to view:
- **departments**, then they are presented with a table showing the _department name_ and _department ID_.
- **roles**, then they are presented with a table showing the _job title_, _role ID_, _department ID_ that the role belongs to, and _salary_ for that role.
- **employees**, then they are presented with a table showing the employee data, including _employee ID_, _first name_, _last name_, _job title_, _department_, _salary_, and _manager_ that the employee reports to.
Here's a link to the video version of the above gif.4. Users can add departments, roles, or employees as well. Once they select these prompts, they will be asked to enter the relevant information to fill out the table within the employee tracker database. If the user views the tables after adding an element, they can see their changes in the corresponding tables.
Here's a link to the video version of the above gif.5. Users can delete departments, roles, or employees as well. After the deletion, the corresponding tables will update to show that the relevant data has been removed. Note that any links from other tables to the deleted information will become null.
Here's a link to the video version of the above gif.6. And finally, users can update employee information. They have the option to update the employee's role or manager.
Here's a link to the video version of the above gif.## Installation
In order to use this application, you will need to install it on your local computer.
1. Open the command line interface.
2. Clone the repository onto your local machine using the `git clone` command.
3. Once the repository has been cloned, navigate into the root directory of the application using the command `cd Team-Profile-Generator`.
4. This application has dependencies that must be installed prior to running the application (i.e. dotenv, inquirer, MySQL2, and console.table). Run the command `npm install` to install necessary packages and dependencies.
5. This application relies on private enviromental variables. In the main directory of the application, create a `.env` file.
- The contents of your `.env` file should look like this, where [MySQL username] is your MySQL username, and [MySQL password] is your MySQL password:
```
DB_NAME="employee_tracker"
DB_USER="[MySQL username]"
DB_PW="[MySQL password]"
```
- For example, if my username is `ashlynn4567` and my password is `password1234`, my `.env` file will look like the following:
```
DB_NAME="employee_tracker"
DB_USER="ashlynn4567"
DB_PW="password1234"
```
6. Next, you will need to seed the data. Note: You must have MySQL installed on your computer in order to seed the data.
- Log in to MySQL in your command line with the command `mysql -u root -p`.
- Enter your login credentials.
- Type the command `source db/schema.sql`.
- Next, type the command `source db/seeds.sql`.
- Quit MySQL with the command `quit`.
7. Now you can start the application. Enter the command `npm start` in your terminal to begin.
8. Navigate through the prompts in your command line interface using your keyboard.
9. If you wish to quit the application at any time, simply type `ctrl + C`.For further help with installation, please refer to the below demonstration video.
Here's a link to the video version of the above gif.## Technologies
- JavaScript
- Node.js
- npm
- [dotenv](https://www.npmjs.com/package/dotenv)
- [MySQL2](https://www.npmjs.com/package/mysql2)
- [Inquirer](https://www.npmjs.com/package/inquirer)
- [console.table](https://www.npmjs.com/package/console.table)## Future Development
In the future, I would like to add the following improvements:
- A feature that allows users to export their employee tracker into an excel spreadsheet.
- A front-end UI so that users don't have to go through complicated installation instructions in order to use the application.I'm always interested in refactoring code to improve it's functionality. If you would like to suggest your own improvements, you can reach me at the links below.
## Credits
This project was built with the help of the University of Oregon's Coding Boot Camp.
## Licensing
The application is covered under the following license: [MIT](https://opensource.org/licenses/MIT)