{"id":21314675,"url":"https://github.com/rohit1kumar/image-cruncher","last_synced_at":"2025-03-15T21:22:53.603Z","repository":{"id":251376590,"uuid":"825852308","full_name":"rohit1kumar/image-cruncher","owner":"rohit1kumar","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-04T19:38:01.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T10:23:16.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://image-cruncher.onrender.com/docs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohit1kumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-08T16:15:48.000Z","updated_at":"2024-08-04T19:51:25.000Z","dependencies_parsed_at":"2024-08-04T20:45:33.967Z","dependency_job_id":null,"html_url":"https://github.com/rohit1kumar/image-cruncher","commit_stats":null,"previous_names":["rohit1kumar/csv-processor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit1kumar%2Fimage-cruncher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit1kumar%2Fimage-cruncher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit1kumar%2Fimage-cruncher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit1kumar%2Fimage-cruncher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohit1kumar","download_url":"https://codeload.github.com/rohit1kumar/image-cruncher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243791136,"owners_count":20348423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T18:14:55.973Z","updated_at":"2025-03-15T21:22:53.579Z","avatar_url":"https://github.com/rohit1kumar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Cruncher\nAn image processing service, processes CSV files containing product data and images, compresses the images, and stores the results.\n\n## Components\n- FastAPI: Web server for handling API requests\n- Celery: Task queue for async processing\n- PostgreSQL: Database for storing product data\n- S3: Object storage for image uploads\n- RabbitMQ: Message broker for Celery\n\n![architecture](https://github.com/user-attachments/assets/c5d3c232-cb45-4c3b-9d7a-aab8b704710c)\n\nFastAPI server receives CSV files with webhook URL, validates them, stores in S3, and creates a database entry. It pushes the task to RabbitMQ and returns a request ID.\nCelery worker processes the CSV, compresses images, uploads to S3, updates the database, and notifies via webhook.\nClients can check status using the request ID.\n\n\n## API Endpoints (Visit [/docs](https://image-cruncher.onrender.com/docs))\n\n`POST /api/v1/upload`: Upload CSV file + webhook URL (optional)\n\n`GET /api/v1/status/{request_id}`: Check processing status\n\n\n\n## Database Schema\n\n![database_schema)](https://github.com/user-attachments/assets/5516d92d-d0ae-42aa-bbf0-ce273a53e723)\n\n## Asynchronous Processing\nCelery worker handles:\n\n1. CSV parsing\n2. Image downloading and compression\n3. S3 uploads\n4. Database updates\n5. Webhook notifications\n\n## How to Run\n1. Get the code: `git clone https://github.com/rohit1kumar/image-cruncher.git`\n2. Install dependencies using poetry: `poetry install`\n3. Add environment variables to `.env` file (see `.env.example`)\n4. Run the FastAPI server: `./scripts/start_server.sh` *(dont forget to make the script executable)*\n5. Run the Celery worker: `./scripts/start_celery.sh`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohit1kumar%2Fimage-cruncher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohit1kumar%2Fimage-cruncher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohit1kumar%2Fimage-cruncher/lists"}