{"id":13902866,"url":"https://github.com/nikoheikkila/photo-browser","last_synced_at":"2025-07-24T20:06:27.805Z","repository":{"id":91082006,"uuid":"582142162","full_name":"nikoheikkila/photo-browser","owner":"nikoheikkila","description":"A modern frontend application architecture built with SvelteKit and Hexagonal / Clean Architecture principles","archived":false,"fork":false,"pushed_at":"2024-01-19T22:08:51.000Z","size":1736,"stargazers_count":90,"open_issues_count":6,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T20:57:01.829Z","etag":null,"topics":["clean-architecture","dracula","hexagonal-architecture","playwright","svelte","sveltekit","typescript","vite","vitest","zod"],"latest_commit_sha":null,"homepage":"https://nikoheikkila.fi/blog/clean-frontend-architecture-with-sveltekit","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/nikoheikkila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-12-25T21:14:16.000Z","updated_at":"2025-04-07T16:58:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7eb66e4-2111-44b5-b6d2-6d39dc6a0ce6","html_url":"https://github.com/nikoheikkila/photo-browser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikoheikkila/photo-browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoheikkila%2Fphoto-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoheikkila%2Fphoto-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoheikkila%2Fphoto-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoheikkila%2Fphoto-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikoheikkila","download_url":"https://codeload.github.com/nikoheikkila/photo-browser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoheikkila%2Fphoto-browser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266897284,"owners_count":24002661,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"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":["clean-architecture","dracula","hexagonal-architecture","playwright","svelte","sveltekit","typescript","vite","vitest","zod"],"created_at":"2024-08-06T22:01:28.382Z","updated_at":"2025-07-24T20:06:27.777Z","avatar_url":"https://github.com/nikoheikkila.png","language":"TypeScript","funding_links":[],"categories":["clean-architecture"],"sub_categories":[],"readme":"# 🌅 SvelteKit Photo Browser 🌉\n\nA website for browsing photos and albums delivered via Typicode API.\n\nThe real purpose of this project is to demonstrate building a modern frontend application architecture with **SvelteKit** and **Hexagonal / Clean Architecture** principles.\n\n## Clean Frontend Architecture with SvelteKit\n\nRead [the guide](https://nikoheikkila.fi/blog/clean-frontend-architecture-with-sveltekit) in my blog where I'm building the application and explaining the design process behind it.\n\n## Demo\n\nSee the demo application on [**Netlify**](https://sveltekit-photo-browser.netlify.app/).\n\n## Instructions\n\n1. Install [Task](https://taskfile.dev/installation)\n2. Install project dependencies with `task install`\n3. Run application development mode with `task dev`\n4. Make changes\n5. Run tests with `task test`\n\n## Architecture\n\nOverview of the software architecture and design is visualised in a Mermaid diagram below.\n\n```mermaid\nclassDiagram\n    direction\n\n    class SvelteKit {\n        \u003c\u003cFramework\u003e\u003e\n    }\n\n    class Layout {\n        load(LayoutParams params) LayoutData\n    }\n\n    class Page {\n        ssr : boolean\n        csr : boolean\n        load(RouteParams params) PageData\n    }\n\n    class Component\n    class Script\n    class HTML\n    class Style\n\n    class PhotoBrowser {\n        \u003c\u003cService\u003e\u003e\n        withLimit(int limit) self\n        loadPhotos() Array~Photo~\n        loadPhoto(int id) Photo\n        loadFromAlbum(int albumId) Array~Photo~\n        groupPhotosByAlbum() Array~Album~\n    }\n\n    class PhotoCalculator {\n        \u003c\u003cService\u003e\u003e\n        parseFullSize() Tuple~int~\n        parseThumbnailSize() Tuple~int~\n    }\n\n    class Photo {\n        \u003c\u003cEntity\u003e\u003e\n        id : int\n        albumId : int\n        title : string\n        url : URL\n        thumbnailUrl : URL\n    }\n\n    class PhotoGateway~T~ {\n        \u003c\u003cinterface\u003e\u003e\n        fetchPhotos(FetchParams args) Array~T~\n\t    fetchPhoto(int id) T\n\t    fetchPhotosByAlbumId(int albumId, FetchParams params) Dictionary~T~\n    }\n\n    class APIGateway~T~ {\n        \u003c\u003cAdapter\u003e\u003e\n    }\n\n    class Typicode {\n        \u003c\u003cREST API\u003e\u003e\n    }\n\n    class Vitest {\n        \u003c\u003cTest Framework\u003e\u003e\n    }\n\n    class FakeGateway~T~ {\n        \u003c\u003cTest Double\u003e\u003e\n    }\n\n    class FakerJS {\n        \u003c\u003clibrary\u003e\u003e\n    }\n\n    SvelteKit \"1\" --\u003e \"1\" PhotoBrowser : uses\n    SvelteKit \"1\" --\u003e \"1\" PhotoCalculator : uses\n    SvelteKit \"1\" --\u003e \"1\" Layout : loads\n    Layout \"1\" --\u003e \"*\" Page : contains\n    Page \"1\" --o \"*\" Component : renders\n    Component \"1\" --\u003e \"1\" Script : contains\n    Component \"1\" --\u003e \"1\" HTML : contains\n    Component \"1\" --\u003e \"1\" Style : contains\n\n    PhotoBrowser --\u003e APIGateway : uses\n    Vitest --\u003e FakeGateway : uses\n    PhotoGateway \"1\" --\u003e \"*\" Photo : fetches\n\n    APIGateway --|\u003e PhotoGateway : implements\n    APIGateway ..\u003e Typicode : uses\n    FakeGateway --|\u003e PhotoGateway : implements\n    FakeGateway ..\u003e FakerJS : uses\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoheikkila%2Fphoto-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikoheikkila%2Fphoto-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoheikkila%2Fphoto-browser/lists"}