{"id":20118494,"url":"https://github.com/flowfuse/dev-env","last_synced_at":"2025-05-06T14:31:33.370Z","repository":{"id":44052510,"uuid":"506182267","full_name":"FlowFuse/dev-env","owner":"FlowFuse","description":"FlowForge development environment tooling","archived":false,"fork":false,"pushed_at":"2025-03-14T17:07:52.000Z","size":110,"stargazers_count":5,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T13:46:14.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlowFuse.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":"2022-06-22T09:32:40.000Z","updated_at":"2025-03-14T17:07:54.000Z","dependencies_parsed_at":"2025-03-14T18:22:36.829Z","dependency_job_id":"fc662a7c-5766-40b5-86cc-b95c2aadfeda","html_url":"https://github.com/FlowFuse/dev-env","commit_stats":null,"previous_names":["flowfuse/flowforge-dev-env","flowfuse/dev-env"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fdev-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fdev-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fdev-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fdev-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlowFuse","download_url":"https://codeload.github.com/FlowFuse/dev-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252703352,"owners_count":21790874,"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-11-13T19:11:14.233Z","updated_at":"2025-05-06T14:31:33.356Z","avatar_url":"https://github.com/FlowFuse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlowFuse Development Environment\n\nThis repository provides a quick and easy way to setup a local FlowFuse development\nenvironment.\n\n## Getting Started\n\n1. Clone this repository\n\n2. Install npm though a [Node version manager](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) (e.g. NVM, Volta) or with a [custom global install directory](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory).\n\n3. In the root of this repository run:\n\n       npm install\n       npm run init\n      \n   This will install the immediate dependencies of the development environment,\n   clone all of the required repositories under the `packages` directory, link the packages to one another, then install\n   all of the dependencies of those repositories. It will then run `npm run build`\n   on any of the repositories that require it.\n\nYou can now start developing the code normally in the directories under `packages`.\n\n```\ndev-env\n├── LICENSE\n├── README.md\n├── lib\n├── package.json\n└── packages\n    ├── flowfuse\n    │   └── ... \n    ├── driver-localfs\n    │   └── ...\n    .... and all the other repos\n```\n\n### Running FlowFuse\n\nAfter running `npm run init`, you will be able to start FlowFuse with its default\nconfiguration by running:\n\n    cd packages/flowfuse\n    npm run start\n\nTo run in development mode, where it automatically rebuilds the frontend and restarts\nthe application when changes are made, run:\n\n    cd packages/flowfuse\n    npm run serve\n\nMore details on how to develop FlowFuse itself are provided in the [main docs](https://flowfuse.com/docs/contribute/introduction/).\n\n### Changing a repos dependencies\n\n\n**Do not run `npm install` in one of the repository directories under `packages`.**\n\nIf you do, you'll need to delete the `node_modules` directory that gets created.\n\nIf you need to modify a repository's dependencies:\n\n1. Edit its `package.json` to add the dependencies in the normal way\n2. Run `npm install` in the root of *this* repository.\n\n\n## Commands\n\n### `npm run init`\n\nSetup the development environment. You can run this repeatedly - such as when\na new repository has been added that you need to add to your environment\n\n### `npm run status`\n\nGet the current status of each repository, including what branch they have checked out\nand whether there are unstaged (`*`) and staged (`+`) changes.\n\nFor example:\n\n```\nPackage git status\n + flowfuse (main *+)\n ...\n```\n\n### `npm run checkout`\n\nFor each repository on the `main` branch, pull the latest code.\n\n### `npm run git \u003ccmd\u003e`\n\nRun any git command on each repostory. For example, to ensure all repositories\nare on the main branch:\n\n```\nnpm run git checkout main\n```\n\n## Why is this needed?\n\nThe FlowFuse platform consists of a number of npm modules. Each module is maintained\nin its own git repository. When developing the code and you need to make changes\nacross multiple modules, you want to be sure the your development code is loaded.\n\nWe used to achieve that by running a script that modified the package.json of which\nmodule to point to a relative location. That left the package.json file modified\nand would get in the way when committing and merging changes.\n\nThankfully, npm workspaces solves that particular problem. Whilst it is more\noften used in monorepos, this repo provides the setup required to get them working\nwith our multiple repositories.\n\n\n## Other terminal tips\n\nYou can run any command in all repos using either of the following methods:\n\n1. `npm exec`\n\n    ```\n    npm exec --ws -- /usr/bin/git checkout main\n    ```\n\n    However the command will require a full path and you cannot use shell built-ins.\n\n2. `find ...`\n\n    ```\n    find packages -name .git -type d -exec git checkout main\n    ```\n\n\n## Auxiliary services\n\n### PostgreSQL\n\nBy default FlowFuse uses SQLite for development. Given production systems do not\ntend to use SQLite but PostgreSQL (PG) it's advised to run PG for development too.\nAs prerequisite, one should install PG on their own system.\n\nTo use PG as development database ensure `packages/flowfuse/etc/flowforge.local.yml`\nhas `postgres` set as database type. The host must be set to an **absolute** path\nto the root `FlowFuse/dev-env` repository with `data` appended. For example:\n\n```yaml\ndb:\n  logging: false\n  type: postgres\n  host: /path/to/flowfuse-dev-env/data\n  port: 54321\n```\n\nThan run `npm run init` to setup your database.\n\nStart the server by running `postgres -s -D ./data/pg -k $(pwd)/data -p 54321`\nfrom the root directory, and keep the terminal window open. Just once you'll\nneed to run `createdb -h $(pwd)/data -p 54321 flowforge`.\n\n### Verdaccio\n\nTo enable the Team Node Repository, you need a running verdaccio instance configured\nwith the authentication plugin for FlowFuse.\n\nTo enable, you will need to edit your `packages/flowfuse/etc/flowforge.local.yml` to include:\n\n```yaml\nnpmRegistry:\n  enabled: true\n  url: http://localhost:4873\n  admin:\n    username: admin\n    password: secret\n```\n\nTo run verdaccio:\n\n```\ncd verdaccio\nnpm start\n```\n\nThe default configuration file for verdaccio expects the forge app to be running on `http://127.0.0.1:3000`\nIf that is not the case, edit `verdaccio/config/config.yaml` with the correct url. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowfuse%2Fdev-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowfuse%2Fdev-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowfuse%2Fdev-env/lists"}