{"id":22192525,"url":"https://github.com/3sidedcube/fusion","last_synced_at":"2025-10-30T10:33:16.111Z","repository":{"id":79436418,"uuid":"346042471","full_name":"3sidedcube/Fusion","owner":"3sidedcube","description":"JSON data driven UITableView UI for iOS fetched from a remote API using UIKit","archived":false,"fork":false,"pushed_at":"2023-09-01T09:13:45.000Z","size":488,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-30T01:22:30.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/3sidedcube.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":"2021-03-09T14:55:04.000Z","updated_at":"2021-11-11T17:19:38.000Z","dependencies_parsed_at":"2024-12-02T12:40:02.321Z","dependency_job_id":null,"html_url":"https://github.com/3sidedcube/Fusion","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/3sidedcube%2FFusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FFusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FFusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FFusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3sidedcube","download_url":"https://codeload.github.com/3sidedcube/Fusion/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351757,"owners_count":20601090,"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-12-02T12:25:45.725Z","updated_at":"2025-10-30T10:33:16.030Z","avatar_url":"https://github.com/3sidedcube.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fusion\n\nA Swift Package (library) that renders JSON data into SwiftUI views.\n\n## Basic usage\n\n```swift\nstruct MyView: View {\n\n    var body: some View {\n        JSONView(url: ...)\n    }\n}\n```\n\n## How it works\n\nFor every UI component that could be represented as a JSON object, a `FusionModel` is created like:\n\n```swift\nstruct FusionText: FusionModel {\n    var value: String\n    var isMarkdown: Bool?\n    ...\n}\n```\n\nSince a `FusionModel` is `Decodable`, this can be decoded from a JSON such as:\n\n```json\n{\n    \"type\": \"Text\",\n    \"value\": \"Hello 👋\",\n    \"isMarkdown\": false,\n    ...\n}\n```\n\nFusion decodes the JSON into its corresponding model using the `type` property.\nIt's matched to a model type in the `Fusion.shared.models` property.\n\nSince a `FusionModel` is also a `View`, it can then be rendered into UI.\nA similar logic applies to `FusionAction`s, except they are rendered as `ViewModifiers`.\n\nThe models in this library are prefixed with the `\"Fusion*\"` suffix to not interfere with the SwiftUI types.\n\n## Supported types\n\n* View\n* Text\n* Image\n* Stack\n* Scroll\n* Screen\n\nThe `View` properties can be applied to all models.\n\n## Make a custom model\n\nMake your own (view) model:\n\n```swift\nstruct MyModel: FusionModel {\n    var myProperty: String\n    ...\n    \n    var body: some View {\n        ...\n    }\n}\n```\n\nand register it on the `Fusion`:\n\n```swift\nFusion.shared.models[\"MyModel\"] = MyModel.self\n```\n\n## What motivated the name \"Fusion\"?\n\nFusion here means to bring together two platforms, iOS and Android, powered by a single data source.  \nFor web-server apps, the business logic should sit server-side as much as possible.\nFusion aims to be as simple as \"server tell me what to draw and I'll draw it\".\n\n## Legacy\n\nThis framework was initially developed (and nearly finished) in UIKit. The work can be found in the branch: `legacy/ui-kit`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Ffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3sidedcube%2Ffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Ffusion/lists"}