Coder Social home page Coder Social logo

employee-tracker's Introduction

Employee-Tracker

Description

The Employee-Tracker is a command-line application built with Node.js, Inquirer, and PostgreSQL. It allows business owners to easily view and manage all of the departments, roles, and employees in their company. This application offers a user-friendly interface to interact with the company's employee database, enabling the organization and planning of business operations.

Table of Contents

Installation

To get the Employee Management System up and running, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Redwolf917/Employee-Tracker.git
  2. Navigate to the Project Directory:

    cd Employee-Tracker
  3. Install Dependencies:

    npm install
  4. Set Up PostgreSQL Database:

    • Create a new PostgreSQL database:
      CREATE DATABASE company_db;
    • Use the schema.sql file to set up the database schema:
      psql -U postgres -d company_db -f sql/schema.sql
    • (Optional) Use the seeds.sql file to populate the database with initial data:
      psql -U postgres -d company_db -f sql/seeds.sql
  5. Configure Database Connection:

    • Update the db.js file with your PostgreSQL connection details. Specifically, you need to add your own password and change the username if you aren't using the username "postgres".

Usage

To run the application:

node index.js

Once started, you will be presented with a menu of options:

  • View all departments
  • View all roles
  • View all employees
  • Add a department
  • Add a role
  • Add an employee
  • Update an employee role
  • Exit

Example Commands

  • View All Employees: Displays a formatted table showing employee data, including employee IDs, first names, last names, job titles, departments, salaries, and managers.
  • Add a New Role: Prompts the user for the role name, salary, and department before adding the role to the database.

Database Schema

The database consists of three main tables:

  • Department:

    • id: SERIAL PRIMARY KEY
    • name: VARCHAR(30) UNIQUE NOT NULL
  • Role:

    • id: SERIAL PRIMARY KEY
    • title: VARCHAR(30) UNIQUE NOT NULL
    • salary: DECIMAL NOT

Git Repo Links (SSH & HTTPS)

employee-tracker's People

Contributors

redwolf917 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.