A modern, full-stack web application for image compression, format conversion, and background removal with automatic privacy protection.
- Image Compression - Reduce file sizes while maintaining quality
- Format Conversion - Convert between JPEG, PNG, WebP formats
- Background Removal - AI-powered background removal tool
- User registration and authentication
- Secure JWT-based sessions
- Upload history tracking (for logged-in users)
- Automatic Cleanup - All uploaded images deleted after 6 hours
- Anonymous Usage - All features work without login
- Data Migration - Anonymous uploads migrate to account on login
- Docker and Docker Compose
- Node.js 18+ (for local development)
-
Clone the repository
git clone <your-repo-url> cd MAJORPROJECT
-
Set up environment variables
cp SERVER/.env.example SERVER/.env # Edit SERVER/.env with your actual values -
Start all services
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Database: mongodb://localhost:27017
-
Stop services
docker-compose down
-
Start MongoDB
docker run -d --name imagepro-mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=password123 mongo:5.0
-
Start Backend
cd SERVER npm install npm start -
Start Frontend
cd client npm install npm run dev
- React 18 - Modern UI library with hooks
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- Axios - HTTP client for API calls
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Token authentication
- Multer - File upload middleware
- Sharp - Image processing library
- Google Cloud Storage - File storage
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- GitHub Actions - CI/CD pipeline
- Remove.bg - Background removal
- PhotoRoom - Alternative background removal
- Clipdrop - AI-powered image editing
MAJORPROJECT/
βββ SERVER/ # Backend API
β βββ controllers/ # Route handlers
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ middlewares/ # Auth & upload middleware
β βββ services/ # Background services
β βββ error/ # Error handling
βββ client/ # Frontend React app
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ utils/ # Utility functions
β β βββ styles/ # CSS styles
βββ docker-compose.yml # Docker configuration
-
Copy the example file:
cp SERVER/.env.example SERVER/.env
-
Update the values in SERVER/.env:
- Add your Google Cloud Storage credentials
- Add your background removal API keys (optional)
- Change JWT_SECRET for production
.env file to GitHub!
# Backend tests
cd SERVER
npm test
# Frontend tests
cd client
npm test- database - MongoDB 5.0 with persistent storage
- backend - Node.js API server with auto-restart
- frontend - React app served on port 3000
- 6-Hour Auto-Delete - All images automatically deleted
- Anonymous Processing - No login required for basic features
- Secure Storage - Images stored securely in cloud storage
- Data Migration - Anonymous data migrates to account on login
- Backend: Add routes in
SERVER/routes/ - Frontend: Add pages in
client/src/pages/ - Database: Add models in
SERVER/models/
- Clean, readable code with proper formatting
- Error handling throughout the application
- Responsive design for all screen sizes
- Image Compression: Upload any image and reduce file size while maintaining quality
- Format Conversion: Convert between JPEG, PNG, and WebP formats
- Background Removal: AI-powered background removal with transparent PNG output
- User Authentication: Register/login to save upload history
- Privacy Protection: All images automatically deleted after 6 hours
π Homepage β πΌοΈ Upload β βοΈ Process β π₯ Download β ποΈ Auto-cleanup
POST /api/auth/register # User registration
POST /api/auth/login # User login
GET /api/auth/profile # Get user profile
POST /api/image/compress # Compress images
POST /api/image/convert # Convert image formats
POST /api/image/remove-background # Removebackgrounds
# Download processed image
GET /api/image/history # Get upload history
DELETE /api/image/clear-activity # Clear user history- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Clean Architecture - Separation of concerns with modular design
- Security First - JWT authentication, input validation, automatic cleanup
- Performance Optimized - Image compression, efficient file handling
- Scalable Design - Docker containerization, cloud storage integration
- Modern Stack - Latest React, Node.js, and MongoDB versions
- Responsive Design - Works on desktop, tablet, and mobile
- Intuitive Interface - Simple drag-and-drop file uploads
- Real-time Processing - Live preview and progress indicators
- Privacy Focused - No permanent data storage, automatic cleanup
- Cross-platform - Works on Windows, macOS, and Linux
- CI/CD Pipeline - Automated testing and deployment
- Environment Management - Secure configuration with .env files
- Error Handling - Comprehensive error management
- Code Quality - Clean, readable, and well-documented code
- Version Control - Git with meaningful commit messages
# Check if all services are running
docker ps
# View backend logs
docker logs imagepro-backend
# Restart services
docker-compose restart
# Rebuild containers
docker-compose up --buildIf ports 3000, 5000, or 27017 are in use:
docker-compose down
# Kill processes using the ports
docker-compose up -d