/team-dashboard

Quickly gather information, generate a dynamic HTML webpage and keep track of all your team members in one place.

Primary LanguageJavaScriptMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Team Dashboard


Quickly gather information, generate a dynamic HTML webpage and keep track of all your team members in one place.

Team Dashboard is proudly built by: Michael Yeates

Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contributing
  6. Tests
  7. Questions
  8. Acknowledgments

About The Project

Screenshot

Team Dashboard Screen Shot

back to top

Built With

  • JavaScript

  • Node.js

  • Bootstrap

    back to top

    Description

    Team Dashboard is a Node.js command-line application that takes in information about employees in a software engineering team and uses Object-Oriented Programming and Test-Driven Development to generate dynamic HTML. The user is prompted to enter the manager's information (name, ID, email, office number), then has the option to add an engineer or an intern by entering their information (name, ID, email, GitHub username or school). The application uses Inquirer for input, and has classes for Employee, Manager, Engineer, and Intern, with properties and methods unique to each role. Once the user has finished entering information, the HTML is generated and written to a file named team.html in the output folder.

    back to top

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/mdyeates/team-dashboard.git
  2. Install NPM packages
    npm install

back to top

Usage

  • For this project, I learnt about OOP principles, modularisation and closure. The code block below defines a closure used in this app, which is an inner function that has access to variables in an outer function even after the outer function returns. This closure is made by enclosing the function definition in an Immediately Invoked Function Expression (IIFE) (which is invoked immediately when the code is executed).

  • The createTeam function has a private variable called team defined within the closure and is accessible only to other functions defined within the same closure. The closure provides two methods for accessing the private team array: addToTeam and getTeam.

  • addToTeam accepts a team member as an argument and uses the push method to add it to the team array. getTeam returns the team array, allowing access to the members who have been added.

  • The closure acts like a "backpack" that carries the private information in team and the methods addToTeam and getTeam with it, allowing these variables and functions to persist even after the closure has been executed.

const createTeam = (function () {
  const team = [];

  return {
    addToTeam: (member) => {
      team.push(member);
    },
    getTeam: () => team,
  };
})();
  • The functions and state defined within the closure can be easily reused across multiple parts of the codebase while maintaining their privacy and encapsulation, this improves code reuse, security, organisation and readability.
function generateIntern() {
  return internPrompts().then(({ name, id, email, school }) => {
    const intern = new Intern(name, id, email, school);
    createTeam.addToTeam(intern);
  });
}

Functionality

  • The following animation demonstrates the applications functionality

Functionality Gif

back to top

Mobile Responsive

  • As demonstrated in the screenshot below, this application is designed to be responsive and adjust seamlessly to fit various screen sizes

Responsiveness Screenshot

back to top

License

Distributed under the MIT License. See LICENSE.md for more information.

back to top

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

back to top

Tests

This app utilises Jest. Simply run the command below to confirm that every aspect of your code passes the provided tests

npm test

back to top

Questions

If you have any inquiries, don't hesitate to reach out to me via socials or by sending an email to michael-yeates@outlook.com

LinkedIn | GitHub

Project Link: https://github.com/mdyeates/team-dashboard

back to top

Acknowledgments