{"id":22731076,"url":"https://github.com/genentech/battery","last_synced_at":"2025-04-14T00:31:14.638Z","repository":{"id":57768428,"uuid":"526716749","full_name":"Genentech/battery","owner":"Genentech","description":"Architecture framework for Shiny Apps","archived":false,"fork":false,"pushed_at":"2022-08-23T08:41:13.000Z","size":265,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-01T18:57:29.491Z","etag":null,"topics":["architecture","component-architecture","rstats","shiny","shiny-apps"],"latest_commit_sha":null,"homepage":"","language":"R","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/Genentech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-19T18:40:51.000Z","updated_at":"2023-10-26T09:47:31.000Z","dependencies_parsed_at":"2022-08-22T20:11:02.776Z","dependency_job_id":null,"html_url":"https://github.com/Genentech/battery","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbattery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbattery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbattery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbattery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genentech","download_url":"https://codeload.github.com/Genentech/battery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229117070,"owners_count":18022819,"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":["architecture","component-architecture","rstats","shiny","shiny-apps"],"created_at":"2024-12-10T19:19:21.266Z","updated_at":"2024-12-10T19:19:22.589Z","avatar_url":"https://github.com/Genentech.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Genentech/battery/blob/master/inst/extra/battery-logo.svg?raw=true\"\n       alt=\"Battery R package Logo\" /\u003e\n\u003c/h1\u003e\n\n[R6Class based component architecture framework for Shiny apps](https://github.com/Genentech/battery)\n\n\nThe components design is based on AngularJS that can emit event from root it it's children\nand broadcast events from child to parents. It give better structure of non trivial shiny apps,\nthat need to have lots of different parts.\n\n## Installation\n\n```sh\ngit clone https://github.com/Genentech/battery.git\nR CMD INSTALL battery\n```\n\n## Basic usage\n\n```R\nButton \u003c- battery::component(\n  classname = \"Button\",\n  label = NULL,\n  constructor = function(label = NULL) {\n    self$label = label\n  },\n  render = function() {\n    shiny::tags$button(self$label)\n  }\n)\n\nApp \u003c- battery::component(\n  classname = \"App\",\n  public = list(\n    constructor = function() {\n      btn \u003c- Button$new(label = \"Click me\", parent = self, component.name = \"button\")\n      self$output[[ self$ns(\"root\") ]] \u003c- shiny::renderUI({\n        shiny::tags$div(\n          shiny::tags$p(\"click the button\"),\n          btn$render()\n        )\n      })\n    },\n    render = function() {\n      tags$div(\n        titlePanel('Shiny App using Battery R package'),\n        mainPanel(shiny::uiOutput(self$ns(\"root\")))\n      )\n    }\n  )\n)\n```\n\n## Documentation\n\nFor full documentation see [Battery Components](vignettes/battery-components.Rmd) Vignette.\n\nYou can also read tutorial about the framework features at DEV.to:\u003cbr/\u003e\n[Architecture for Non-Trivial R Shiny Applications](https://dev.to/jcubic/architecture-for-non-trivial-r-shiny-applications-3816)\n\n\n## Contributors\n* [Jakub T. Jankiewicz](https://github.com/jcubic) - main author\n* Michał Jakubczak\n\n## License\nCopyright (c) 2019-2021 Genentech, Inc.\u003cbr/\u003e\nReleased under MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fbattery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenentech%2Fbattery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fbattery/lists"}