Admin interface for managing DreamFactory instance.
DreamFactory is a secure, self-hosted enterprise data access platform that provides governed API access to any data source, connecting enterprise applications and on-prem LLMs with role-based access and identity passthrough.
- Node.js >=16.14.0
- Angular CLI
npm install
husky is used to run git hooks for formatting and linting checking code prior to commiting code. To install husky run the following command:
npm run prepare
npm start
Proxying to DreamFactory instance is configured in proxy.conf.json.
npm run lint
npm run lint:fix
npm run prettier
jest is used for unit testing. Tests are named with the following convention: [name].spec.ts
npm run test
npm run test:watch
npm run test:coverage
npm run build
dist/ is tracked in git because DreamFactory installs this repository as a composer package and serves dist/ as it is. Nothing builds at install time.
On develop, CI is the only writer of dist/. After every push to develop, the Build dist workflow builds the app with Node 22, checks the output with scripts/verify-dist.sh, and commits dist/ as github-actions[bot] if it changed. The bot commit lands a few minutes after the merge. Pull develop again after it lands.
Rules for contributors:
- Do not commit
dist/. Do not push "rebuild dist" commits. The Guard dist check fails on a pull request that changesdist/. - Do not put
[skip ci]in a commit that goes todevelop. It stops the build, anddist/falls behind the source.
A local npm run build writes into the tracked dist/ directory and renames most files in it. To undo that:
git restore --staged --worktree -- dist
git clean -fdq dist
To build without touching the tracked directory, send the output somewhere else:
npx ng build --output-path /tmp/df-admin-dist
scripts/verify-dist.sh /tmp/df-admin-dist
If your branch already has commits that change dist/, drop those changes:
git fetch origin
git restore --source="origin/develop...HEAD" --staged --worktree -- dist
git commit -m "chore: drop dist changes"
If merging develop into your branch conflicts in dist/, take the copy from develop and finish the merge:
git rm -rfq dist
git checkout origin/develop -- dist
git commit
When more than one language is supported, the language selector will be displayed in the top right corner of the application.
-
User language will be detected from preference provided by browser. If browser preference is a supported language it will be selected by default.
-
If language selector is enabled and user change language manually, their preference is stored in
localStoragefor future reference. If language preference is found inlocalStorage, than it is treated as default language. -
To add a new language, follow these steps:
- Add a new entry to the
SUPPORTED_LANGUAGESarray in src/app/shared/constants/languages.ts.- code: The language code. This is used to identify the language in the application.
- altCode: Alternative language code that might be provided by browser. eg en-US, en-CA.
- Create new translation files in src/assets/i18n and every sub-folder.
- Ensure label for languages are created in alternative language in src/assets/i18n/en.json
"languages": { "en": "English" }
- These are used to display language label in dropdown.
- Ensure label for languages are created in alternative language in src/assets/i18n/en.json
- Add a new entry to the