CompressSync is an asynchronous image processing system that extracts image data from CSV files, compresses images by 50%, and stores the processed results. It supports API-based status tracking and webhook integration for seamless automation.
- Upload CSV files containing product data and image URLs.
- Process and store product details in MongoDB.
- Compress images asynchronously and store them in Cloudflare R2.
- Track processing status via API.
- Webhook integration for event-based notifications.
The project is deployed on Render: CompressSync
GitHub Repository: CompressSync
Documentation Link - Workers Documentation
Sample Input CSV File - input-compress-sync.csv
- Backend: Node.js, Express.js
- Database: MongoDB (MongoDB Atlas)
- ORM: Prisma
- Queue Processing: BullMQ (Redis - Render Key-Value)
- Storage: Cloudflare R2
- CI/CD: GitHub Actions, Docker
- Hosting: Render
- Validation: Zod
- Logging: Winston
- CSV Parsing: csv-parser
Make sure you have the following installed:
- Node.js (>= 18)
- Docker (for Redis)
- MongoDB (or use MongoDB Atlas)
Clone the repository:
git clone https://github.com/rohitvpatil0810/compress-sync.git
cd compress-syncInstall dependencies:
npm installStart Redis (using Docker):
docker run -d --name redis -p 6379:6379 redisSet up the environment variables:
- Create a
.envfile in the root directory. - Copy and configure the values from
.env.example.
Run database migrations:
npm run migrate-dbStart the development server:
npm run devThe server will start at http://localhost:8080.
Use the Postman Collection for testing the API endpoints.
A prebuilt Docker image is available:
docker pull ghcr.io/rohitvpatil0810/compress-sync/compress-sync:latestCopy .env.example to .env and configure:
cp .env.example .envKey variables:
DATABASE_URL- MongoDB connection stringREDIS_URL- Redis connection URLCLOUDFLARE_S3_ACCESS_KEY_ID- Cloudflare R2 Access KeyCLOUDFLARE_S3_SECRET_ACCESS_KEY- Cloudflare R2 Secret KeyCLOUDFLARE_S3_BUCKET- Cloudflare R2 Bucket Name
Feel free to fork the repo, create a branch, and open a pull request! 🚀