Skip to content

pedromst2000/PhotoShow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

202 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Code Quality

PhotoShow logo

Every Pixel Tells a Tale

Report Bug Β· Request Feature

πŸ“‘ Table of Contents


πŸ’‘ About

PhotoShow is a local desktop application for browsing, organizing, and sharing photo collections. Sign in for a personalized, role-based experience.

✨ Key Features

  • πŸ“ Create and manage albums
  • πŸ“Έ Upload and view photos
  • πŸ” Browse community content
  • ❀️ Like and rate photos
  • πŸ’¬ Comment on photos
  • ⭐ Add albums to favorites
  • πŸ‘₯ Follow other users
  • πŸ”” Receive in-app notifications
  • πŸ‘€ Customize your profile
  • 🎨 Set a custom avatar
  • 🚩 Report inappropriate content
  • πŸ‘¨β€πŸ’Ό Admin tools for user management
  • πŸ“‹ Admin tools for category management
  • βœ… Admin review system for reports

🎬 Demo Video

A demo video for PhotoShow will be added soon.


πŸ’» Tech Stack

Core Technologies

Data & Security

Code Quality & Linting

Testing

Packaging


πŸ“ Architecture & Data Model

πŸ›οΈ Architecture

⚠️ The preview below may be slightly outdated and will be refreshed in a later update.

Application Architecture

Application Architecture

πŸ—ƒοΈ Data Model

⚠️ The preview below may be slightly outdated and will be refreshed in a later update.

The database model is shown as a DER (Diagram Entity-Relationship) preview so the main entities and relationships stay readable at a glance.

ORM models live in app/core/db/models/ and are implemented with SQLAlchemy. You can check also in app\core\db\models\__init__.py for a quick overview of all the main entities and their relationships.


πŸš€ Getting Started

πŸ“‹ Prerequisites

  • Python 3.14.3 β€” Main programming language (download)
  • pip β€” comes with Python
  • Git β€” for cloning (download)
  • (Recommended) Virtual environment support: python -m venv

Verify your tools are available in the PATH:

python --version
pip --version
git --version

πŸ“₯ Quick Start

Clone the repository

git clone https://github.com/pedromst2000/PhotoShow.git

Navigate to the project directory

cd PhotoShow

πŸ’‘ Tip: Can't find the project directory? Open the folder in your code editor and use the integrated terminal.

Create and activate a virtual environment

Create the virtual environment:

python -m venv .venv

Activate it on Windows PowerShell:

.venv\Scripts\Activate

Activate it on macOS/Linux:

source .venv/bin/activate

To deactivate the virtual environment:

  • On any OS, simply run:
deactivate

This will return you to your system's default Python environment.

Note: Some dependencies may only work correctly inside the .venv virtual environment. It is highly recommended to use the virtual environment for all development and testing.

Install dependencies

python -m pip install --upgrade pip
pip install --upgrade -r dev-requirements.txt

Run the app

python main.py

πŸ’Ύ Database Setup

photoshow.db is created automatically at the project root on first run. Use the commands below to manage the database state.

Command Description
python main.py --backupDB Snapshot the current live DB to backups/<timestamp>/
python main.py --resetDB Auto-backup, then wipe and reseed from seed CSV files
python main.py --restoreDB Restore DB from the latest backup
python main.py --restoreDB backups/<folder> Restore DB from a specific backup snapshot

When to use each:

  • --backupDB - before making risky changes or testing destructive operations; saves the current live state
  • --resetDB - returns the app to the initial dummy-data state (useful for local feature testing); always auto-backups first
  • --restoreDB - brings back a previous state after a reset or data loss; defaults to the newest backup

⚠️ Backups may contain sensitive data (e.g., emails, password hashes). Keep the backups/ folder local and out of version control - it is already listed in .gitignore.


πŸ§ͺ Linting & Formatting

Run these checks locally before committing to keep the codebase consistent and avoid CI failures.

Lint CSV data files

Checks CSV seed data files for structural and formatting issues.

python app/scripts/lint_csv.py

Format CSV data files

Auto-formats CSV seed data files to conform to project standards.

python app/scripts/format_csv.py

Check Python imports

Checks that Python imports are correctly ordered according to isort conventions.

python app/scripts/check_imports.py

Format Python imports

Auto-formats Python imports to match isort ordering conventions.

python app/scripts/format_imports.py

Lint Python files

Checks Python files for style violations and errors (PEP 8 compliance).

python -m flake8 .

Format Python files

Auto-formats all Python files using the Black code formatter.

python -m black .

Check Python types

Runs static type checks on app/ and main.py using mypy.

python -m mypy app main.py

Configuration is managed via mypy.ini at the project root.

Lint YAML files

Checks YAML configuration files for syntax and formatting issues.

python -m yamllint .

Validate staged files before committing

Before committing, run the check on your staged changes and (if needed) auto-fix style issues:

Run the check:

python app/scripts/check_changed_files.py

To auto-fix style-only problems (formatting, imports, CSV structure):

python app/scripts/check_changed_files.py --fix

Note: --fix only addresses style issues. Re-run the first command after fixes to confirm everything is clean before committing.


πŸ› οΈ Standalone Executable

Standalone executable instructions will be added soon.


🀝 Contributing

Your contributions help improve PhotoShow! Whether you're fixing a bug, improving the UI, or adding a new feature β€” every contribution matters.

  • Found a bug? Report it
  • Have an enhancement idea? Suggest it
  • Ready to code? Follow the workflow below

πŸ“ Naming Conventions

Follow these conventions for branches and commit messages:

Type Purpose Branch Example Commit Example
feat New feature feat/photo-grid feat: add photo grid view
fix Bug fix fix/login-validation fix: resolve login error
docs Documentation docs/update-readme docs: update installation steps
refactor Code restructuring refactor/album-service refactor: simplify album logic
test Testing test/auth-tests test: add auth unit tests
ci CI/CD pipelines ci/add-lint-workflow ci: add lint workflow
chore Maintenance chore/update-deps chore: update dependencies

πŸ”„ Contribution Workflow

  1. Fork the repository and clone your fork
  2. Create a branch:
    git checkout -b <type>/<short-description>
  3. Make your changes
  4. Commit:
    git commit -m "<type>: <short description>"
  5. Push:
    git push origin <type>/<short-description>
  6. Open a Pull Request

PR checklist:

  • βœ… Title follows naming conventions
  • βœ… Description explains changes clearly
  • βœ… Passes all linting and formatting checks
  • βœ… No merge conflicts

Thanks for contributing! πŸŽ‰

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

⬆️ Back to top

Releases

No releases published

Packages

 
 
 

Contributors

Languages