https://github.com/leoelicos/depto
CRUD, SQL, Inquirer
https://github.com/leoelicos/depto
cli crud-application inquirer sql
Last synced: 8 months ago
JSON representation
CRUD, SQL, Inquirer
- Host: GitHub
- URL: https://github.com/leoelicos/depto
- Owner: leoelicos
- License: mit
- Created: 2022-05-10T12:12:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T16:13:00.000Z (over 2 years ago)
- Last Synced: 2025-01-27T11:22:11.596Z (10 months ago)
- Topics: cli, crud-application, inquirer, sql
- Language: JavaScript
- Homepage: https://youtu.be/W58SFkcsXkM
- Size: 401 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# depto
  
## Introduction
This easy-to-use employee management system allows the user to perform CRUD actions like view, add, update and delete. It would allow a business manager to add and save business data in order to better arrange and document CRUD.
This CLI application uses npm packages `inquirer`, `SQL` and `chalk`.
I made this app in order to learn how to use SQL queries.
I used GitHub Projects and various Pull Requests to create this app: https://github.com/leoelicos/depto/projects/1
Deployed API https://dpto.herokuapp.com/api/employees
## Installation
Source code: [depto on GitHub](https://github.com/leoelicos/depto).
| Step | Instruction |
| ----------------------------- | -------------------------------------------------- |
| install node | https://nodejs.org/en/download/ |
| install mysql | https://dev.mysql.com/downloads/installer/ |
| clone this repo | `git clone https://github.com/leoelicos/depto.git` |
| Go inside the database folder | `cd db` |
| invoke mysql | `mysql -u root -p` |
| Enter your mysql password | `{password}` |
| Create schema | `source schema.sql` |
| (optional) Add dummy data | `source seeds.sql` |
| Exit mysql | `exit` |
| Import dependencies | `npm i` |
| Start the app | `npm start` |
## Demo
### Video demo
https://user-images.githubusercontent.com/99461390/168465029-867e7224-30ab-4c93-b211-7c3a8250b9cd.mp4
Also on [YouTube](https://www.youtube.com/watch?v=W58SFkcsXkM)
## Usage
### Keyboard commands
| Step | Keyboard commands |
| ------------------- | ------------------------------------- |
| Navigate menu items | Up ↑ and Down ↓ |
| Select menu items | Enter ↵ |
### GUI
| Menu | What it does |
| ---------------------------------------- | ------------------------------------------------- |
| View All Departments | Print table of all departments in database |
| View All Roles | Print table of all roles in database |
| View All Employees | Print table of all employees in database |
| View Employees by Department | Print table of employees in specific department |
| View Employees by Manager | Print table of employees with specific manager |
| View Total Utilized Budget by Department | Print table of budget used by specific department |
| Add Department | Add a department, like `Legal` and `Finance` |
| Add Role | Add a role, like `Manager` and `Engineer` |
| Add Employee | Add an employee, like `John Prescott` |
| Update Employee Role | Assign specific role to specific employee |
| Update Employee Manager | Assign specific manager to specific employee |
| Delete Department | Delete specific department from database |
| Delete Role | Delete specific role from database |
| Delete Employee | Delete specific employee from database |
| Quit | Exit the application |
## Screenshots
### Screenshot: Menu

### Screenshot: View Departments

### Screenshot: View all Roles

### Screenshot: View all Employees

### Screenshot: View all Employees by Department

### Screenshot: View all Employees by Manager

### Screenshot: View Total Utilized Budget by Department

### Screenshot: Error Handling

## Credits
- BCS Resources
## License
© Leo Wong
Licensed under the [MIT License](./LICENSE).