A powerful local photo management application that helps you organize, optimize, and enhance your photo collection with AI-powered features. Designed to run locally but db can be hooked up easily to allow for cloud sync. No tracking, no ads, no data sharing, just a central place to manage your photos that you want to keep seperate from your existing cloud photo libraries.
- Local photo organization with SQLite database
- Comprehensive EXIF data tracking and management
- User-friendly gallery interface
- Bulk download functionality with ZIP file export
Creates four versions of each photo:
- Original: Preserves the untouched source file
- Optimized: Maintains EXIF data with 80% quality reduction
- Minified: 4x size reduction with optimization
- Thumbnail: 8x size reduction with optimization
- Automatic keyword generation using OpenAI's vision models
- Supports both single image and batch processing
- Smart keyword organization and management
- View and edit EXIF data
- Manage photo descriptions and keywords using OpenAI or manually
- Track photo versions and modifications
- Create and manage groups of photos
- View and edit group details
- Organize photos into groups
localhost:3000/api/db/create-sql-tables
- Node.js
- SQLite
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/photo-phriend.git
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Initialize the database: visit the following url in your browser to initialize the database. Creates a photo-phriend.db file in the db folder.
localhost:3000/api/db/create-sql-tables
-
Open http://localhost:3000 in your browser. This will take you to the Load & Optimize page.
-
Start by adding photos in the Load & Optimize page.
This will take all of the images you have selected, organize them in different arrays based on their aspect ratio, then combine 1-4 images into a quadrant composite image with a maximum 500px on the longest side. Send that image to OpenAI and then map the keywords based on the quadrant image. Doing mutliple images at once saves in api calls vs doing one at a time.
1. Go to the Gallery page.
2. Select the photos you want to generate keywords for.
3. Click the "Generate Keywords" button.
4. Click Generate All Keywords button on the keywords page.
5. The keywords will be generated and added to the database. They can be edited later on by clicking the edit button on the All Photos page.
OR For a single image: This sends a single image to the openAI api to generate keywords.
1. click generate keywords on the image you want to generate keywords for.
2. The keywords will be generated and added to the database. They can be edited later on by clicking the edit button on the All Photos page.
- Next.js
- SQLite
- OpenAI API
- TailwindCSS
- TypeScript
The application uses SQLite to manage:
- Photo metadata and file information
- EXIF data in both raw and structured formats
- Photo versions and optimizations
- AI-generated keywords and relationships
- Trash can for deleted photos
Contributions are welcome! Please feel free to submit a Pull Request.