{"id":21178411,"url":"https://github.com/helsingborg-stad/app-mitt-helsingborg","last_synced_at":"2025-07-09T22:31:36.286Z","repository":{"id":37412647,"uuid":"188836548","full_name":"helsingborg-stad/app-mitt-helsingborg","owner":"helsingborg-stad","description":"Mobile application built on React Native to serve residents of Helsingborg.","archived":true,"fork":false,"pushed_at":"2023-07-10T23:35:23.000Z","size":14695,"stargazers_count":9,"open_issues_count":3,"forks_count":0,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2025-03-26T01:15:35.261Z","etag":null,"topics":["mitt-helsingborg","react-native"],"latest_commit_sha":null,"homepage":"","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/helsingborg-stad.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}},"created_at":"2019-05-27T12:10:28.000Z","updated_at":"2024-06-18T06:22:38.000Z","dependencies_parsed_at":"2024-11-20T17:23:16.963Z","dependency_job_id":"6e987e58-79bd-4dae-8a89-1842e1dc5821","html_url":"https://github.com/helsingborg-stad/app-mitt-helsingborg","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/helsingborg-stad/app-mitt-helsingborg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsingborg-stad%2Fapp-mitt-helsingborg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsingborg-stad%2Fapp-mitt-helsingborg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsingborg-stad%2Fapp-mitt-helsingborg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsingborg-stad%2Fapp-mitt-helsingborg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helsingborg-stad","download_url":"https://codeload.github.com/helsingborg-stad/app-mitt-helsingborg/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helsingborg-stad%2Fapp-mitt-helsingborg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504602,"owners_count":23618827,"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":["mitt-helsingborg","react-native"],"created_at":"2024-11-20T17:21:13.469Z","updated_at":"2025-07-09T22:31:34.622Z","avatar_url":"https://github.com/helsingborg-stad.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- SHIELDS --\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![License][license-shield]][license-url]\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/helsingborg-stad/app-mitt-helsingborg\"\u003e\n    \u003cimg src=\"hbg-github-logo-combo.png\" alt=\"Logo\" width=\"300\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[![Mitt Helsingborg banner][product-screenshot]](https://example.com)\n\n\u003ch3\u003eMitt Helsingborg\u003c/h3\u003e\n\n\u003cp\u003e\n   App for Helsingborg E-services.\n  \u003cbr /\u003e\n  \u003ca href=\"https://github.com/helsingborg-stad/app-mitt-helsingborg/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/helsingborg-stad/app-mitt-helsingborg/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n# Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [About Mitt Helsingborg](#about-mitt-helsingborg)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n  - [Setup environment variables](#setup-environment-variables)\n    - [Backend selector](#backend-selector)\n    - [Component library (Storybook)](#component-library-storybook)\n- [Deploy](#deploy)\n  - [Android](#android)\n    - [Add upload key](#add-upload-key)\n    - [Generate AAB (Android App Bundle)](#generate-aab-android-app-bundle)\n    - [Test the release build](#test-the-release-build)\n    - [Upload AAB to Google Play Console](#upload-aab-to-google-play-console)\n- [CI / Automated Builds](#ci--automated-builds)\n  - [General](#general)\n  - [iOS build (TestFlight)](#ios-build-testflight)\n    - [Environment variables (secrets)](#environment-variables-secrets)\n  - [Other workflows](#other-workflows)\n- [Sentry](#sentry)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n\n# About Mitt Helsingborg\n\nMitt Helsingborg is an iOS and Android app used by citizens in Helsingborg, Sweden. This app allow citizens to interact with various Helsingborg E-services.\n\nThe app is built with [React Native](https://reactnative.dev/) using [TypeScript](https://www.typescriptlang.org/). Other tech choices includes:\n\n- [StoryBook](https://storybook.js.org/) for component stories\n- [Styled Components](https://styled-components.com/) for styling elements\n- [Eslint](https://helsingborg-stad.github.io/dev-guide/docs/development/linters/eslint.html) for linting\n- [Prettier](https://prettier.io/) for formatting\n\n# Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n## Prerequisites\n\nNote: in general the supported version of any given dependency is the same as the version used by the CI.\n\n- [Node.js](https://nodejs.org/en/download/package-manager/) - the version(s) supported are noted in the [engines section of package.json](package.json)\n- [Yarn](https://yarnpkg.com/)\n- [React Native Development Environment](https://reactnative.dev/docs/environment-setup/)\n\n## Installation\n\n1. Clone the repo\n\n```sh\ngit clone https://github.com/helsingborg-stad/app-mitt-helsingborg.git\n```\n\n2. Install packages\n\n```sh\nyarn install\n```\n\n3. Copy `.example.env` to `.env` and fill in the required variables.\n\n4. Run app on iOS simulator\n\n```sh\nyarn ios\n```\n\n4. Run app on Android emulator\n\n```sh\nyarn android\n```\n\n## Setup environment variables\n\nThe app uses dotenv (`.env`) files to read environment variables during build-time.\nCopy `example.env` to `.env` replace the values to get started.\n\n### Backend selector\n\nSet `MITTHELSINGBORG_IO` to an MH-compatible url (see [helsingborg-io-sls-api](https://github.com/helsingborg-stad/helsingborg-io-sls-api)) and\nset `MITTHELSINGBORG_IO_APIKEY` to the API key required to authorize against it. This will be used as the default environment when using the app.\n\nAfter starting the app, at the Login Screen, you can optionally provide additional environment(s) to override the default environment.\nTo do so click the gear icon in the top-right corner and enter a value for the \"App Konfiguration\".\n\nThe format of the configuration is:\n\n```json\n{ \"envName\": [\"apiUrl\", \"apiKey\"] }\n```\n\nFor example, to provide two environments, `develop` and `release`, enter:\n\n```json\n{\n  \"develop\": [\"https://myapi.com/dev\", \"123\"],\n  \"release\": [\"https://myapi.com/release\", \"abc\"]\n}\n```\n\nIf multiple endpoints are specified like the example, a dropdown-picker will be shown on the Login Screen\nwhere you can choose which environment to use.\n\nIf only one environment is specified then it will be used instead of the default environment specified in the `.env` file.\n\n### Component library (Storybook)\n\n1. Set env variabel `IS_STORYBOOK` to true in `.env`\n2. Launch application in simulator by running command \"yarn ios\".\n3. Now you should see storybook running in the simulator.\n\n# Deploy\n\n## Android\n\n### Add upload key\n\nTo be able to sign the app you need to add an upload key to the project.\n\n1. Open **1Password** app and enter vault: **Mitt Helsingborg**.\n2. Download `mitt-helsingborg-upload-key.keystore`.\n3. Place the `mitt-helsingborg-upload-key.keystore` file under the `android/app` directory in your project folder.\n4. Create a `keystore.properties` file:\n\n```sh\ncd android \u0026\u0026 cp example.keystore.properties keystore.properties\n```\n\n5. Update `keystore.properties` with passwords.\n\n\u003e **Important:** Make sure to never push mitt-helsingborg-upload-key.keystore or keystore.properties to Git.\n\n### Generate AAB (Android App Bundle)\n\n1. Open `android/app/build.gradle`\n2. Update **versionCode** by taking the latest published versionCode and increase it by 1. You can find previous uploaded versions at [Google Play Console](https://play.google.com/console).\n3. Update **versionName**. This is displayed publicly when downloading the app.\n4. Generate release AAB:\n\n```sh\ncd android\n./gradlew bundleRelease\n```\n\nThe generated AAB can be found under `android/app/build/outputs/bundle/release/app.aab`.\n\n### Test the release build\n\nBefore uploading the release build to the Play Store, make sure you test it thoroughly. First uninstall any previous version of the app you already have installed.\n\n```sh\nnpx react-native run-android --variant=release\n```\n\n### Upload AAB to Google Play Console\n\n1. Go to [Google Play Console](https://play.google.com/console) and navigate to the project app.\n2. Click on **Production** in the menu.\n3. Click **Create New Release** button and follow the instructions.\n\n# CI / Automated Builds\n\nThis project uses GitHub actions in combination with Fastlane to automatically build and upload builds (currently iOS only).\n\nCI builds are built as production-ready by default. For testing CI builds you can specify custom environments in-app (see [Backend selector](#backend-selector)).\n\n## General\n\nA distinct process (e.g. \"build an iOS app\") is denoted as a \"workflow\". Each workflow is a separate yaml file in `.github/workflows`. Most workflows can be manually run from the [actions tab](https://github.com/helsingborg-stad/app-mitt-helsingborg/actions) if you have access. Previous workflow runs with logs and artifacts can also be found there.\n\nConfiguration (environment variables) are provided through [GitHub secrets](https://github.com/helsingborg-stad/app-mitt-helsingborg/settings/secrets/actions).\n\nMany operation are done with Fastlane. Fastlane is a tool used to simplify many actions (such as handling certificates and profiles, creating and uploading builds, etc.).\nFastlane is used through ruby files that are run in a Fastlane context with `fastlane run \u003clane\u003e`. A lane is a single contained process, such as creating and uploading a build.\n\n## iOS build (TestFlight)\n\nThe workflow file for iOS builds is `./github/workflows/ios-build.yml`. It can be run manually, and runs automatically for any push to branches\nmatching `release/**` (e.g. `release/1.4.0`). It automatically tries to determine the version and build number to set based on the branch name,\nand defaults to incrementing the latest from TestFlight.\n\nVersion number and build number can optionally be forced for manual runs.\n\nThe workflow sets up dependencies and variables and then calls a specific Fastlane lane defined in `ios/fastlane/Fastfile`.\n\n### Environment variables (secrets)\n\nVariables used by the workflow and Fastlane are documented [in the Fastlane example.env](ios/fastlane/example.env). The other variables used by the build workflow are:\n\n| Variable                 | Contents                                                                                                                                                                                                                               |\n| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| BUILD_CERTIFICATE_BASE64 | Base64 representation of the Apple distribution certificate `.p12` file. Generate with `cat cert.p12 \\| base64`.                                                                                                                       |\n| P12_PASSWORD             | Password to unlock the contents of `BUILD_CERTIFICATE_BASE64` (the password entered during the certificate export).                                                                                                                    |\n| CACHE_KEY_PREFIX         | Used to change the id for the caching of node modules and cocoapods. Changing this will essentially invalidate the cache. The actual value is not important but it's a good praxis to use the current date, to avoid future conflicts. |\n| CERT_KEYCHAIN_PASSWORD   | Password used for the ephemeral keychain used to store the certificate. This variable is mostly unimportant as the keychain is not persistent.                                                                                         |\n| DOTENV_CONTENTS_BASE64   | Contents of the `.env` file. See [example.env](.example.env). Generate with `cat .env \\| base64`.                                                                                                                                      |\n| SENTRY_PROPERTIES_BASE64 | Contents of the `sentry.properties` file (see [Sentry](#Sentry)).                                                                                                                                                                      |\n\n## Other workflows\n\nIn addition to builds there the following workflows:\n\n- `automated-tests.yml` - runs `yarn test` for pull requests\n- `styling-linting.yml` - checks styling consistency and linting errors for pull requests\n- `tag-master.yml` - can be used to tag a branch based on the name of a ref (e.g. `release/1.4.0` =\u003e `1.4.0`)\n\n# Sentry\n\nSentry is used for live error reporting in deployed builds. To use Sentry add your Sentry DSN as an environment variable:\n\n```bash\nSENTRY_DSN=https://1234@sentry.mydomain.se/0\n```\n\nAdditionally, to get correct symbols and sourcemaps for release builds add a file called `android/sentry.properties` or `ios/sentry.properties` and add your credentials:\n\n```bash\ndefaults.url=https://sentry.mydomain.se/\ndefaults.org=sentry\ndefaults.project=my-sentry-project\nauth.token=my-auth-token\n```\n\nThese files can be automatically generated by running the Sentry Wizard:\n\n```bash\nnpx @sentry/wizard -i reactNative -p ios android -u https://sentry.mydomain.se/\n```\n\nFor CI it is recommended to generate a Internal Integration Token instead of using a user-token for `auth.token`. An Internal Integration can be created from your Sentry\ndashboard under `Settings` -\u003e `Developer Settings`.\n\n# Roadmap\n\nSee the [project backlog](https://sharing.clickup.com/b/h/6-61205386-2/41a54423aaa97af) for a complete list of upcoming features, known issues and releases.\n\n# Contributing\n\nAny contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/helsingborg-stad/app-mitt-helsingborg.svg?style=flat-square\n[contributors-url]: https://github.com/helsingborg-stad/app-mitt-helsingborg/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/helsingborg-stad/app-mitt-helsingborg.svg?style=flat-square\n[forks-url]: https://github.com/helsingborg-stad/app-mitt-helsingborg/network/members\n[stars-shield]: https://img.shields.io/github/stars/helsingborg-stad/app-mitt-helsingborg.svg?style=flat-square\n[stars-url]: https://github.com/helsingborg-stad/app-mitt-helsingborg/stargazers\n[issues-shield]: https://img.shields.io/github/issues/helsingborg-stad/app-mitt-helsingborg.svg?style=flat-square\n[issues-url]: https://github.com/helsingborg-stad/app-mitt-helsingborg/issues\n[license-shield]: https://img.shields.io/github/license/helsingborg-stad/app-mitt-helsingborg.svg?style=flat-square\n[license-url]: https://raw.githubusercontent.com/helsingborg-stad/app-mitt-helsingborg/master/LICENSE\n[product-screenshot]: hbg-github-banner.jpg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelsingborg-stad%2Fapp-mitt-helsingborg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelsingborg-stad%2Fapp-mitt-helsingborg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelsingborg-stad%2Fapp-mitt-helsingborg/lists"}