This is a full-stack image processing application that provides advanced image manipulation capabilities with user authentication and real-time processing updates.
📌 This project is a solution to the Image Processing Service listed on roadmap.sh's Backend Developer Roadmap.
Users should be able to:
- Register and authenticate their account with email verification
- Upload images securely to AWS S3 using presigned URLs
- Process images with various operations (resize, rotate, flip, mirror, format conversion)
- Receive real-time notifications about processing status via WebSocket
- View all their uploaded and processed images
- Monitor job queues and processing status through admin dashboard
- Experience secure and scalable image processing with background job handling
- Solution URL: https://github.com/karishma-dev/image_processing
- Live API URL: [Add your deployed API URL here]
- API Documentation: [Add your API docs URL here]
- Backend Framework: Node.js with Express.js and TypeScript
- Database: PostgreSQL with Prisma ORM
- Queue System: BullMQ with Redis for background job processing
- Image Processing: Sharp for high-performance image manipulation
- Cloud Storage: AWS S3 with presigned URLs for secure uploads
- Authentication: JWT with bcryptjs for secure user authentication
- Real-time Communication: WebSocket for live processing updates
- Security: Helmet, rate limiting, input sanitization, and CORS
- Documentation: Swagger/OpenAPI for interactive API documentation
- Monitoring: Bull Board for queue visualization and management
- Email Services: Nodemailer for verification and password reset emails
- Validation: Zod schemas for type-safe request validation
- Containerization: Docker with multi-stage builds
This project taught me about building scalable backend architectures with:
- Queue-based Processing: Implementing background job processing for CPU-intensive image operations
- Real-time Communication: Using WebSockets to provide live updates to users
- Cloud Integration: Working with AWS S3 for secure file storage and presigned URLs
- Database Design: Creating efficient schemas with Prisma for user management and image metadata
- Security Best Practices: Implementing comprehensive security measures for a production API
- Microservices Architecture: Separating concerns with dedicated worker processes
Future enhancements I want to add:
- Public image sharing functionality
- Image liking and social features
- Batch image processing capabilities
- Image compression optimization
- Watermarking features
- Advanced image filters and effects
-
Clone the repository:
git clone https://github.com/karishma-dev/image_processing.git cd image_processing -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile with:PORT=3000 DATABASE_URL="postgresql://username:password@localhost:5432/image_processing" REDIS_URL="redis://localhost:6379" JWT_SECRET=your_jwt_secret AWS_REGION=us-east-1 S3_BUCKET_NAME=your-bucket-name # Add other required environment variables
-
Set up the database:
npx prisma generate npx prisma migrate deploy
-
Start Redis:
redis-server
# Start the API server
npm run dev
# Start the image processing worker
npm run worker# Build the application
npm run build
# Start the production server
npm start# Build and run with Docker
docker build -t image-processing-api .
docker run -p 3000:3000 --env-file .env image-processing-apiPOST /auth/register- User registrationPOST /auth/login- User loginPOST /auth/verify-email- Email verificationPOST /auth/forgot-password- Password reset request
GET /images- Get all user imagesPOST /images/presign- Get presigned URL for uploadPOST /images/confirm- Confirm upload completionGET /images/:id- Get specific imageDELETE /images/:id- Delete image
POST /images/resize- Resize imagePOST /images/rotate- Rotate imagePOST /images/flip- Flip imagePOST /images/mirror- Mirror imagePOST /images/changeFormat- Change formatPOST /images/allOperations- Apply multiple operations
- GitHub - karishma-dev
- Twitter - @_karishma10
- LinkedIn - Karishma Garg
- CodePen - karishma-dev
