Skip to content

A full Photography Studio SaaS with CLient Portal for Image Proofing and Gallery Delivery

License

Notifications You must be signed in to change notification settings

irgordon/aperture-pro-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

550 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ Aperture Pro

Photography Studio SaaS for Image Proofing, Download, and Gallery Management β€” powered by WordPress

Aperture Pro is a modern, production‑grade WordPress plugin built for photography studios that need a secure, elegant, and scalable way to deliver proofs, collect approvals, and provide final downloads. It blends a polished client experience with a robust operational backend designed for reliability, observability, and long‑term maintainability.


✨ Features

Client Proofing

  • Watermarked, low‑resolution proof images
  • Image selection, commenting, and approval workflows
  • Signed, short‑lived proof URLs
  • Mobile‑friendly, accessible client portal

Secure File Delivery

  • Download tokens bound to project, client email, and session
  • Optional OTP verification
  • Rate‑limited and single‑use token options
  • Signed URLs for local and cloud storage

Chunked, Resumable Uploads

  • Client‑side chunked uploader with exponential backoff + jitter
  • Local session persistence for resume
  • Server‑side chunk assembly with watchdog cleanup
  • Progress polling and resumability

Unified Upload Architecture

  • Provider‑agnostic UploaderInterface for all storage backends
  • Stream‑first uploads with automatic chunking or multipart fallback
  • Centralized retry strategy with exponential backoff
  • Explicit UploadRequest / UploadResult DTOs
  • Provider‑specific optimizations without Storage API changes

Storage Adapters

  • Local storage with path‑hiding and signed URL proxying
  • S3 + CloudFront with multipart uploads
  • Cloudinary and ImageKit adapters
  • Extensible StorageInterface and StorageFactory
  • Batch existence checks + batch URL signing

Payment Integration

  • Payment Abstraction Layer supporting multiple providers
  • Provider drivers (Stripe, PayPal, Square, Authorize.net, Amazon Pay)
  • Secure webhook verification
  • Normalized payment events via DTOs
  • Automatic project status updates via workflow engine
  • Admin β€œPayment Summary” card + timeline

Workflow Engine

  • Idempotent project lifecycle transitions
  • Proof approval β†’ editing β†’ delivery state management
  • Payment‑driven state updates
  • Event‑driven email and notification hooks
  • Hardened against retries and webhook replay

Admin UI

  • Modern SaaS‑style settings and Command Center
  • Tooltips, inline help, and validation
  • API key + webhook secret test actions
  • Theme variable overrides
  • Encrypted API keys and secrets at rest

Observability & Safety

  • Centralized logging
  • Health Dashboard with modular cards
  • Queue depth and performance metrics
  • Queued admin email notifications
  • Watchdog for stuck uploads, proofs, and storage issues

πŸ“ Architectural Workflow

Aperture Pro follows a strict event-driven workflow to ensure data integrity and a smooth client experience.

1. Project Lifecycle & Uploads

  1. Project Creation: Admin creates a project. The system initializes a Proof Gallery and generates a secure Magic Link.
  2. High-Res Upload: Photographer uploads high-resolution images via the admin panel.
    • Uploads are chunked client-side and streamed to the server to bypass PHP memory limits.
    • Chunks are assembled, validated (MIME/Size), and pushed to the configured Storage Provider (S3, Local, etc.).
    • Metadata is stored in the ap_images table.
  3. Proof Generation: A background job (driven by WP-Cron and ProofQueue) automatically picks up new images.
    • It downloads the original, resizes it, applies a watermark ("PROOF COPY"), and uploads the low-res variant.
    • This ensures the original high-res file is never exposed directly to the client browser.

2. Client Interaction

  1. Access: The client receives an email with the Magic Link, which logs them into the Client Portal (session-based).
  2. Selection & Approval:
    • Clients view the watermarked proofs.
    • They can "Heart" (Select) images and leave comments.
    • Finally, they click "Approve Proofs," which locks the gallery and transitions the project status to editing.
  3. Refinement: The photographer sees the approved selection in the admin dashboard to perform final edits (retouching).

3. Payment & Delivery

  1. Payment: The client pays for the package/session via the integrated payment gateway (Stripe/PayPal).
    • Webhooks notify the Payment Abstraction Layer, which normalizes the event.
    • Workflow::onPaymentReceived is triggered.
  2. Delivery:
    • Upon confirmed payment (or manual trigger), the system generates a secure, time-bound Download Token.
    • An email is sent to the client with a link to download their final gallery.
    • Downloads are streamed through a signed URL proxy to protect the actual storage location.

πŸ“ Plugin File Structure

aperture-pro/
β”‚
β”œβ”€β”€ aperture-pro.php
β”œβ”€β”€ index.php
β”œβ”€β”€ README.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ composer.json
β”œβ”€β”€ package.json
β”‚
β”œβ”€β”€ inc/
β”‚   β”œβ”€β”€ autoloader.php
β”‚   └── helpers.php
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Admin/
β”‚   β”œβ”€β”€ Auth/
β”‚   β”œβ”€β”€ ClientPortal/
β”‚   β”œβ”€β”€ Config/
β”‚   β”œβ”€β”€ Download/
β”‚   β”œβ”€β”€ Email/
β”‚   β”œβ”€β”€ Health/
β”‚   β”œβ”€β”€ Helpers/
β”‚   β”œβ”€β”€ Installer/
β”‚   β”œβ”€β”€ Payments/
β”‚   β”‚   β”œβ”€β”€ DTO/
β”‚   β”‚   β”œβ”€β”€ Providers/
β”‚   β”‚   β”œβ”€β”€ PaymentProviderInterface.php
β”‚   β”‚   └── PaymentProviderFactory.php
β”‚   β”œβ”€β”€ Proof/
β”‚   β”œβ”€β”€ REST/
β”‚   β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ Storage/
β”‚   β”‚   β”œβ”€β”€ Upload/
β”‚   β”‚   β”‚   β”œβ”€β”€ UploaderInterface.php
β”‚   β”‚   β”‚   β”œβ”€β”€ UploadRequest.php
β”‚   β”‚   β”‚   β”œβ”€β”€ UploadResult.php
β”‚   β”‚   β”‚   β”œβ”€β”€ S3Uploader.php
β”‚   β”‚   β”‚   β”œβ”€β”€ CloudinaryUploader.php
β”‚   β”‚   β”‚   └── ImageKitUploader.php
β”‚   β”‚   └── StorageFactory.php
β”‚   β”œβ”€β”€ Workflow/
β”‚   └── Loader.php
β”‚
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── images/
β”‚
└── tests/
    β”œβ”€β”€ verify_uploaders.php
    β”œβ”€β”€ verify_payment_abstraction.php
    β”œβ”€β”€ benchmark_js_chunking.js
    └── phpunit.xml

🎨 Theme File Structure

aperture-pro-theme/
β”‚
β”œβ”€β”€ style.css
β”œβ”€β”€ theme.json
β”œβ”€β”€ screenshot.png
β”‚
β”œβ”€β”€ functions.php
β”œβ”€β”€ index.php
β”‚
β”œβ”€β”€ inc/
β”‚   β”œβ”€β”€ enqueue.php
β”‚   β”œβ”€β”€ template-tags.php
β”‚   └── helpers.php
β”‚
β”œβ”€β”€ parts/
β”‚   β”œβ”€β”€ header.html
β”‚   β”œβ”€β”€ footer.html
β”‚   └── navigation.html
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ front-page.html
β”‚   β”œβ”€β”€ single.html
β”‚   └── page.html
β”‚
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   β”œβ”€β”€ header.css
β”‚   β”‚   β”œβ”€β”€ navigation.css
β”‚   β”‚   └── layout.css
β”‚   β”‚
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ theme.js
β”‚   β”‚   └── interactions.js
β”‚   β”‚
β”‚   └── images/
β”‚
└── tests/
    └── verify_theme_load.php

πŸš€ First Installation & Setup

Follow these steps to get your studio up and running immediately after installing the plugin.

1. Installation

  1. Upload the aperture-pro folder to your /wp-content/plugins/ directory.
  2. Log in to WordPress Admin and navigate to Plugins.
  3. Click Activate under "Aperture Pro".
  4. Optional: If you are using the companion theme, upload and activate aperture-pro-theme under Appearance β†’ Themes.

2. Storage Configuration (Crucial)

Go to Aperture Pro β†’ Settings β†’ Storage.

  • Local Storage: Simplest for getting started. Files are stored on your server.
  • S3 / Cloud Storage (Recommended): For production scalability.
    • Select your provider (AWS S3, DigitalOcean Spaces, Wasabi, etc.).
    • Enter your Region, Bucket Name, Access Key, and Secret Key.
    • Click Test Connection to verify permissions.

3. Payment Setup

Go to Aperture Pro β†’ Settings β†’ Payments.

  1. Select your provider (e.g., Stripe, PayPal).
  2. Enter your API Keys (Publishable/Secret).
  3. Webhook Setup:
    • Copy the Webhook Endpoint URL displayed on the settings page (e.g., https://site.com/wp-json/aperture/v1/webhooks/payment/stripe).
    • Add this endpoint in your Payment Provider's dashboard.
    • Copy the Webhook Secret from the provider and paste it back into Aperture Pro settings.

4. Email & Notifications

Go to Aperture Pro β†’ Settings β†’ Email.

  • Configure the Sender Name and Sender Email.
  • Ensure your WordPress install can send emails (use an SMTP plugin like WP Mail SMTP for reliability).
  • Test by sending a magic link to yourself.

5. Create Your First Project

  1. Navigate to Aperture Pro β†’ Projects β†’ Add New.
  2. Enter a Client Name and Email.
  3. Set the Project Title (e.g., "Smith Family Session").
  4. Upload your first batch of images in the Uploads tab.
  5. Wait a moment for the Proof Queue to generate watermarked copies (check the Health dashboard if needed).
  6. Copy the Magic Link and open it in an Incognito window to see what your client sees.

βš™οΈ Quick Configuration Guide

Storage

  • Local β€” simplest; uses server disk
  • S3 + CloudFront β€” recommended for large ZIP deliveries
  • Cloudinary / ImageKit β€” optimized for image‑heavy proof galleries

Email

  • Set a verified sender address for OTP + notifications

Payments

  • Configure your provider to POST to:
    https://your-site.com/wp-json/aperture/v1/webhooks/payment/{provider}
    
  • Add your webhook secret
  • Validate via the built‑in test tool

OTP

  • Enable OTP for secure downloads
  • Clients receive a short‑lived code via email

πŸ”Œ REST API Endpoints (Selected)

Uploads

POST /aperture/v1/uploads/start
POST /aperture/v1/uploads/{upload_id}/chunk
GET  /aperture/v1/uploads/{upload_id}/progress

Proofing

GET  /aperture/v1/projects/{project_id}/proofs
POST /aperture/v1/proofs/{gallery_id}/select
POST /aperture/v1/proofs/{gallery_id}/comment
POST /aperture/v1/proofs/{gallery_id}/approve

Downloads

POST /aperture/v1/projects/{project_id}/regenerate-download-token
GET  /aperture/v1/download/{token}
POST /aperture/v1/download/{token}/request-otp
POST /aperture/v1/download/verify-otp

Payments

POST /aperture/v1/webhooks/payment/{provider}
GET  /aperture/v1/projects/{id}/payment-summary
GET  /aperture/v1/projects/{id}/payment-timeline
POST /aperture/v1/projects/{id}/retry-payment

πŸ” Security

  • Encryption at rest for API keys + secrets
  • Signed URLs for proofs + downloads
  • Optional OTP verification
  • Rate limiting for downloads and sensitive endpoints
  • Session + email binding for download tokens
  • REST middleware for request hygiene and abuse prevention

🧩 Developer Notes

Client Assets

  • client-portal.js β€” uploader, proofs, OTP, downloads
  • SPA components for marketing and admin dashboards

Server Components

  • Unified uploaders with retry + streaming
  • Proof generation queue with batch enqueueing
  • Payment Abstraction Layer
  • Workflow engine with idempotent transitions
  • REST controllers with middleware stack
  • Email queue + transactional delivery

Extensibility

  • Add new storage providers via UploaderInterface + StorageInterface
  • Add new payment providers via PaymentProviderInterface
  • Add new admin cards via SPA component registry

πŸ§ͺ Troubleshooting

  • Proofs not generating β†’ check Imagick/GD
  • Webhook failures β†’ verify signature header
  • Upload issues β†’ check PHP limits and storage credentials
  • Download errors β†’ verify token + OTP

🀝 Contributing

Contributions welcome. High‑impact areas:

  • Additional payment providers
  • Background ZIP generation
  • Redis‑backed rate limiting
  • Upload progress telemetry
  • End‑to‑end upload/download tests

πŸ“„ License

MIT License β€” see LICENSE for details.

About

A full Photography Studio SaaS with CLient Portal for Image Proofing and Gallery Delivery

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •