Week 7 Final Project: Password Manager

7 min read

A week 7 final project focused on creating a password manager gives students a chance to combine security concepts, data storage, and user interface design into a single, cohesive application. On top of that, whether you are enrolled in a coding bootcamp, a computer science course, or a self-paced software engineering track, building a password manager from scratch teaches you how to protect sensitive information, handle encryption, and manage user credentials responsibly. In this guide, we will walk through the complete development lifecycle of a password manager final project, from planning core features to implementing industry-standard security practices.

What Is a Password Manager?

A password manager is a software application designed to store, generate, and organize login credentials in an encrypted digital vault. Instead of memorizing dozens of complex passwords for email, banking, social media, and work accounts, users only need to remember one master password to tap into their entire collection. The application handles the rest by automatically filling login forms, suggesting strong passwords, and alerting users when credentials have been compromised.

For a week 7 final project, a password manager is especially valuable because it touches on multiple learning objectives at once: file input/output, data structures, cryptographic principles, authentication flows, and basic cybersecurity hygiene. It is a project that feels immediately useful in daily life, which makes it more motivating to complete than a purely academic exercise.

Why Build a Password Manager for Week 7?

By week 7 of most programming curricula, students have usually covered variables, loops, conditionals, functions, and basic object-oriented programming. A password manager final project challenges you to apply those concepts in a real-world context. Here are a few reasons why this project works well as a capstone assignment:

Worth pausing on this one.

  • Practical relevance: Everyone struggles with password fatigue. Building a tool that solves a genuine problem reinforces the idea that code should serve people.
  • Security awareness: You learn why storing passwords in plain text is dangerous and how encryption protects data at rest.
  • Full-stack exposure: Even a simple password manager involves a frontend (command-line or graphical interface), backend logic, and a storage layer (local file or database).
  • Portfolio value: A working password manager demonstrates to employers that you understand secure coding practices and can deliver a complete feature set under a deadline.

Core Features of Your Final Project

Before writing code, define the scope of your password manager. A well-scoped week 7 project should include the following features:

  • Master password authentication: Users create and verify a master password that encrypts and decrypts the vault.
  • Credential storage: Save website names, usernames, passwords, and optional notes for each entry.
  • Password generator: Create strong, random passwords with adjustable length and character options.
  • Search and retrieval: Find stored credentials quickly by website or username.
  • Export and import: Allow users to back up their vault to an encrypted file and restore it later.
  • Strength evaluation: Warn users if a password is too short or lacks complexity.

If you have extra time, consider stretch goals such as two-factor authentication, automatic lock after inactivity, or a browser extension for autofill functionality The details matter here..

Technical Stack and Architecture

For a student project, simplicity and clarity matter more than enterprise-grade infrastructure. A common stack for a week 7 password manager includes:

  • Language: Python is ideal because of its readable syntax and built-in libraries for cryptography and file handling.
  • Storage: A local JSON file or SQLite database keeps credentials on the user's machine without requiring a remote server.
  • Encryption: The cryptography library or Python’s hashlib and secrets modules can handle hashing and symmetric encryption.
  • Interface: A command-line interface (CLI) is fastest to build, while a Tkinter or PyQt graphical user interface (GUI) adds visual polish.

Architecturally, your application should follow a layered design. The presentation layer handles user input and output, the business logic layer manages validation and password generation, and the data access layer reads from and writes to the encrypted storage file. Keeping these layers separate makes your code easier to test and maintain.

Step-by-Step Implementation Guide

Step 1: Setting Up the Environment

Create a dedicated project folder and initialize a virtual environment. Install only the dependencies you truly need, such as a crypt

Step 1 (continued): Environment preparation

Create a dedicated folder for the project, then run the following commands in a terminal:

python -m venv .venv
source .venv/bin/activate   # on Windows use .venv\Scripts\activate
pip install --upgrade pip
pip install cryptography click

click provides a lightweight command‑line parsing layer, while cryptography supplies the primitives needed for secure encryption. If a graphical front‑end is desired later, tkinter (bundled with the standard library) or PyQt5 can be added with a single pip install pyqt5.


Step 2: Define the data model

The vault will be represented as a Python dictionary where each key is a unique identifier (e.g., the website name) and each value is a sub‑dictionary containing the stored fields:

{
    "example.com": {
        "username": "john.doe",
        "password": "s3cr3tP@ss!",
        "note": "2‑FA enabled",
        "created": "2025-10-01"
    }
}

Before persisting the dictionary, the entire structure must be serialized to JSON and then encrypted with a symmetric key derived from the master password. The derivation process uses PBKDF2‑HMAC with a random salt and a high iteration count, producing a 256‑bit key that feeds a Fernet object for authenticated encryption.

Quick note before moving on Most people skip this — try not to..


Step 3: Master‑password handling

  1. Registration – Prompt the user for a new master password, generate a fresh 16‑byte salt, and derive the encryption key. Store the salt (encoded in Base64) alongside the encrypted vault file; the password itself is never written to disk.
  2. Verification – On subsequent launches, ask for the master password, recompute the key from the supplied password and the stored salt, and attempt to decrypt the vault. If decryption succeeds, the application is ready; otherwise, an informative error is shown and the program exits.

Step 4: Credential operations

Implement a small set of functions that manipulate the vault dictionary:

Operation Purpose
add_entry() Insert a new website record after validating required fields. But
update_entry() Modify an existing record (e. Plus, g. , change the password). Day to day,
delete_entry() Remove a website entry permanently.
list_entries() Return a printable summary of all stored sites.

Quick note before moving on Not complicated — just consistent..

All write operations first retrieve the current vault, modify the in‑memory dictionary, then re‑encrypt the whole structure before writing it back to the storage file.


Step 5: Password generator

A generator function can be built around the secrets module:

def generate_password(length=12, use_upper=True, use_lower=True,
                      use_digits=True, use_symbols=True):
    charset = ''
    if use_upper:   charset += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    if use_lower:   charset += 'abcdefghijklmnopqrstuvwxyz'
    if use_digits:  charset += '0123456789'
    if

### Completing the password generator  

The helper finishes by appending the symbol set (if requested) and then constructing the final string:

```python
def generate_password(length=12, use_upper=True, use_lower=True,
                      use_digits=True, use_symbols=True):
    charset = ''
    if use_upper:
        charset += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    if use_lower:
        charset += 'abcdefghijklmnopqrstuvwxyz'
    if use_digits:
        charset += '0123456789'
    if use_symbols:
        charset += '!@#$%^&*()-_=+[]{}|;:,.<>?/'
    
    if not charset:
        raise ValueError("At least one character class must be enabled")
    
    # Ensure the password contains at least one character from each enabled class
    required = []
    if use_upper:
        required.append('A')
    if use_lower:
        required.append('a')
    if use_digits:
        required.append('0')
    if use_symbols:
        required.append('!')
    
    password = []
    for _ in range(length):
        password.append(secrets.choice(charset))
    
    # Shuffle so the required characters are not always at the front
    secrets.SystemRandom().shuffle(password)
    
    # Insert the required characters at random positions
    for char in required:
        idx = secrets.randbelow(len(password))
        password.insert(idx, char)
    
    return ''.join(password)

The function now guarantees that the generated secret meets the user‑specified complexity policy while still relying on secrets for cryptographically strong randomness.


Encryption and decryption utilities

Because the vault must survive on disk without exposing raw credentials, the data is first serialized to JSON and then authenticated‑encrypted with Fernet. Now, the symmetric key is derived from the master password using PBKDF2‑HMAC‑SHA256, a random 16‑byte salt, and a high iteration count (e. Worth adding: g. , 200 000).

import json, base64, os
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.fernet import Fernet

SALT_SIZE = 16
ITERATIONS = 200_000
KEY_LENGTH = 32          # 256‑bit for Fernet

def _derive_key(password: str, salt: bytes) -> bytes:
Hot New Reads

Just Released

Try These Next

Similar Stories

Thank you for reading about Week 7 Final Project: Password Manager. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home