{"id":13426201,"url":"https://github.com/eashish93/imgsquash","last_synced_at":"2025-03-15T21:30:47.585Z","repository":{"id":166432616,"uuid":"188890542","full_name":"eashish93/imgsquash","owner":"eashish93","description":"Simple image compression full website code written in node, react and next.js framework. Easy to deploy as a microservice.","archived":true,"fork":false,"pushed_at":"2020-07-17T03:11:12.000Z","size":1379,"stargazers_count":952,"open_issues_count":7,"forks_count":64,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-02-12T19:05:13.892Z","etag":null,"topics":["compression","image-compressor","image-processing","nextjs","nodejs","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eashish93.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-27T18:20:08.000Z","updated_at":"2024-01-04T16:34:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e925284a-83cc-4387-9a0b-8d450c14dea8","html_url":"https://github.com/eashish93/imgsquash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eashish93%2Fimgsquash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eashish93%2Fimgsquash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eashish93%2Fimgsquash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eashish93%2Fimgsquash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eashish93","download_url":"https://codeload.github.com/eashish93/imgsquash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792290,"owners_count":20348610,"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":["compression","image-compressor","image-processing","nextjs","nodejs","react"],"created_at":"2024-07-31T00:01:28.814Z","updated_at":"2025-03-15T21:30:46.921Z","avatar_url":"https://github.com/eashish93.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","目录","HarmonyOS","Web开发环境与工具"],"sub_categories":["Windows Manager","Web管理后台通用"],"readme":"## SUMMARY\nImage compression full stack website code. Contains both api service and frontend written in node, react and next.js framework.\n\n\n### SCREENSHOTS\n\u003cimg src=\"https://github.com/eashish93/imgsquash/blob/master/screenshots/screen-1.png\"\n     alt=\"screen-one\" width=\"420\"/\u003e\n\u003cimg src=\"https://github.com/eashish93/imgsquash/blob/master/screenshots/screen-2.png\"\n     alt=\"screen-two\" width=\"420\"/\u003e\n\u003cimg src=\"https://github.com/eashish93/imgsquash/blob/master/screenshots/screen-3.png\"\n     alt=\"screen-three\" width=\"420\"/\u003e\n\n\u0026emsp;\n\n### SETTING UP GOOGLE CLOUD STORAGE\n1. Create a project on google cloud and add a free cloud storage bucket via this quickstart guide: \n    - \u003chttps://cloud.google.com/storage/docs/quickstart-console\u003e\n2. Authenticate using either `gcloud` command line tool ([download here](https://cloud.google.com/sdk/docs/downloads-interactive)) or set `GOOGLE_APPLICATION_CREDENTIALS` env variable with the service account file.\n    - Guide here: \u003chttps://cloud.google.com/sdk/docs/authorizing\u003e\n\n\n### STARTING THE API SERVICE \n1. Create `.env` file in the root of the folder with the following variables. See [dotenv](https://www.npmjs.com/package/dotenv) on how to add env variables.\n    - __API_VERSION__ : `1` (optional).\n    - __GC_STORAGE__ : `your-google-cloud-bucket-name` \n    - __DL_BASE_URL__ : `[YOUR-API-URL]/1/dl` \n2. Do `npm install` to install all node modules for api.\n3. Do `npm run dev` to start the dev server on `3000` port.\n4. Do `npm start` for production\n\n\n### STARTING THE FRONTEND \n1. Do `npm install` to install all node modules for frontend.\n2. Do `npm run dev` will start the webpack server on `3001` port.\n3. Do `npm run build` and `npm start` to build and use the code in production.\n\n\n### NOTES \n\n1. Following programs are used for optimization\n    - mozjpeg (lossy jpeg compression)\n    - jpegtran (lossless jpeg compression)\n    - pngquant (lossy png compression)\n    - optipng (lossless png compression)\n3. Current file size upload limit is 10MB.\n4. API Routes.\n    [POST]\n    - `/image`: upload image(s) via file, URL, base64 or Binary.\n        - file: `file` or `base64` or `binary`.\n        - lossy: `Boolean` (default: false)\n    - `/url`: Compression direct image url.\n        - url: valid image url.\n    - `/zip`: Accepts list of files object as an array with (`id`, `size` and `name`) and send the zipped result.\n        - files: list of files object as an array.\n\n    [GET]\n        - `/dl/:id`: Generate download url of compressed image. Accept optional query `name`.\n        \n        \n ### LICENSE \n MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feashish93%2Fimgsquash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feashish93%2Fimgsquash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feashish93%2Fimgsquash/lists"}