# Family Photo Album

A local desktop family photo-book app for organizing people, birthdays, yearly memories, notes, and photo captions.

The app stores everything locally on the user's computer. It does not use a cloud service or database.

## Run During Development

Install the dependency:

```bash
pip install -r requirements.txt
```

Run:

```bash
python main.py
```

During development, running `main.py` may show a command window. The packaged Windows version built with PyInstaller `--windowed` removes the command window.

## First Use

On a clean first launch, the album starts empty.

1. Click **Add First Person** on the Home screen, or **Add Person** in the top menu.
2. Enter a name, birthday, sex/theme, and optional profile photo.
3. Open that person's photo book.
4. Click **Add Photo** or **Add Photo to This Year**.
5. Choose a year, image, and optional caption.
6. Use **Edit Year Note** to add a note for a birthday year.

## Storage And Backup

- People and notes: `data/people.json`
- Default empty release seed: `data/default_people.json`
- Settings: `data/settings.json`
- Photos: `photos/person_slug/year/image_file.png`
- Profile photos: `photos/_profiles/`

To back up your family album, copy:

```text
data/
photos/
```

To restore a backup, copy those folders back into the app folder.

## Clean Public Release

Do not package personal `data/people.json` or personal `photos/`.

Create a clean release folder:

```bash
python prepare_release.py
```

This creates `release_clean/` with:

```text
data/people.json          # empty {"people": []}
data/default_people.json  # empty {"people": []}
photos/                   # empty folder
```

The release folder excludes personal photos, old test data, `__pycache__`, `build`, `dist`, `.spec` files, and temporary files.

## Build Windows Package

Install PyInstaller:

```bash
pip install pyinstaller
```

Run:

```bash
build_release.bat
```

The build script:

- Deletes old `release_clean/build/` and `release_clean/dist/`.
- Runs PyInstaller with `--onefile` and `--windowed`.
- Builds `release_clean/dist/Family Photo Album.exe`.
- Creates `release_clean/dist/Family Photo Album Package/`.
- Copies the EXE, README, favicon, background image, empty `data/`, and empty `photos/`.
- Creates `Start Family Photo Album.bat`.
- Creates `READ_ME_FIRST.txt`.
- Creates `release_clean/dist/Family Photo Album Package.zip`.

Share either:

```text
release_clean/dist/Family Photo Album Package.zip
```

or zip/share this folder:

```text
release_clean/dist/Family Photo Album Package/
```

The PyInstaller command used by the script is:

```bash
pyinstaller --noconfirm --onefile --windowed --name "Family Photo Album" --icon "favicon.ico" --add-data "fpa-bgimage.png;." --add-data "data;data" --add-data "photos;photos" main.py
```

## Features

- Dashboard-style Home screen with `fpa-bgimage.png` when available.
- Empty-state welcome screen with **Add First Person**.
- Add, edit, and delete people.
- Sex-based themes for Girl, Boy, and Other / Custom.
- Add, edit, and delete photos.
- Photos grouped by year.
- Optional year notes and photo captions.
- Click a photo for a larger preview.
- Settings saved to `data/settings.json`.
- Footer: `Free software by PentaSec Solutions LLC`
