{"id":40808019,"url":"https://github.com/odch/flightbox","last_synced_at":"2026-05-31T20:00:54.951Z","repository":{"id":3194291,"uuid":"46412441","full_name":"odch/flightbox","owner":"odch","description":"Fluganmeldung \u0026 Startliste für BAZL Statistik","archived":false,"fork":false,"pushed_at":"2026-05-31T08:55:50.000Z","size":8260,"stargazers_count":4,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2026-05-31T10:13:01.945Z","etag":null,"topics":["aviation","firebase","react","redux","sagas","styled-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/odch.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":"2015-11-18T10:45:35.000Z","updated_at":"2026-05-31T08:55:52.000Z","dependencies_parsed_at":"2026-03-01T18:01:50.751Z","dependency_job_id":null,"html_url":"https://github.com/odch/flightbox","commit_stats":null,"previous_names":[],"tags_count":108,"template":false,"template_full_name":null,"purl":"pkg:github/odch/flightbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odch%2Fflightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odch%2Fflightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odch%2Fflightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odch%2Fflightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odch","download_url":"https://codeload.github.com/odch/flightbox/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odch%2Fflightbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33746513,"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-05-31T02:00:06.040Z","response_time":95,"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":["aviation","firebase","react","redux","sagas","styled-components"],"created_at":"2026-01-21T21:11:06.439Z","updated_at":"2026-05-31T20:00:54.945Z","avatar_url":"https://github.com/odch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# open digital Flightbox\n\n[![GitHub release](https://img.shields.io/github/release/odch/flightbox.svg)](https://www.github.com/odch/flightbox/releases/)\n\n### Getting Started\n\n#### Required Node Versions\n\nNode Version for building the app: 22\n\nNode Version for deploying to Firebase and for the cloud functions: 22\n\n#### Start locally\n\n```\n$ npm install\n$ npm start [--project={PROJECT_NAME}]\n```\n\nThen open [http://0.0.0.0:8080/webpack-dev-server/](http://0.0.0.0:8080/webpack-dev-server/) in your browser.\n\n#### Parameters\n\n* `project` (optional): Name of the project. There must a configuration file called `{PROJECT_NAME}.json` be available\n                        in the `projects` directory. The default project is `lszt`.\n\n### How to Test\n\n```\n$ npm test\n```\n\n### How to Deploy\n\n#### Install the required node modules\n\n```\n$ npm install\n```\n#### Build\n\n##### Parameters\n\n* `project` (optional): Name of the project. There must a configuration file called `{PROJECT_NAME}.json` be available\n                        in the `projects` directory. The default project is `lszt`.\n\n##### Development or test environment\n\n```\n$ npm run build [--project={PROJECT_NAME}]\n```\n\n##### Production environment\n\n```\n$ npm run build:prod [--project={PROJECT_NAME}]\n```\n\n#### Push to Firebase\n\nNode version for this step: 22\n\nPrerequisites: Firebase Tools must be installed (`npm install -g firebase-tools@13`).\n\n**Caution:** Ensure that you have selected the right Firebase project (list all projects by typing `firebase list` and change it if necessary (with `firebase use`)).\n\n##### Set up env\n\n##### Database\n\n###### Flightbox\n\n**Code**:\n\nIn project conf JSON file, set the following properties:\n\n- `environments.(test|production).firebaseDatabaseName`\n- `environments.(test|production).firebaseDatabaseUrl`\n\n**Functions**:\n\nSet the realtime database name for the cloud functions:\n\n```\nfirebase functions:config:set rtdb.instance={RTDB NAME}\n```\n\n(e.g. `firebase functions:config:set rtdb.instance=lszt-test`)\n\n\nIf the database is not in the default location and the database URL is not `{instance}.firebaseio.com`, you also have\nto set the database URL additionally:\n\n```\nfirebase functions:config:set rtdb.url={RTDB URL}\n```\n\n(e.g. `firebase functions:config:set rtdb.url=https://lszt-test-eu.europe-west1.firebasedatabase.app`)\n\n###### Flightbox-Stripe repository\n\nIn the https://github.com/odch/flightbox-stripe repository, set the following Github-Workflow environment variables:\n\n- `FIREBASE_RTDB_NAME`\n- `FIREBASE_RTDB_URL`\n\n##### Deploy app\n\nBefore executing this command, make sure the correct project was built using the Node version\nmentioned at the beginning of this document.\n\n```\n$ firebase target:apply database main {RTDB NAME}\n$ firebase deploy --only hosting,database:main\n```\n\n(e.g. `lszt-test` for `{RTDB NAME}`)\n\n##### Deploy cloud functions\n\nUse the following commands to deploy the cloud functions.\n\nBefore executing these commands, make sure you selected the correct Node version for the cloud\nfunctions, which is mentioned at the beginning of this document.\n\n```\n$ cd functions \u0026\u0026 npm ci \u0026\u0026 cd ..\n$ firebase deploy --only functions\n```\n\n## Cloud functions\n\n### `auth`\n\nCan be called to create a custom authentication token. Has to be called via **`POST`**.\n\nThere are two authentication modes implemented: `ip` and `flightnet`.\n\n#### Mode *ip*\n\nReturns a token if the request comes from one of the allowed IP addresses. The allowed addresses can be configured\nvia the configuration property `auth.ips`. The following example sets the IP addresses `109.205.200.60` and\n`77.59.197.122` as allowed IP addresses.\n\n```\n$ firebase functions:config:set auth.ips=\"109.205.200.60,77.59.197.122\" \n```\n\nRequest example:\n```\n$ curl \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"mode\": \"ip\"}' \\\n    https://europe-west1-\u003cPROJECT_ID\u003e.cloudfunctions.net/auth\n```\n\n#### Mode *flightnet*\n\nReturns a token if the given credentials are valid Flightnet credentials. You have to send the flightnet company,\nthe username and the password in the request body.\n\nRequest example:\n\n```\n$ curl \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"mode\": \"flightnet\", \"company\": \"\u003cFLIGHTNET_COMPANY\u003e\", \"username\": \"\u003cFLIGHTNET_USERNAME\u003e\", \"password\": \"\u003cFLIGHTNET_PASSWORD\u003e\"}' \\\n    https://europe-west1-\u003cPROJECT_ID\u003e.cloudfunctions.net/auth\n```\n\n##### Test credentials #####\n\nFor testing purposes, test credentials can be set for this mode. If test credentials are set, authentication will\n**never** be delegated to the Flightnet authentication service.\n\nSet the test credentials in the function config:\n```\n$ firebase functions:config:set auth.testcredentials.username=\"foo\"\n$ firebase functions:config:set auth.testcredentials.password=\"bar\"\n```\n\nRequest example (`company` not needed in request body):\n```\ncurl \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"mode\": \"flightnet\", \"username\": \"foo\", \"password\": \"bar\"}' \\\n    https://europe-west1-\u003cPROJECT_ID\u003e.cloudfunctions.net/auth\n```\n\n### API\n\nURL: `https://europe-west1-\u003cPROJECT_ID\u003e.cloudfunctions.net/api`\n\n#### Aerodrome status ####\n\nReturns the current aerodrome status.\n\n`GET /api/aerodrome/status`\n\nReturns (example):\n```\n{\n  status: \"closed\",\n  last_update_by: \"Hans Meier\",\n  last_update_date: \"2020-04-12T22:29:01.565Z\",\n  message: \"Flugplatz geschlossen. Kinderspielplatz und Restaurant geschlossen.\"\n}\n```\n\nIf no status is set, `{}` is returned.\n\n#### Import users ####\n\n##### Request #####\n\nPOST an array of users to this endpoint to sync the users list.\n\nNew users are added, existing ones are updated, and those which are saved in the database, but not present in the given\nusers array are removed from the database.\n\nExample payload:\n```\nPOST /api/users/import\n\n{\n  \"users\": [\n    {\n      \"memberNr\": \"48434\",\n      \"firstname\": \"John\",\n      \"lastname\": \"Doe\",\n      \"phone\": \"+41791234567\",\n      \"email\": \"john.doe@example.com\"\n    },\n    {\n      \"memberNr\": \"30443\",\n      \"firstname\": \"Jane\",\n      \"lastname\": \"Smith\",\n      \"phone\": \"+41791234568\",\n      \"email\": \"jane.smith@example.com\"\n    },\n    ...\n  ]\n}\n```\n\n##### Auth #####\n\nThis endpoint requires a Basic Auth header (username and password to use set in the function config:\n`api.serviceuser.username` and `api.serviceuser.password`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodch%2Fflightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodch%2Fflightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodch%2Fflightbox/lists"}