A full-stack web application for managing and organizing images with AI-powered features. Built as a course project for B/S Architecture Software Design.
This image management system provides a comprehensive solution for uploading, organizing, searching, and managing personal image collections. It features intelligent AI-powered tagging, EXIF data extraction, and natural language search capabilities through MCP (Model Context Protocol) integration.
-
User Authentication
- User registration and login with JWT-based authentication
- Email validation and unique username/email enforcement
- Secure password hashing
-
Image Management
- Upload images via web browser (PC and mobile)
- Automatic thumbnail generation
- Image deletion with confirmation
- Image editing capabilities (crop, color adjustments)
-
EXIF Data Extraction
- Automatic extraction of camera information (make, model)
- Resolution and metadata capture
- GPS location data (latitude, longitude)
- Photo capture timestamp
-
Tag System
- Custom user-defined tags
- AI-generated tags for automatic categorization
- Tag-based image organization and filtering
-
Search & Discovery
- Multi-criteria search (tags, camera, date, etc.)
- AI-powered natural language search via MCP
- Filter by shooting month, camera manufacturer, and more
-
User Interface
- Responsive design for desktop, tablet, and mobile
- Modern UI built with Tailwind CSS
- Image gallery with modal view
- Toast notifications for user feedback
-
AI Tag Analysis
- Automatic image analysis using external AI models
- Async processing after upload
- Manual trigger for re-analysis
- Intelligent tag extraction (scenery, people, animals, etc.)
-
MCP Integration
- Natural language image search
- Conversational interface for image retrieval
- Integration with large language models
- Language: Go 1.25.1
- Framework: Gin
- Database: MySQL
- ORM: GORM
- Authentication: JWT** for stateless auth
- Image Processing: EXIF extraction, thumbnail generation
- Framework: React 19 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Routing: React Router DOM
- HTTP Client: Axios
- Database: MySQL with utf8mb4 encoding
- File Storage: Local filesystem for images and thumbnails
- AI Services: External API integration (e.g., Gemini, ModelScope)
image-management-app/
├── backend/ # Go backend application
│ ├── cmd/
│ │ └── main/ # Application entry point
│ ├── internal/
│ │ ├── database/ # Database connection
│ │ ├── handler/ # HTTP handlers
│ │ ├── middleware/ # Auth middleware
│ │ ├── model/ # Data models
│ │ ├── service/ # Business logic (AI service)
│ │ └── utils/ # Utilities (JWT, password)
│ ├── database/
│ │ └── schema.sql # Database schema
│ └── uploads/ # Image storage
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # React components
│ │ ├── contexts/ # React contexts
│ │ ├── hooks/ # Custom hooks
│ │ └── pages/ # Page components
│ └── public/ # Static assets
└── README.md # This file
- Go 1.25.1 or later
- Node.js and pnpm (or npm/yarn)
- MySQL 5.7+ or 8.0+
- Git
- Navigate to the backend directory:
cd backend- Install dependencies:
go mod download-
Set up the database:
- Create a MySQL database
- Run the schema script:
database/schema.sql
-
Configure environment variables (see
ENVIRONMENT_VARIABLES.md):- Database connection string
- JWT secret key
- AI service API keys
- Server port
-
Run the backend:
go run cmd/main/main.go- Navigate to the frontend directory:
cd frontend- Install dependencies:
pnpm install-
Configure API endpoint in
src/api/client.ts -
Run the development server:
pnpm dev- Build for production:
pnpm buildSee api.md for detailed API endpoint documentation.
The application uses MySQL with the following main tables:
users- User accountsimages- Image metadatatags- Image tags (user and AI-generated)
See backend/database/schema.sql for the complete schema.
Refer to backend/ENVIRONMENT_VARIABLES.md for required environment variables and configuration.
This project was developed as a comprehensive learning exercise covering:
- Full-stack development with modern technologies
- RESTful API design
- JWT authentication
- AI integration and MCP protocol
- Responsive web design
- Database design and optimization
This project is developed for educational purposes as part of a course assignment.
Developed as a course project for B/S Architecture Software Design at Zhejiang University.