A web application designed for AI artists, providing a dedicated platform to store and manage their generated artwork efficiently.
UPDATE 7-23-2025 Database Refactoring: Moving to SQLite We're actively refactoring the data layer, migrating from a browser-based database to SQLite. This move addresses limitations with the previous approach, offering improved data persistence, query performance, and offline capabilities. SQLite provides a solid foundation for the next phase of development, with plans to evaluate and potentially migrate to a more scalable infrastructure like PostgreSQL in the future.
UPDATE 7-24-2025 Changed out media player to Plyr
UPDATE 7-25-2025
The AI Media Gallery is a client-server web application built with:
- Backend: Node.js with Express.js framework
- Database: SQLite (using better-sqlite3)
- Frontend: Vanilla JavaScript with ES6 modules
- Storage: File system storage with database metadata
- REST API with endpoints for media management
- File upload handling with Multer
- SQLite database operations
- Static file serving
- script.js - Main application entry point
- database.js - Server API client
- gallery.js - Gallery display and media card rendering
- mediaProcessor.js - File processing and metadata extraction
- modal.js - Media viewing/editing modal with Plyr integration
- metadata.js - Metadata organization and display
- thumbnailEditor.js - Thumbnail position editing
- thumbnailGenerator.js - Thumbnail generation
- utils.js - Utility functions
- updatePrompts.js - Prompt cleaning functionality
- Parser modules - Specialized metadata extraction for different AI tools
- Upload images/videos via drag-and-drop or file selection
- Automatic metadata extraction from PNG text chunks
- Video thumbnail generation from first frame
- Gallery display with responsive grid layout
- Support for ComfyUI, ChatGPT, and AUTOMATIC1111 metadata formats
- Prompt extraction and cleaning
- Model information extraction
- Custom metadata editing
- Responsive design with mobile support
- Modal-based media viewing
- Plyr video player integration
- Thumbnail position editing with visual interface
- Search functionality
- Export/import database functionality
- Bulk thumbnail generation
- Prompt updating/cleaning
- Media deletion with file cleanup
- User uploads media file
- File is processed to extract AI metadata (prompts, models, etc.)
- File is stored in server directories (images/videos by date)
- Metadata is stored in SQLite database
- Thumbnails are generated for videos
- Media appears in gallery with searchable metadata
- Users can view/edit metadata in modal interface
- Changes are saved back to database
The application is well-architected with clear separation of concerns between frontend modules and follows modern JavaScript practices with ES6 modules.