Skip to content

The Password Generator offers many of the same essential functions as: 1Password, Apple Keychain, or bitwarden: The ability to create random passwords, up to 128 characters, to include/exclude special symbols or numbers, and "click-to-copy" for any password you create.

Notifications You must be signed in to change notification settings

hairama/password-generator

Repository files navigation

Password Generator - Solo Project

Overview 🧐

This project is part of the "Making websites interactive" module from the Frontend Career Path course on Scrimba.

The Password Generator offers many of the same essential functions as: 1Password, Apple Keychain, or bitwarden: The ability to create random passwords, up to 128 characters, to include/exclude special symbols or numbers, and "click-to-copy" for any password you create.

Password Generator

Requirements 📝

Build it from scratch.

Generate two random passwords when the user clicks the button.

Each password should be 15 characters long.

Stretch goals 💪

Ability to set password length.

Add "copy-to-click".

Toggle "symbols" and "numbers" on/off.

Going above and beyond 🚀

Error handling.

Responsive design.

Progressive Web APP functionality.

Dark mode toggle.

Screenshots 📷

Mobile

Click to copy

Links 🔗

Scrim code 👈

Live site 👈

What I learned 🤓

🔳 Dark Mode: While reasearching various methods to implement dark mode, I learned about CSS Variables and classList.toggle as a way to keep the code modular and maintainable.

🔳 Window load event: I used the window.onload method to ensure the toggle states are set only after the DOM is fully loaded.

🔳 Input sanitization & Error handling I created a function to ensure the password length was 'valid' and notified the user when it was not.

🔳 Helper functions: Rather than creating event listeners for each HTML element, I used a series of helper functions to increase readability and modularity.

🔳 UI Optimizations: I added a smooth animation for the transition to light mode, and selectively applied the pointer style to the password boxes only after the passwords were created.

Resources 🗃️

🗃️ Frontend Career Path by Scrimba

About

The Password Generator offers many of the same essential functions as: 1Password, Apple Keychain, or bitwarden: The ability to create random passwords, up to 128 characters, to include/exclude special symbols or numbers, and "click-to-copy" for any password you create.

Topics

Resources

Stars

Watchers

Forks