MIL-003 Documentation and Publishing #25
@@ -0,0 +1,47 @@
|
||||
**English** · [Dansk](Development-da) · [Bahasa Malaysia](Development-ms)
|
||||
|
||||
# Development
|
||||
|
||||
## Layout
|
||||
|
||||
| Folder | Holds |
|
||||
| --- | --- |
|
||||
| `src/password_manager/domain` | Entry, password generator and errors; no input or output |
|
||||
| `src/password_manager/application` | Use cases and the repository port |
|
||||
| `src/password_manager/infrastructure` | The JSON repository |
|
||||
| `src/password_manager/presentation` | The MVVM view and view model |
|
||||
| `src/password_manager/constants.py` | Every constant and message |
|
||||
| `tests/` | `unit`, `integration` and `e2e` tests |
|
||||
| `tools/` | `capture_screenshots.py` |
|
||||
|
||||
Imports point inward; only `main.py` connects the layers.
|
||||
|
||||
## Tests and lint
|
||||
|
||||
```bash
|
||||
python -m pytest
|
||||
python -m ruff format src tests tools
|
||||
python -m ruff check src tests tools
|
||||
```
|
||||
|
||||
## Source documentation
|
||||
|
||||
Comments are Doxygen style. Build the HTML with `doxygen Doxyfile`; it opens at
|
||||
`docs/doxygen/html/index.html`.
|
||||
|
||||
## Screenshots
|
||||
|
||||
On Windows, with the virtual environment active:
|
||||
|
||||
```bash
|
||||
python tools/capture_screenshots.py
|
||||
```
|
||||
|
||||
The images are written to `docs/images/` from the real window and a temporary
|
||||
data file.
|
||||
|
||||
## Project documents
|
||||
|
||||
The project follows a planning-first workflow: Business Case, Stakeholder
|
||||
Analysis, Project Plan and milestones are in `docs/`. Work is done on one branch
|
||||
and one pull request per milestone.
|
||||
@@ -0,0 +1,27 @@
|
||||
**English** · [Dansk](Home-da) · [Bahasa Malaysia](Home-ms)
|
||||
|
||||
# Password Manager
|
||||
|
||||
A small Tkinter password manager from day 30 of Udemy's "100 Days of Code: The
|
||||
Complete Python Pro Bootcamp". It generates passwords, saves them in a JSON
|
||||
file and searches them by website.
|
||||
|
||||

|
||||
|
||||
## What it does
|
||||
|
||||
- **Generate** a random password and copy it to the clipboard.
|
||||
- **Add** a website, an e-mail address and a password to `data.json`.
|
||||
- **Search** a website and see the saved e-mail address and password.
|
||||
- Keeps running when `data.json` is missing, empty or damaged.
|
||||
|
||||
> **Security note.** The passwords are stored as plain JSON and are not
|
||||
> encrypted. This is a learning project; do not use it for real passwords.
|
||||
|
||||
## Pages
|
||||
|
||||
- [Installation](Installation)
|
||||
- [Usage](Usage)
|
||||
- [Development](Development)
|
||||
|
||||
Source code and issues: [repository](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/030-password-manager).
|
||||
@@ -0,0 +1,38 @@
|
||||
**English** · [Dansk](Installation-da) · [Bahasa Malaysia](Installation-ms)
|
||||
|
||||
# Installation
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.13 or newer with Tkinter. On Debian or Ubuntu install `python3-tk`.
|
||||
- `venv` and `pip`, both part of Python.
|
||||
- No runtime dependencies.
|
||||
|
||||
## Create a local virtual environment
|
||||
|
||||
Windows (PowerShell):
|
||||
|
||||
```powershell
|
||||
python -m venv .venv
|
||||
.venv/Scripts/Activate.ps1
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
Linux and macOS:
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
The `[dev]` extra installs pytest and ruff. Leave it out
|
||||
(`python -m pip install -e .`) if you only want to run the program.
|
||||
|
||||
## Check the installation
|
||||
|
||||
```bash
|
||||
python -m pytest
|
||||
```
|
||||
@@ -0,0 +1,50 @@
|
||||
**English** · [Dansk](Usage-da) · [Bahasa Malaysia](Usage-ms)
|
||||
|
||||
# Usage
|
||||
|
||||
Start the program with the virtual environment active:
|
||||
|
||||
```bash
|
||||
python -m password_manager
|
||||
```
|
||||
|
||||
The program keeps its data in `data.json` in the folder you start it from.
|
||||
|
||||
## Generate and add a password
|
||||
|
||||
1. Type the website.
|
||||
2. Press **Generate Password**. A password is filled in and copied to the
|
||||
clipboard.
|
||||
3. Check the e-mail address and press **Add**. Confirm the dialog and the entry
|
||||
is saved.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Leaving a field empty shows a warning and saves nothing.
|
||||
|
||||
## Search
|
||||
|
||||
Type a website and press **Search**. The saved e-mail address and password are
|
||||
shown.
|
||||
|
||||

|
||||
|
||||
If nothing is saved for the website, or no data file exists yet, a message says
|
||||
so.
|
||||
|
||||

|
||||
|
||||
## The data file
|
||||
|
||||
`data.json` holds one record per website:
|
||||
|
||||
```json
|
||||
{
|
||||
"example.com": {
|
||||
"email": "jens@example.com",
|
||||
"password": "Sample#Pass123"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
Password Manager · day 30 of 100 Days of Code · [Repository](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/030-password-manager)
|
||||
@@ -0,0 +1,23 @@
|
||||
**Password Manager**
|
||||
|
||||
**English**
|
||||
|
||||
- [Home](Home)
|
||||
- [Installation](Installation)
|
||||
- [Usage](Usage)
|
||||
- [Development](Development)
|
||||
|
||||
**Dansk**
|
||||
|
||||
- [Hjem](Home-da)
|
||||
- [Installation](Installation-da)
|
||||
- [Brug](Usage-da)
|
||||
- [Udvikling](Development-da)
|
||||
|
||||
**Bahasa Malaysia**
|
||||
|
||||
- [Laman Utama](Home-ms)
|
||||
- [Pemasangan](Installation-ms)
|
||||
- [Penggunaan](Usage-ms)
|
||||
- [Pembangunan](Development-ms)
|
||||
|
||||
Reference in New Issue
Block a user