Skip to content

This Node.js command-line application allows you to generate a webpage that displays basic information about your software engineering team. It prompts the user to input details about the team members, including the manager, engineers, and interns, and then generates an HTML file.

License

Notifications You must be signed in to change notification settings

FilipPaskalev/Team-Profile-Generator

Repository files navigation

Team-Profile-Generator

jest CSS JSDoc HTML JavaScript Chalk edX Inquirer prettier License Git github

Description

This Node.js command-line application allows you to generate a webpage that displays basic information about your software engineering team. It prompts the user to input details about the team members, including the manager, engineers, and interns, and then generates an HTML file based on the provided information.

User story

As a team manager, I require a convenient way to compile and access essential information about my software engineering team. This tool enables me to swiftly generate a webpage displaying key details, such as names, roles, email addresses, and GitHub profiles, for each team member. This streamlines communication and collaboration within the team, enhancing productivity and efficiency.

I want to be able to

  • Input the details of the team manager, including their name, employee ID, email address, and office number.
  • Add engineers to the team, including their name, ID, email, and GitHub username.
  • Add interns to the team, including their name, ID, email, and school they are attending.
  • Finish building the team when all necessary members have been added.
  • Have an HTML file generated automatically containing all the team members' information, which I can refer to later for reference.

Features

  • Utilizes Node.js for command-line interface.
  • Prompts users for information about each team member.
  • Supports different roles within the team, including managers, engineers, and interns.
  • Automatically generates an HTML webpage based on the provided information.
  • Includes tests to ensure the correctness and functionality of the application.

Visual presentation

Simple live demo

Click here to open the demo

Mock-Up

mock-up

App photos

mock-up

Tests

test-screenshot

Terminal app video preview

terminal-app-video

Usage

  1. Clone the repository to your local machine.
  2. Navigate to the project directory in your terminal.
  3. Install dependencies using npm install.
  4. Run the application using npm start.
  5. Follow the prompts to input information about each team member.
  6. Once all information is provided, the application will generate an HTML file named team.html in the output directory.

Installation

Option 1 - Download

Download the project from GitHub repository on your local machine.

  1. Open GitHub repository. (link to repository)

  2. Select Code from top navigation section. (reference on the image below) 👇

    gitHub-section-select-code

  3. Select <> Code dropdown button from sub section. (reference on the image below) 👇

    gitHub-section-select-code-dropdown

  4. Select Download ZIP from dropdown menu to download project in .zip format. (reference on the image below) 👇

    gitHub-dropdown-download-zip-selection

  5. Unzip the project.

    [!TIP] You can use 7-Zip if you don't have file archiver. 7-Zip is free software with open source. The most of the code is under the GNU LGPL license. Some parts of the code are under the BSD 3-clause License. Also there is unRAR license restriction for some parts of the code. Read 7-Zip License information. Download the application from official website.

  6. Open project with VS Code or other IDE.

Option 2 - Clone project

  1. On GitHub.com, navigate to the main page of the repository. (link to repository).

  2. Above the list of files, click Code. (reference on the image below) 👇

    gitHub-section-select-code-dropdown

  3. Copy the URL for the repository.

  • To clone the repository using HTTPS, under "HTTPS", click

  • To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click

  • To clone a repository using GitHub CLI, click GitHub CLI, then click (reference on the image below) 👇

    gitHub-https-copy

  1. Open Git Bash.

  2. Change the current working directory to the location where you want the cloned directory.

  3. Type git clone, and then paste the URL you copied earlier.

    git clone https://github.com/FilipPaskalev/Team-Profile-Generator.git
    
  4. Press Enter to create your local clone.

    $ git clone https://github.com/FilipPaskalev/Team-Profile-Generator.git
    > Cloning into `Spoon-Knife`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remove: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.
    

Classes

This application utilizes classes for each team member:

Employee: Parent class with properties and methods for name, ID, email, and role.

Manager: Extends Employee with an additional property for office number and an overridden getRole() method.

Engineer: Extends Employee with an additional property for GitHub username and an overridden getRole() method.

Intern: Extends Employee with an additional property for school and an overridden getRole method.

AppEngine: Singleton that runs all operation for the app.

Tests

Unit tests for each class are provided in the __tests__ directory. Ensure that all tests pass using Jest.

> team-profile-generator@1.0.0 test
> jest --verbose

 PASS  __tests__/Employee.test.js
  √ Can instantiate Employee instance (5 ms)
  √ Can set name via constructor arguments (1 ms)
  √ Can set id via constructor argument (1 ms)
  √ Can set email via constructor argument
  √ Can get name via getName() (1 ms)
  √ Can get id via getId() (1 ms)
  √ Can get email via getEmail() (1 ms)
  √ getRole() should return "Employee" (1 ms)

 PASS  __tests__/Engineer.test.js
  √ Can set GitHUb account via constructor (5 ms)
  √ getRole() should return "Engineer" (1 ms)
  √ Can get GitHub username via getGithub() (1 ms)

 PASS  __tests__/Intern.test.js
  √ Can set school via constructor (2 ms)
  √ getRole() should return "Intern" (1 ms)
  √ Can get school via getSchool() (4 ms)

 PASS  __tests__/Manager.test.js
  √ Can set school via constructor (1 ms)
  √ getRole() should return "Intern" (1 ms)
  √ Can get school via getSchool() (1 ms)

Test Suites: 4 passed, 4 total
Tests:       17 passed, 17 total
Snapshots:   0 total
Time:        1.125 s
Ran all test suites.

Resources

NPM

Link 1 | Link 2 | Link 3 | Link 4 | Link 5 | Link 7 | Link 8

JavaScript

Link 1 | Link 2 | Link 3 | Link 4 | Link 5 | Link 6 | Link 7 | Link 8 | Link 9 | Link 10 Link 11 | Link 12 | Link 13 | Link 14 | Link 15 | Link 16 | Link 17

Jest

Link 1 | Link 2 | Link 3

inquirer

Link 1 | Link 2 | Link 3 | Link 4 | Link 5

Prettier

Link 1 | Link 2 | Link 3 | Link 4 | Link 5 | Link 6

Chalk

link 1 | Link 2 | link 3 | Link 4 | Link 5 | Link 6

Bootstrap

Link 1 | Link 2

Dependencies

JSDoc

JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc. You add documentation comments directly to your source code, right alongside the code itself. The JSDoc tool will scan your source code and generate an HTML documentation website for you.

JSDoc's purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like modules, namespaces, classes, methods, method parameters, and so on.

Prettier

Prettier is an opinionated code formatter with support for:

  • JavaScript (including experimental features)
  • JSX
  • Angular
  • Vue
  • Flow
  • TypeScript
  • CSS, Less, and SCSS
  • HTML
  • Ember/Handlebars
  • JSON
  • GraphQL
  • Markdown, including GFM and MDX v1
  • YAML

It removes all original styling* and ensures that all outputted code conforms to a consistent style. (See this blog post)

Prettier takes your code and reprints it from scratch by taking the line length into account.

Chalk

NPM chalk is a third-party Node.js module that is used to add colour and styling to text on the command-line output. It also allows creating your own themes for your Node.js project. As per the Chalk GitHub page, it is:

Terminal string styling done right

Chalk supports multiple text styles with backgrounds supporting different colours and formatting. For instance, you can show text in red colour with a grey background that is bold and underlined. The chalk module is easy to install and use, depending on your terminal colours it can support a lot of colours.

It is an actively maintained project without any dependencies. Chalk also has an expressive API and it is a performant library. In the next part, you will know about the popularity of the NPM chalk module.

inquirer

Inquirer is an NPM package that provides an easy way to capture user input in your Node.js command line interface applications. It provides several methods for asking questions and returning answers from the user that can be accessed by a .then promise function.

Jest

"Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests with an approachable, familiar and feature-rich API that gives you results quickly. Jest is well-documented, requires little configuration and can be extended to match your requirements. Jest makes testing delightful" - Jest Core Team

Tools and extensions

Visual Studio Code

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages and runtime (such as C++, C#, Java, Python, PHP, Go, .NET).

VS Code Counter

VS Code extension counts blank lines, comment lines, and physical lines of source code in many programming languages. This extension uses other language extensions to determine the line of code. Therefore, you may need to install the language extension to support a new language. Conversely, as the number of language extensions increases, the range of support for this feature also increases.

Technologies

Project structure

|   app.js
|   jest.config.js
|   LICENSE
|   package-lock.json
|   package.json
|   README.md
+---.vscode
+---assets
+---lib
|   +---employees
|   |       Employee.js
|   |       Engineer.js
|   |       Intern.js
|   |       Manager.js
|   +---engine
|   |       AppEngine.js
|   |       promptFilters.js
|   |       promptValidators.js
|   \---enum
|           EnumEmployeeType.js
+---output
|       team.html
+---src
|       page-template.js
\---__tests__
        Employee.test.js
        Engineer.test.js
        Intern.test.js
        Manager.test.js

Statistics

Files

filename language code comment blank total
.prettierignore Ignore 2 2 1 5
.prettierrc.json JSON 7 0 1 8
README.md Markdown 285 0 102 387
tests/Employee.test.js JavaScript 37 0 18 55
tests/Engineer.test.js JavaScript 18 0 8 26
tests/Intern.test.js JavaScript 18 0 8 26
tests/Manager.test.js JavaScript 25 0 10 35
app.js JavaScript 14 4 3 21
jest.config.js JavaScript 5 139 55 199
lib/employees/Employee.js JavaScript 22 43 7 72
lib/employees/Engineer.js JavaScript 24 42 5 71
lib/employees/Intern.js JavaScript 24 45 5 74
lib/employees/Manager.js JavaScript 24 48 5 77
lib/engine/AppEngine.js JavaScript 309 247 32 588
lib/engine/promptFilters.js JavaScript 4 0 2 6
lib/engine/promptValidators.js JavaScript 43 0 9 52
lib/enum/EnumEmployeeType.js JavaScript 7 0 2 9
output/team.html HTML 103 0 4 107
package-lock.json JSON 4,054 0 1 4,055
package.json JSON 49 0 1 50
src/page-template.js JavaScript 144 5 13 162

Languages

language files code comment blank total
JSON 3 4,110 0 3 4,113
JavaScript 15 718 573 182 1,473
Markdown 1 285 0 102 387
HTML 1 103 0 4 107
Ignore 1 2 2 1 5

Directories

path files code comment blank total
. 21 5,218 575 292 6,085
. (Files) 7 4,416 145 164 4,725
tests 4 98 0 44 142
lib 8 457 425 67 949
lib\employees 4 94 178 22 294
lib\engine 3 356 247 43 646
lib\enum 1 7 0 2 9
output 1 103 0 4 107
src 1 144 5 13 162

Contributing

Contributions to this project are welcome. Feel free to submit bug reports, feature requests, or pull requests.

Questions

If you have any questions about this projects, please contact me directly at paskalevfilip@gmail.com. You can view more of my projects at https://github.com/FilipPaskalev.

License

Alt text

This project is licensed under the MIT License, you can find link to the license here.

About

This Node.js command-line application allows you to generate a webpage that displays basic information about your software engineering team. It prompts the user to input details about the team members, including the manager, engineers, and interns, and then generates an HTML file.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published