Skip to content

This command-line application will take in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person (based on their role in the company).

License

Notifications You must be signed in to change notification settings

senseilein/team-profile-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TEAM PROFILE GENERATOR

License: MIT

🚩 TABLE OF CONTENT

📖 DESCRIPTION

🎯 What is it about?

This command-line application will take in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person.

🔍 Preview

The following image shows the generated webpage:

my-team-website

💻 USAGE

💬 User story

As a manager, I want to generate a webpage that displays my team's basic info so that a user can have quick access to their contact details.

💬 Main functionalities

Inquirer module

  • Based on the tests provided (inside the starter/__tests__ folder), I created 4 classes - 1 Employee parent class and 3 other classes extending that parent class.

  • I used the inquirer module to prompt the user and gather information about the development team members and creates objects for each team member using the correct classes as blueprints.

Classes

  • Each employee card is generated based on a class : Manager, Engineer, Intern

  • All those 3 classes extend an Employee parent class, with a basic structure including a name,email address and employee ID.

  • But each class also has unique properties and methods that are not shared with other classes. e.g. Manager has an officeNumber property, Engineer has a github property and Intern has a school property.

Input validation

  • I have implemented basic validation functions to check user inputs (for employee names, IDs, email and Github username). For instance, if an employee name contains characters that are not letters or whitespaces, then they will be prompted again.

Generate HTML using fs and path modules

  • After collecting all the data from the user, the application dynamically generates a team.html file inside a output folder (also dynamically generated) to store the rendered HTML content returned from the render function (provided with the starter code).

🔌 TECHNOLOGY USED

  • Javascript

  • Node.js

  • Npm

  • Html5

  • Bootstrap

  • Jest

Apart for some styling adjustments that I've made (cards margins, background and text-color), the HTML content along with the tests files was provided in the starter code.

My task was to write all the JavaScript content necessary to pass the tests and achieve the final goal: generate a webpage based on the user input.

🚀 INSTALLATION

To use the app, you will need to:

  • install Node.js
  • run npm install --save inquirer@^8.0.0 (the app requires version 8 or below)
  • run npm install --save-dev jest
  • then run node index.js or npm start

✅ TESTS

To run the tests, run npm test in your terminal.

💬 CREDITS

README template

Input validation

fs & path modules

Thank you

  • This project was made as part of a coding assignment with Trilogy Education Services

✨ CONTRIBUTING

All contributions are welcome. Please feel free to contact me (using the contact details in the Questions section) or open an issue on this repository.

❔ QUESTIONS

📃 LICENSE

This application is covered under MIT License.

About

This command-line application will take in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person (based on their role in the company).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published