PhotosApp is a secure client‑server photo management application that supports user authentication, album‑based access control, encrypted communication, and facial recognition. It includes a graphical interface for desktop clients and an optional Android client via submodule.
-
User Management
Signup, login, and per‑album access control with role‑based permissions. -
Facial Recognition
Automatically detects and compares faces usingface_recognition. -
Encrypted Communication
All traffic is encrypted using hybrid RSA‑AES encryption. -
Graphical Interface
A modern GUI built withcustomtkinterfor uploading, viewing, and searching photos. -
Modular Architecture
Includes optional Android client via Git submodule.
PhotosApp/
├── AndroidApp/ # Android client (Git submodule)
├── authentication.py # User authentication (SQLite + JWT)
├── basic_client.py # Client logic for communicating with server
├── basic_server.py # Server-side request handling
├── main.py # Windows GUI client (CustomTkinter)
├── requirements.txt # Python dependencies
├── server_library_manager.py # Face recognition and photo metadata
├── socket_app_utils.py # Encrypted socket communication
├── .gitignore
├── .gitmodules
└── README.md
Ensure you have Python 3.8+ installed, then run:
pip install -r requirements.txt
If requirements.txt is missing or incomplete, install manually:
pip install face_recognition pillow customtkinter pycryptodome
Note:
face_recognitionrequiresdlib, which may need CMake and Visual Studio Build Tools on Windows.
Before running the server and client, generate and place your own keys:
openssl genrsa -out private_RSA_key.pem 2048
openssl rsa -in private_RSA_key.pem -pubout -out public_RSA_key.pem
These files should not be committed to version control.
python basic_server.py
The server will:
- Listen on port
6000 - Create an
albums/folder to store uploaded photos and metadata
python main.py
Use the interface to:
- Sign up / Log in
- Create albums
- Upload or retrieve photos
- Search for faces
- View photo gallery
You can also use basic_client.py for scripted access:
from basic_client import signup, login, create_album, upload_photo
token = signup("user", "password123", is_admin=True)
token = login("user", "password123")
create_album(token, "vacation2025")
upload_photo(token, "vacation2025", "photos/image.jpg")This repository includes an Android client located in the AndroidApp/ subdirectory. To initialize it:
git submodule update --init --recursive
Then open the project in Android Studio.
- Passwords hashed using
SHA256+ salt - JWT tokens for session management
- AES encryption with per-session keys exchanged via RSA
- All communication performed over encrypted sockets
.pemkey files must be present locally for encryption but kept out of version control