Photography Gallery
An AI-powered photography gallery with daily photo spotlight, semantic search with Gemini re-ranking, and intelligent content curation.
Overview
This photography gallery showcases a fusion of creative visual content with advanced technical implementation. The platform leverages Google Gemini AI for photo analysis, tagging, and daily curation, implements vector embeddings for semantic search enhanced by Gemini re-ranking, and provides a smooth, responsive gallery experience. Features include real-time photo uploads with comprehensive metadata editing, a cron-orchestrated daily spotlight system with fair photo rotation, engagement tracking, and a comprehensive admin panel for content management.
Technical Stack
Next.js 16 (App Router)
React 19
TypeScript
Vercel Neon Postgres with Drizzle ORM
Key Features
- Automatic title and description generation using Google Gemini 3 Flash model.
- Intelligent tag suggestions based on visual content analysis.
- Color palette extraction and thematic categorization for tags.
- EXIF data extraction with timezone support, camera model normalization, and smart metadata enhancement.
- Location and tag creation directly during upload with duplicate prevention.
Architectural Highlights
- Load-all strategy fetches entire photo catalog (~170) then applies client-side filtering for instant results.
- Dynamic facet calculation recalculates tag/location counts based on current filtered view.
- Two-phase cron orchestrator for daily photos with exclusion lists to prevent repetition across global timezones.
- Gemini 2.5 Flash Lite re-ranking pipeline with exponential backoff retry logic for AI rate limits.
- Hybrid search architecture combining Vertex AI semantic embeddings with PostgreSQL full-text search.
- Session-based authentication with Redis+DB hybrid caching (1-5ms fast path, database fallback).
- Anonymous engagement system using browser fingerprinting for loves and view tracking.
- On-demand revalidation via revalidatePath() replacing ISR for immediate photo page updates.
- Selection count tracking (selection_count, last_selected_at) ensuring fair photo rotation.
- EXIF timezone extraction and camera model normalization for accurate metadata.
- Distributed locking (Redis SETNX) preventing race conditions in daily photo computation.
- Tag-based cache invalidation with 10-year TTL for immutable search results.
- Comprehensive metadata editing during upload with location/tag creation and duplicate prevention.
- Cloudinary-only video architecture with incoming transformations (crop/mute) to maximize free tier usage.
- Immersive 3D gallery with texture preloading, cache versioning, cylindrical layout, touch/mouse controls, and video playback.
Project Status
- Complete photo gallery with masonry grid layout and modal viewing.
- AI-powered photo analysis with automatic title, description, and tag generation.
- Advanced search with Vertex AI embeddings and Gemini 2.5 Flash Lite re-ranking.
- Love system with anonymous fingerprint-based engagement tracking.
- Daily Photo Spotlight with 3-tier priority and cron orchestration.
- Session-based admin authentication with Redis+DB hybrid caching.
- Location-based filtering and tag-based organization.
- Enhanced upload with EXIF extraction, location/tag creation, and metadata editing.
- On-demand revalidation for immediate photo page updates.
- Living Portfolio: AI-generated cinemagraphs for static photos.
- Immersive 3D Gallery mode with cylindrical layout and focus interactions.