{"id":50684104,"url":"https://github.com/leodyversemilla07/collage-craft","last_synced_at":"2026-06-08T21:02:07.649Z","repository":{"id":343393772,"uuid":"1177532029","full_name":"leodyversemilla07/collage-craft","owner":"leodyversemilla07","description":"Create polished photo collages in your browser","archived":false,"fork":false,"pushed_at":"2026-04-02T09:55:30.000Z","size":449,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T23:44:12.743Z","etag":null,"topics":["bun","collage","photo-editor","react","tailwindcss","typescript","vite"],"latest_commit_sha":null,"homepage":"https://collage-crafter.vercel.app","language":"TypeScript","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/leodyversemilla07.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-10T05:39:33.000Z","updated_at":"2026-04-02T09:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leodyversemilla07/collage-craft","commit_stats":null,"previous_names":["leodyversemilla07/collage-craft"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leodyversemilla07/collage-craft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodyversemilla07%2Fcollage-craft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodyversemilla07%2Fcollage-craft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodyversemilla07%2Fcollage-craft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodyversemilla07%2Fcollage-craft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leodyversemilla07","download_url":"https://codeload.github.com/leodyversemilla07/collage-craft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodyversemilla07%2Fcollage-craft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34080026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bun","collage","photo-editor","react","tailwindcss","typescript","vite"],"created_at":"2026-06-08T21:02:06.986Z","updated_at":"2026-06-08T21:02:07.638Z","avatar_url":"https://github.com/leodyversemilla07.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Collage Craft\n\nA web application that automatically generates polished photo collages in the browser. Upload multiple photos and Collage Craft ranks them with lightweight heuristics, then arranges them into clean editorial-style layouts.\n\n![Collage Craft app preview](./public/collage-craft-preview.png)\n\n## Features\n\n- **Multi-image upload** — drag-and-drop or file picker, supports JPG, PNG, WEBP\n- **3 layout styles** — Magazine (editorial hero), Grid (clean uniform), Scrapbook (playful rotated)\n- **Heuristic photo scoring** — ranks images by resolution, aspect ratio, file size, and orientation diversity\n- **Live preview** — collage updates instantly as you change settings\n- **Drag-to-swap** — reorder photos directly on the canvas by dragging one tile onto another\n- **Local persistence** — uploaded photos are restored from IndexedDB after a reload on the same device\n- **Export** — download as a high-quality 2× PNG\n- **Theme toggle** — switch between light, dark, and system modes\n- **Export feedback** — Sonner toasts confirm export progress and failures\n\n## Tech stack\n\n- **Frontend** — React 19 + TypeScript + Vite\n- **Styling** — Tailwind CSS v4 + shadcn/ui patterns\n- **Runtime and tooling** — Bun, ESLint, Prettier, TypeScript\n- **Rendering** — HTML canvas for preview and PNG export\n\n## Getting started\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) (or npm/pnpm/yarn)\n\n### Install and run\n\n```bash\n# Install dependencies\nbun install\n\n# Start development server\nbun dev\n```\n\nOpen http://localhost:5173 in your browser.\n\n### Build for production\n\n```bash\nbun run build\nbun run preview   # preview the production build\n```\n\n### Other commands\n\n```bash\nbun run lint       # ESLint\nbun run test       # Bun test suite\nbun run typecheck  # TypeScript type check only\nbun run format     # Prettier\n```\n\n## How it works\n\n1. Upload photos with drag-and-drop or the file picker.\n2. The app reads image metadata and creates lightweight object URLs for previews.\n3. Photos are ranked with a simple heuristic scorer.\n4. The layout engine arranges them into `magazine`, `grid`, or `scrapbook` compositions.\n5. The canvas preview updates live as you change style, size, spacing, or title.\n6. Export renders the collage to a high-resolution PNG and starts the download automatically.\n\n## Project structure\n\n```\nsrc/\n├── types/\n│   └── index.ts              # Shared interfaces: Photo, LayoutTile, CollageSettings, …\n├── lib/\n│   ├── constants.ts          # Canvas presets, density gaps, default settings\n│   ├── scoring.ts            # Photo scoring module and ranking helpers\n│   ├── layout-engine.ts      # Grid / Magazine / Scrapbook layout generators\n│   ├── persisted-photos.ts   # IndexedDB persistence for uploaded photos\n│   ├── tile-assignments.ts   # Drag-to-swap photo assignment helpers\n│   └── canvas-renderer.ts    # Canvas 2D rendering + PNG export\n├── hooks/\n│   ├── use-photo-upload.ts   # Object URL creation, drag-drop, Photo object creation\n│   ├── use-collage.ts        # Orchestrates scoring → layout → state\n│   ├── use-canvas-export.ts  # Triggers 2× PNG download + toast feedback\n│   └── use-is-dark.ts        # Resolved dark-mode boolean (handles \"system\" setting)\n├── components/\n│   ├── canvas/\n│   │   ├── collage-canvas.tsx # \u003ccanvas\u003e element + live re-render + drag-to-swap\n│   │   └── empty-state.tsx    # Placeholder before photos are uploaded\n│   ├── controls/\n│   │   ├── controls-panel.tsx # Full sidebar assembly\n│   │   ├── style-selector.tsx # Magazine / Grid / Scrapbook picker\n│   │   └── canvas-size-control.tsx\n│   └── upload/\n│       ├── upload-zone.tsx    # Drag-and-drop area\n│       └── photo-strip.tsx    # Scrollable thumbnail row\n└── App.tsx                    # Top-level layout and state wiring\n```\n\n## How photo scoring works\n\nCollage Craft uses a simple heuristic scorer to decide which photos should be featured first in a layout.\n\nThe scorer ranks each photo based on:\n| Factor | Weight | Rationale |\n|---|---|---|\n| Resolution (pixels) | 35% | More pixels = richer image |\n| Aspect ratio fit | 30% | Common ratios (16:9, 4:3, 3:2…) score higher |\n| File size | 20% | Proxy for compression quality |\n| Orientation diversity | 15% | Bonus for photos that diversify the mix |\n\nThese scores are then used to keep stronger photos near the front of the layout while still allowing some seeded variation in the final arrangement.\n\n## Current limitations\n\n- No backend or cloud sync; everything runs locally in the browser\n- Uploaded photos persist locally, but full project state and settings are not saved yet\n- No manual photo pinning beyond drag-to-swap reassignment\n- Scoring is intentionally simple and heuristic-based\n\n## License\n\nThis project is licensed under the MIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodyversemilla07%2Fcollage-craft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleodyversemilla07%2Fcollage-craft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodyversemilla07%2Fcollage-craft/lists"}