{"id":30811779,"url":"https://github.com/aphp/formbuilder","last_synced_at":"2025-09-06T06:49:47.537Z","repository":{"id":311002695,"uuid":"913732584","full_name":"aphp/formbuilder","owner":"aphp","description":"The AP-HP FormBuilder allows building (creating and editing) forms in FHIR - R4 format (Questionnaire). It is based on the NLM FormBuilder, an open-source project developed by the Lister Hill National Center for Biomedical Communication (LHNCBC).","archived":false,"fork":false,"pushed_at":"2025-09-04T08:05:27.000Z","size":1322,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-04T10:25:35.127Z","etag":null,"topics":["fhir"],"latest_commit_sha":null,"homepage":"https://aphp.github.io/formbuilder/","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/aphp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2025-01-08T08:50:46.000Z","updated_at":"2025-09-04T08:05:31.000Z","dependencies_parsed_at":"2025-08-21T15:52:00.953Z","dependency_job_id":null,"html_url":"https://github.com/aphp/formbuilder","commit_stats":null,"previous_names":["aphp/formbuilder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aphp/formbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphp%2Fformbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphp%2Fformbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphp%2Fformbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphp%2Fformbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aphp","download_url":"https://codeload.github.com/aphp/formbuilder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphp%2Fformbuilder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273868140,"owners_count":25182423,"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-09-06T02:00:13.247Z","response_time":2576,"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":["fhir"],"created_at":"2025-09-06T06:49:45.717Z","updated_at":"2025-09-06T06:49:47.518Z","avatar_url":"https://github.com/aphp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🛠 Installation\n\n### Quick Start (For Non-Technical Users)\n\n#### Clone the Git repository\n\nClone the aphp-formbuilder repository to your local machine:\n\n```\n      git clone https://github.com/aphp/formbuilder.git\n```\n\n#### Set the Backend FHIR Server\n\nTo configure your backend FHIR server, edit the hapiServerUrl parameter in the file [environment.ts](src/environments/environment.ts).\n\nBy default, it is set to the public HAPI FHIR server: https://hapi.fhir.org/baseR4\n\n#### 🚀 Running the application\n\n##### With docker\n\n+ Prerequisites:\n\n  - Ensure you have Docker installed on your system. You can download Docker from https://www.docker.com/get-started.\n\n  - Make sure the required ports are not in use by other applications.\n\n+ Steps:\n\n1. Build the Docker image:\n```bash\n      docker build -t formbuilder .\n```\n2. Run the Docker container:\n```bash\n      docker run -p 8080:8080 formbuilder\n```\n3. Access the application:\n- Open your web browser and navigate to http://localhost:8080 (or replace with the correct port if changed) to access the application.\n\n##### Start formbuilder server locally (Alternative way to run the application)\n\nFor local development, run the server as follows:\n\n+ Prerequisites:\n  - Install Node.js (if not already installed) from [nodejs.org] (https://nodejs.org/fr).\n  - Install the Angular CLI globally (if not already installed)\n    ```bash\n        npm install -g @angular/cli@17.3.9\n    ```\n\n+ Steps:\n\n1. Install project dependencies:\n\n```bash\n    npm install\n```\n\n2. Remove the existing ./src/lib/lforms directory:\n\nfor Linux:\n\n```bash\n      rm -rf ./src/lib/lforms \n```\n\nfor Windows:\n\n```bash\n      Remove-Item -Path \"src\\lib\\lforms\" -Recurse -Force\n```\n\n3. Run the copy script:\n\n```bash\nnode ./bin/copy-lforms.js\n```\n\n4. Serve the application locally:\n\n```bash\nng serve --port 9032 --configuration development\n```\n5. Access the application:\n- Open your web browser and navigate to http://localhost:9032 to access the application.\n### Advanced Configuration \u0026 Tips (For Developers \u0026 Technical Users)\n\n#### Build the package for production\n\nBuild the production package and copy it to your web server's document location:\n\n+ Prerequisites:\n  - Install **nodejs** package globally on your system.\n\n```\n      npm run build\n      cp dist/aphp-formbuilder {webserver docs location}\n```\n\n#### About copy-lforms.js\n\nThe script [copy-lforms.js](bin/copy-lforms.js) is responsible for copying build files for LForms from the LForms website: https://lhcforms-static.nlm.nih.gov/lforms-versions.\n\nTo update the LForms library, you need to modify the  **lformsVersion**  variable in [version.json](src/assets/version.json) and execute the following command: `node ./bin/copy-lforms.js`\nThis will download the files locally.\n\n#### Customizing with ngx-item.schema.json\n\nThe file [ngx-item.schema.json](src/assets/ngx-item.schema.json) allows you to add new fields to the FormBuilder.\nThis schema defines the structure of form data that can be customized or extended according to the application's requirements.\n\n#### Activating Keycloak for SSO\n\nTo activate Keycloak and use Single Sign-On (SSO), simply enter the appropriate configuration in the environment file:\n\n```yaml\nkeycloakConfig: {\n  url: 'XXXX',\n  realm: 'XXXX',\n  clientId: 'XXXX',\n}\n```\n\nIf the environment file does not contain this configuration (keycloakConfig), the SSO will not be used, and the user will not be authenticated.\n\n#### Loading Configuration at Runtime\n\nAn external configuration is used in Kubernetes via a ConfigMap.\n\nIn the Deployment file, the ConfigMap is mounted to a specific directory, for example:\n\n```yaml\nvolumes:\n  - name: env-consts-config\n    configMap:\n      name: formbuilder-dev\n\nvolumeMounts:\n  - name: env-consts-config\n    mountPath: \"/usr/share/nginx/html/config/config.json\"\n    subPath: config.json\n    readOnly: true\n```\n\nThe configuration will be dynamically loaded at runtime using an environment loader approach. This is done by the [environmentLoader.ts](src/environments/environmentLoader.ts) which reads the config.json.\n\nThis file is mounted into the container from the Kubernetes ConfigMap at the path ./config/config.json during [the application startup](src/main.ts)\n\nThis strategy enables maintaining a single Docker image for multiple environments while adapting the application's behavior based on the environment parameters.\n\n## 📜 License\n\nThis project is licensed under the [LICENSE](LICENSE.md) .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphp%2Fformbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faphp%2Fformbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphp%2Fformbuilder/lists"}