├── .nvmrc ├── .husky ├── pre-commit └── commit-msg ├── apps ├── chat │ ├── src │ │ ├── ui │ │ │ ├── icons │ │ │ │ ├── index.ts │ │ │ │ └── svg │ │ │ │ │ └── index.ts │ │ │ ├── components │ │ │ │ ├── tabs │ │ │ │ │ └── index.ts │ │ │ │ ├── notifications │ │ │ │ │ ├── index.ts │ │ │ │ │ └── save │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── use-save-success-notification.ts │ │ │ │ ├── tooltip │ │ │ │ │ └── index.ts │ │ │ │ ├── pagination │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── get-total-pages.ts │ │ │ │ │ ├── toolbar │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── avatar │ │ │ │ │ └── index.ts │ │ │ │ ├── alert │ │ │ │ │ └── index.ts │ │ │ │ ├── section-tabs │ │ │ │ │ └── index.ts │ │ │ │ ├── predefined │ │ │ │ │ ├── badges │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── tabs │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── modals │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── delete-confirm-modal │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── archive-confirm-modal │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── unarchive-confirm-modal │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── buttons │ │ │ │ │ │ ├── archive-button.tsx │ │ │ │ │ │ ├── delete-button.tsx │ │ │ │ │ │ └── update-button.tsx │ │ │ │ ├── side-layout │ │ │ │ │ ├── index.ts │ │ │ │ │ └── side-nav.tsx │ │ │ │ ├── balloon │ │ │ │ │ └── index.ts │ │ │ │ ├── ellipsis-dropdown │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ └── index.ts │ │ │ │ ├── list │ │ │ │ │ ├── index.ts │ │ │ │ │ └── no-items-placeholder.tsx │ │ │ │ ├── table │ │ │ │ │ └── index.ts │ │ │ │ ├── selectable-badges │ │ │ │ │ └── index.ts │ │ │ │ ├── modal │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── modal-body.tsx │ │ │ │ │ ├── modal-title.tsx │ │ │ │ │ └── modal-header.tsx │ │ │ │ ├── card │ │ │ │ │ ├── card-content.tsx │ │ │ │ │ ├── card-big-actions.tsx │ │ │ │ │ ├── card-actions.tsx │ │ │ │ │ └── index.ts │ │ │ │ └── controls │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── input.tsx │ │ │ │ │ └── textarea.tsx │ │ │ ├── routing │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── i18n │ │ │ ├── dto │ │ │ │ └── index.ts │ │ │ ├── packs │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── layouts │ │ │ ├── footer │ │ │ │ └── index.ts │ │ │ ├── sidebar │ │ │ │ ├── logged-in │ │ │ │ │ └── index.ts │ │ │ │ ├── links │ │ │ │ │ └── index.ts │ │ │ │ ├── section │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── use-sidebar-toggled-storage.tsx │ │ │ ├── parts │ │ │ │ └── index.ts │ │ │ ├── navigation │ │ │ │ ├── index.ts │ │ │ │ ├── links │ │ │ │ │ └── index.ts │ │ │ │ └── navigation-toolbar-portal.tsx │ │ │ ├── index.ts │ │ │ └── centered-page.layout.tsx │ │ ├── modules │ │ │ ├── experts │ │ │ │ ├── index.ts │ │ │ │ └── grid │ │ │ │ │ └── index.ts │ │ │ ├── ai-models │ │ │ │ ├── index.ts │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ └── table │ │ │ │ │ └── index.ts │ │ │ ├── apps │ │ │ │ ├── chat │ │ │ │ │ └── index.ts │ │ │ │ ├── promoted-apps │ │ │ │ │ └── index.ts │ │ │ │ ├── choose-app │ │ │ │ │ └── index.ts │ │ │ │ ├── sidebar │ │ │ │ │ └── index.ts │ │ │ │ ├── grid │ │ │ │ │ ├── index.ts │ │ │ │ │ └── apps-placeholder.tsx │ │ │ │ └── index.ts │ │ │ ├── pinned-messages │ │ │ │ ├── index.ts │ │ │ │ └── grid │ │ │ │ │ ├── index.ts │ │ │ │ │ └── pinned-messages-placeholder.tsx │ │ │ ├── users-me │ │ │ │ └── index.ts │ │ │ ├── favorites │ │ │ │ └── index.ts │ │ │ ├── search-bar │ │ │ │ ├── results │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── entry │ │ │ │ │ └── index.ts │ │ │ ├── chats │ │ │ │ ├── history │ │ │ │ │ └── index.ts │ │ │ │ ├── conversation │ │ │ │ │ ├── config-panel │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── messages │ │ │ │ │ │ ├── content │ │ │ │ │ │ │ ├── widgets │ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── hydrate │ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── buttons │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── actions │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── files │ │ │ │ │ │ ├── attach-file │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── list │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── use-chat-file-drop.ts │ │ │ │ │ │ └── select-chat-file.tsx │ │ │ │ │ ├── input-toolbar │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── hooks │ │ │ │ │ │ └── use-scroll-flickering-indicator.tsx │ │ │ │ ├── content-badges │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── websearch │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── embeddings │ │ │ │ │ │ └── index.ts │ │ │ │ ├── start-chat │ │ │ │ │ └── index.ts │ │ │ │ ├── sidebar │ │ │ │ │ └── index.ts │ │ │ │ ├── grid │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── organizations-my │ │ │ │ └── index.ts │ │ │ ├── apps-creator │ │ │ │ ├── shared │ │ │ │ │ └── index.ts │ │ │ │ ├── creator │ │ │ │ │ └── index.ts │ │ │ │ ├── update │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── google-drive │ │ │ │ └── index.ts │ │ │ ├── permissions │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ ├── list │ │ │ │ │ └── index.ts │ │ │ │ ├── status │ │ │ │ │ └── index.ts │ │ │ │ ├── share-resource │ │ │ │ │ ├── list │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── parts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── autocomplete │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── parts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── card │ │ │ │ │ ├── index.ts │ │ │ │ │ └── shared-with │ │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── projects │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ ├── sidebar │ │ │ │ │ └── index.ts │ │ │ │ ├── files │ │ │ │ │ ├── index.ts │ │ │ │ │ └── project-files-placeholder.tsx │ │ │ │ ├── grid │ │ │ │ │ ├── index.ts │ │ │ │ │ └── projects-placeholder.tsx │ │ │ │ └── index.ts │ │ │ ├── s3-buckets │ │ │ │ ├── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ └── table │ │ │ │ │ └── index.ts │ │ │ ├── ai-external-apis │ │ │ │ ├── chat │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── grid │ │ │ │ │ ├── index.ts │ │ │ │ │ └── ai-external-apis-placeholder.tsx │ │ │ ├── users-groups │ │ │ │ ├── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ └── table │ │ │ │ │ └── index.ts │ │ │ ├── apps-categories │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── sidebar │ │ │ │ │ ├── items │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── table │ │ │ │ │ └── index.ts │ │ │ │ └── modal │ │ │ │ │ └── index.ts │ │ │ ├── search-engines │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── table │ │ │ │ │ └── index.ts │ │ │ ├── organizations │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── shared │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── update │ │ │ │ │ │ └── index.ts │ │ │ │ ├── table │ │ │ │ │ └── index.ts │ │ │ │ ├── controls │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── ai-external-api-creator │ │ │ │ ├── shared │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── update │ │ │ │ │ └── index.ts │ │ │ │ ├── schema │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── endpoints │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── parameters │ │ │ │ │ │ └── index.ts │ │ │ │ └── creator │ │ │ │ │ └── index.ts │ │ │ ├── users │ │ │ │ ├── table │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── create │ │ │ │ │ │ ├── fields │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── update │ │ │ │ │ │ ├── fields │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ └── shared │ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── choose-users │ │ │ │ │ └── index.ts │ │ │ ├── workspace │ │ │ │ └── index.ts │ │ │ └── shared │ │ │ │ ├── index.ts │ │ │ │ └── fake-lazy-dynamic-icons.tsx │ │ ├── routes │ │ │ ├── ai-external-apis │ │ │ │ ├── schema │ │ │ │ │ └── ai-schema-editor.tsx │ │ │ │ ├── create │ │ │ │ │ └── index.ts │ │ │ │ ├── update │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── chat │ │ │ │ └── index.ts │ │ │ ├── home │ │ │ │ └── index.ts │ │ │ ├── chats │ │ │ │ └── index.ts │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ ├── parts │ │ │ │ │ └── index.ts │ │ │ │ └── steps │ │ │ │ │ └── index.ts │ │ │ ├── experts │ │ │ │ └── index.ts │ │ │ ├── project │ │ │ │ └── index.ts │ │ │ ├── projects │ │ │ │ └── index.ts │ │ │ ├── shared │ │ │ │ └── index.ts │ │ │ ├── apps │ │ │ │ ├── create │ │ │ │ │ └── index.ts │ │ │ │ ├── update │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── management │ │ │ │ ├── layout │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── management.route.tsx │ │ │ │ └── pages │ │ │ │ │ └── index.ts │ │ │ ├── settings │ │ │ │ ├── layout │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── pages │ │ │ │ │ └── index.ts │ │ │ │ └── settings.route.tsx │ │ │ ├── pinned-messages │ │ │ │ └── index.ts │ │ │ ├── choose-organization │ │ │ │ └── index.ts │ │ │ └── use-check-replaceable-link-path.ts │ │ ├── commercial.stub │ │ │ ├── shared │ │ │ │ ├── index.ts │ │ │ │ └── commercial-component-stub.tsx │ │ │ ├── agents-library │ │ │ │ ├── index.ts │ │ │ │ └── agents-library-container.tsx │ │ │ ├── license-utils.ts │ │ │ ├── commercial-providers.tsx │ │ │ └── index.ts │ │ ├── hooks │ │ │ └── index.ts │ │ └── config │ │ │ ├── index.ts │ │ │ └── config.dto.ts │ ├── eslint.config.mjs │ ├── public │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ └── site.webmanifest │ ├── .env.example │ ├── postcss.config.cjs │ └── tsconfig.json └── backend │ ├── src │ ├── modules │ │ ├── boot │ │ │ └── index.ts │ │ ├── config │ │ │ ├── index.ts │ │ │ └── helpers │ │ │ │ └── index.ts │ │ ├── cron │ │ │ ├── helpers │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── cron.error.ts │ │ ├── logger │ │ │ └── index.ts │ │ ├── api │ │ │ ├── index.ts │ │ │ ├── controllers │ │ │ │ ├── shared │ │ │ │ │ ├── index.ts │ │ │ │ │ └── base.controller.ts │ │ │ │ ├── index.ts │ │ │ │ └── health-check.controller.ts │ │ │ ├── middlewares │ │ │ │ └── index.ts │ │ │ ├── http-server.config.ts │ │ │ └── helpers │ │ │ │ └── respond-with-tagged-error.ts │ │ ├── projects-embeddings │ │ │ ├── helpers │ │ │ │ ├── index.ts │ │ │ │ └── format-vector.ts │ │ │ ├── generators │ │ │ │ ├── base │ │ │ │ │ ├── index.ts │ │ │ │ │ └── ai-embedding-generator.error.ts │ │ │ │ └── helpers │ │ │ │ │ └── index.ts │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── prompts │ │ │ ├── ai-external-apps │ │ │ │ ├── create-ai-external-api-endpoints-restrictions.ts │ │ │ │ └── index.ts │ │ │ ├── context │ │ │ │ ├── index.ts │ │ │ │ ├── personas │ │ │ │ │ └── index.ts │ │ │ │ └── features │ │ │ │ │ └── index.ts │ │ │ ├── system │ │ │ │ └── index.ts │ │ │ ├── embeddings │ │ │ │ ├── index.ts │ │ │ │ └── utils │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ ├── websearch │ │ │ │ └── index.ts │ │ │ ├── message │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── search-engines │ │ │ ├── clients │ │ │ │ └── index.ts │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── ai-connector │ │ │ ├── index.ts │ │ │ └── clients │ │ │ │ └── index.ts │ │ ├── s3 │ │ │ ├── repo │ │ │ │ ├── index.ts │ │ │ │ └── s3-resources.repo.ts │ │ │ └── index.ts │ │ ├── apps │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── auth │ │ │ ├── helpers │ │ │ │ └── index.ts │ │ │ ├── services │ │ │ │ └── index.ts │ │ │ ├── tokens │ │ │ │ ├── index.ts │ │ │ │ ├── generate-refresh-token.ts │ │ │ │ └── encode-token.ts │ │ │ ├── firewall │ │ │ │ └── index.ts │ │ │ ├── repo │ │ │ │ ├── index.ts │ │ │ │ ├── auth-emails.repo.ts │ │ │ │ └── auth-reset-passwords.repo.ts │ │ │ ├── index.ts │ │ │ └── auth.config.ts │ │ ├── chats │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── database │ │ │ ├── connection │ │ │ │ ├── index.ts │ │ │ │ └── is-silent-db-log.ts │ │ │ ├── types │ │ │ │ ├── table-with-archive-protection-column.type.ts │ │ │ │ ├── table-with-id-column.type.ts │ │ │ │ ├── ai-generated-columns.type.ts │ │ │ │ ├── table-with-uuid-column.type.ts │ │ │ │ ├── table-with-default-columns.type.ts │ │ │ │ ├── table-with-archive-at-column.type.ts │ │ │ │ └── table-with-id-name-column.type.ts │ │ │ ├── migrate │ │ │ │ ├── index.ts │ │ │ │ ├── database-migrate.config.ts │ │ │ │ └── database-migrate.error.ts │ │ │ ├── helpers │ │ │ │ └── index.ts │ │ │ ├── errors │ │ │ │ ├── index.ts │ │ │ │ ├── database-record-not-exists.error.ts │ │ │ │ └── database-record-already-exists.error.ts │ │ │ ├── transaction │ │ │ │ └── index.ts │ │ │ ├── queries │ │ │ │ └── query-basic-factory-attrs.type.ts │ │ │ └── index.ts │ │ ├── share-resource │ │ │ └── index.ts │ │ ├── users-groups │ │ │ ├── repo │ │ │ │ └── index.ts │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── users │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── users.config.ts │ │ ├── users-ai-settings │ │ │ └── index.ts │ │ ├── ai-models │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── messages │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── organizations │ │ │ ├── users │ │ │ │ ├── index.ts │ │ │ │ └── organizations-users.tables.ts │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ ├── s3-buckets │ │ │ │ ├── elasticsearch │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── projects │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── elasticsearch │ │ │ ├── boot │ │ │ │ └── index.ts │ │ │ ├── mappings │ │ │ │ ├── archived.mapping.ts │ │ │ │ ├── index.ts │ │ │ │ └── dated-record.mapping.ts │ │ │ ├── repo │ │ │ │ └── index.ts │ │ │ ├── helpers │ │ │ │ ├── index.ts │ │ │ │ └── create-magic-null-id-es-value.ts │ │ │ ├── index.ts │ │ │ └── search │ │ │ │ └── index.ts │ │ ├── projects-files │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── ai-external-apis │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── pinned-messages │ │ │ ├── elasticsearch │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── apps-categories │ │ │ ├── index.ts │ │ │ └── elasticsearch │ │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── organizations-ai-settings │ │ │ └── index.ts │ │ ├── users-favorites │ │ │ └── index.ts │ │ ├── permissions │ │ │ ├── index.ts │ │ │ └── record-protection │ │ │ │ ├── permissions-row-protection.tables.ts │ │ │ │ ├── permissions-row-protection-filters.types.ts │ │ │ │ └── index.ts │ │ ├── chats-summaries │ │ │ ├── chats-summaries.config.ts │ │ │ ├── index.ts │ │ │ └── chats-summaries.errors.ts │ │ └── projects-summaries │ │ │ ├── projects-summaries.config.ts │ │ │ ├── index.ts │ │ │ └── projects-summaries.errors.ts │ ├── commercial.stub │ │ ├── database.ts │ │ ├── migrations.ts │ │ ├── index.ts │ │ ├── modules │ │ │ ├── index.ts │ │ │ ├── apps-commercial.controller.ts │ │ │ └── agents-library-api.controller.ts │ │ └── license-utils.ts │ ├── helpers │ │ ├── index.ts │ │ └── gen-random-token.ts │ ├── index.ts │ └── migrations │ │ └── utils │ │ └── index.ts │ ├── eslint.config.mjs │ ├── .env.example │ └── tsconfig.json ├── config └── plugins │ ├── index.ts │ └── vite-node-externals.ts ├── packages ├── commons │ ├── src │ │ ├── helpers │ │ │ ├── zod │ │ │ │ ├── index.ts │ │ │ │ └── fallback.ts │ │ │ ├── date │ │ │ │ └── index.ts │ │ │ ├── observable │ │ │ │ └── index.ts │ │ │ ├── is-ssr.ts │ │ │ ├── invert.ts │ │ │ ├── urls │ │ │ │ ├── drop-hash.ts │ │ │ │ ├── is-absolute-url.ts │ │ │ │ ├── is-data-url.ts │ │ │ │ ├── is-pdf-file-url.ts │ │ │ │ ├── is-markdown-file-url.ts │ │ │ │ ├── is-word-file-url.ts │ │ │ │ ├── drop-first-slash.ts │ │ │ │ ├── is-presentation-file-url.ts │ │ │ │ ├── is-spreadsheet-file-url.ts │ │ │ │ ├── is-document-file-url.ts │ │ │ │ ├── is-image-file-url.ts │ │ │ │ ├── has-url-protocol.ts │ │ │ │ ├── drop-search-params.ts │ │ │ │ ├── drop-last-slash.ts │ │ │ │ ├── are-paths-equal.ts │ │ │ │ ├── with-hash.ts │ │ │ │ └── parameterize-path.ts │ │ │ ├── uniq.ts │ │ │ ├── cache │ │ │ │ ├── index.ts │ │ │ │ └── once.ts │ │ │ ├── is-nil.ts │ │ │ ├── mimetypes │ │ │ │ ├── is-csv-mimetype.ts │ │ │ │ ├── is-pdf-mimetype.ts │ │ │ │ ├── is-legacy-word-mimetype.ts │ │ │ │ ├── is-legacy-excel-mimetype.ts │ │ │ │ ├── index.ts │ │ │ │ └── is-image-mimetype.ts │ │ │ ├── without.ts │ │ │ ├── is-dangerous-object-key.ts │ │ │ ├── try-parse-json.ts │ │ │ ├── gen-random-between-inclusive.ts │ │ │ ├── safe-to-array.ts │ │ │ ├── pluck-ids.ts │ │ │ ├── to-void-task-either.ts │ │ │ ├── truncate-text.ts │ │ │ ├── tree │ │ │ │ └── index.ts │ │ │ ├── iterators │ │ │ │ ├── async-iterator-to-void-promise.ts │ │ │ │ ├── map-async-iterator.ts │ │ │ │ ├── create-async-stream-iterator.ts │ │ │ │ ├── flat-map-async-iterator.ts │ │ │ │ └── tap-async-iterator.ts │ │ │ ├── is-object-with-fake-id.ts │ │ │ ├── find-item-index-by-id.ts │ │ │ ├── reject-by-id.ts │ │ │ ├── run-task.ts │ │ │ ├── clamp.ts │ │ │ ├── decode-html-entities.ts │ │ │ ├── reject-falsy-items.ts │ │ │ ├── timeout.ts │ │ │ ├── panic-error.ts │ │ │ ├── tap-option.ts │ │ │ ├── delay-task-either.ts │ │ │ ├── get-first-obj-key-value.ts │ │ │ ├── tap-task-option.ts │ │ │ ├── is-object-with-id.ts │ │ │ ├── time.ts │ │ │ └── pluck.ts │ │ ├── regex │ │ │ └── index.ts │ │ ├── types │ │ │ ├── can-be-array.type.ts │ │ │ ├── date-or-string.ts │ │ │ ├── relaxed-id.type.ts │ │ │ ├── nullable.type.ts │ │ │ ├── can-be-promise.type.ts │ │ │ ├── record-index-key.type.ts │ │ │ ├── overwrite.type.ts │ │ │ ├── size.type.ts │ │ │ ├── partial-by.type.ts │ │ │ ├── key-of-type.type.ts │ │ │ ├── required-by.type.ts │ │ │ ├── is-digit.type.ts │ │ │ ├── required-only-by.type.ts │ │ │ ├── object-with-id.type.ts │ │ │ ├── replace-fn-return-type.type.ts │ │ │ ├── prefix-object-keys.type.ts │ │ │ ├── record-of-type.type.ts │ │ │ ├── distributive-overwrite.type.ts │ │ │ └── unparsed-env-object.type.ts │ │ ├── errors │ │ │ ├── index.ts │ │ │ └── validation.error.ts │ │ ├── dto │ │ │ ├── index.ts │ │ │ ├── app-env.dto.ts │ │ │ └── non-empty-or-null-string.dto.ts │ │ └── index.ts │ ├── eslint.config.mjs │ ├── CHANGELOG.md │ └── tsconfig.json ├── sdk │ ├── src │ │ ├── modules │ │ │ ├── dashboard │ │ │ │ ├── s3-files │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── apps │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── is-sdk-app-creator-app.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── sdk-app-from-chat.dto.ts │ │ │ │ │ │ ├── sdk-search-installed-apps-metadata.dto.ts │ │ │ │ │ │ ├── sdk-installed-app-metadata.dto.ts │ │ │ │ │ │ └── index.ts │ │ │ │ ├── experts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── messages │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── get-sdk-app-mention-in-chat.ts │ │ │ │ │ │ └── get-last-used-sdk-messages-ai-model.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── sdk-attach-app.dto.ts │ │ │ │ │ │ ├── sdk-request-ai-reply.dto.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── sdk-message-file.dto.ts │ │ │ │ ├── ai-models │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── credentials │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── openai-credentials.dto.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── chats │ │ │ │ │ ├── helpers │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── favorites │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── sdk-search-all-favorites.dto.ts │ │ │ │ ├── projects │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── organizations │ │ │ │ │ ├── guards │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── is-sdk-record-with-organization.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── ai-settings │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── sdk-upsert-organization-ai-settings.dto.ts │ │ │ │ │ │ └── sdk-organization-ai-settings.dto.ts │ │ │ │ │ │ └── index.ts │ │ │ │ ├── s3-buckets │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── users-groups │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── projects-files │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── sdk-upload-project-file.dto.ts │ │ │ │ ├── search-engines │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── sdk-search-engine-credentials.dto.ts │ │ │ │ │ │ └── index.ts │ │ │ │ ├── share-resource │ │ │ │ │ ├── dto │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── ai-external-apis │ │ │ │ │ └── index.ts │ │ │ │ ├── apps-categories │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── pinned-messages │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── sdk-pin-message.dto.ts │ │ │ │ │ │ └── sdk-pin-message-list-item.dto.ts │ │ │ │ ├── projects-embeddings │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ │ └── index.ts │ │ │ │ ├── permissions │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── helpers │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── guards │ │ │ │ │ │ ├── is-sdk-public-permissions.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── is-sdk-record-with-creator.ts │ │ │ │ │ └── dto │ │ │ │ │ │ ├── sdk-permission-level.dto.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── sdk-upsert-table-row-with-permissions.dto.ts │ │ │ │ └── users │ │ │ │ │ ├── index.ts │ │ │ │ │ └── dto │ │ │ │ │ ├── ai-settings │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── sdk-user-ai-settings.dto.ts │ │ │ │ │ └── sdk-upsert-user-ai-settings.dto.ts │ │ │ │ │ ├── auth │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── sdk-user-list-item.dto.ts │ │ │ ├── auth │ │ │ │ ├── storage │ │ │ │ │ └── index.ts │ │ │ │ ├── firewall │ │ │ │ │ └── index.ts │ │ │ │ ├── helpers │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── of-unsafe-token.ts │ │ │ │ │ └── should-refresh-token.ts │ │ │ │ ├── dto │ │ │ │ │ ├── sdk-email-login.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── sdk-jwt-tokens-pair.dto.ts │ │ │ │ ├── index.ts │ │ │ │ └── errors │ │ │ │ │ ├── sdk-invalid-jwt-token.error.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── sdk-invalid-jwt-refresh-token.error.ts │ │ │ │ │ ├── sdk-incorrect-username.error.ts │ │ │ │ │ └── sdk-incorrect-username-or-password.error.ts │ │ │ └── index.ts │ │ ├── react-integration │ │ │ ├── me │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── use-sdk-subscribe-me-or-throw.ts │ │ │ │ └── index.ts │ │ │ ├── hooks │ │ │ │ └── index.ts │ │ │ ├── favorites │ │ │ │ ├── index.ts │ │ │ │ └── hooks │ │ │ │ │ └── index.ts │ │ │ ├── installed-apps │ │ │ │ ├── index.ts │ │ │ │ └── hooks │ │ │ │ │ └── index.ts │ │ │ ├── pinned-messages │ │ │ │ ├── index.ts │ │ │ │ └── hooks │ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── shared │ │ │ ├── fetch │ │ │ │ └── index.ts │ │ │ ├── response │ │ │ │ ├── sdk-success-response.dto.ts │ │ │ │ ├── index.ts │ │ │ │ ├── sdk-response.dto.ts │ │ │ │ └── sdk-error-response.dto.ts │ │ │ ├── dto │ │ │ │ ├── sdk-timestamp.dto.ts │ │ │ │ ├── sdk-table-row-id.dto.ts │ │ │ │ ├── sdk-counted-record.dto.ts │ │ │ │ ├── sdk-table-row-with-id.dto.ts │ │ │ │ ├── sdk-table-row-with-uuid.dto.ts │ │ │ │ ├── sdk-success.dto.ts │ │ │ │ ├── sdk-table-row-with-archive-protection.dto.ts │ │ │ │ ├── sdk-table-row-with-id-name.dto.ts │ │ │ │ ├── sdk-table-row-with-uuid-name.dto.ts │ │ │ │ ├── sdk-counted-id-record.dto.ts │ │ │ │ ├── sdk-ids-array.dto.ts │ │ │ │ ├── sdk-translated-string.dto.ts │ │ │ │ ├── sdk-uuids-array.dto.ts │ │ │ │ ├── sdk-table-row-with-archived.dto.ts │ │ │ │ └── sdk-strict-json.dto.ts │ │ │ ├── errors │ │ │ │ ├── sdk-request.error.ts │ │ │ │ ├── sdk-server.error.ts │ │ │ │ ├── sdk-record-not-found.error.ts │ │ │ │ ├── sdk-endpoint-not-found.error.ts │ │ │ │ ├── sdk-payload-validation.error.ts │ │ │ │ ├── sdk-record-already-exists.error.ts │ │ │ │ ├── sdk-invalid-file-format.error.ts │ │ │ │ ├── sdk-invalid-request.error.ts │ │ │ │ └── is-sdk-tagged-error.ts │ │ │ ├── index.ts │ │ │ ├── sdk-credentials-mask.dto.ts │ │ │ └── sdk.ts │ │ └── index.ts │ ├── eslint.config.mjs │ └── tsconfig.json └── commons-front │ ├── eslint.config.mjs │ ├── src │ ├── index.ts │ ├── hooks │ │ ├── observable │ │ │ └── index.ts │ │ ├── use-modal │ │ │ └── index.ts │ │ ├── form │ │ │ └── index.ts │ │ ├── use-after-mount.ts │ │ ├── use-force-rerender.ts │ │ ├── use-is-mounted.ts │ │ ├── use-context-or-throw.ts │ │ ├── use-focus-after-mount.ts │ │ ├── use-vanilla-history.ts │ │ └── use-last-non-null-value.ts │ └── helpers │ │ └── index.ts │ └── tsconfig.json ├── screens └── agents.png ├── .vscode └── settings.json ├── .github └── dependabot.yml ├── dockerfiles ├── postgres.dockerfile └── app-dev.dockerfile ├── tsconfig.eslint.json ├── .changeset └── config.json └── .commitlintrc.ts /.nvmrc: -------------------------------------------------------------------------------- 1 | 22 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx --no-install lint-staged 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './svg'; 2 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npx --no-install commitlint --edit "$1" 2 | -------------------------------------------------------------------------------- /apps/chat/src/i18n/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './i18n-lang.dto'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/footer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './footer'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/experts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './grid'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/ai-external-apis/schema/ai-schema-editor.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/chat/src/routes/chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/home/index.ts: -------------------------------------------------------------------------------- 1 | export * from './home.route'; 2 | -------------------------------------------------------------------------------- /config/plugins/index.ts: -------------------------------------------------------------------------------- 1 | export * from './vite-node-externals'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controls'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/chats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from './login.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tabs'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/zod/index.ts: -------------------------------------------------------------------------------- 1 | export * from './fallback'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/regex/index.ts: -------------------------------------------------------------------------------- 1 | export * from './email.regex'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/boot/index.ts: -------------------------------------------------------------------------------- 1 | export * from './boot.service'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/config/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config.service'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/cron/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cron$'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './logger.service'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-chat-badge'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/pinned-messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './grid'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-me/index.ts: -------------------------------------------------------------------------------- 1 | export * from './update-me-form'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/experts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './experts.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/project/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/projects/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './route-meta-tags'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/notifications/index.ts: -------------------------------------------------------------------------------- 1 | export * from './save'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tooltip'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/date/index.ts: -------------------------------------------------------------------------------- 1 | export * from './format-date'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http-server.service'; 2 | -------------------------------------------------------------------------------- /apps/chat/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '../../eslint.config.mjs'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/apps/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-app.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/apps/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './update-app.route'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/s3-files/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | -------------------------------------------------------------------------------- /apps/backend/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '../../eslint.config.mjs'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/favorites/index.ts: -------------------------------------------------------------------------------- 1 | export * from './favorite-star-button'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-bar/results/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-results'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/management/layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './management.layout'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/settings/layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './settings.layout'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/routing/index.ts: -------------------------------------------------------------------------------- 1 | export * from './define-sitemap-route-generator'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/can-be-array.type.ts: -------------------------------------------------------------------------------- 1 | export type CanBeArray = T | T[]; 2 | -------------------------------------------------------------------------------- /packages/sdk/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '../../eslint.config.mjs'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/storage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tokens-storage'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/database.ts: -------------------------------------------------------------------------------- 1 | export type CommercialDatabase = unknown; 2 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/migrations.ts: -------------------------------------------------------------------------------- 1 | export const COMMERCIAL_MIGRATIONS = {}; 2 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/sidebar/logged-in/index.ts: -------------------------------------------------------------------------------- 1 | export * from './logged-in-user-item'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats-history-section'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations-my/index.ts: -------------------------------------------------------------------------------- 1 | export * from './my-organization-form'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/pinned-messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pinned-messages.route'; 2 | -------------------------------------------------------------------------------- /packages/commons/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '../../eslint.config.mjs'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/date-or-string.ts: -------------------------------------------------------------------------------- 1 | export type DateOrString = string | Date; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/relaxed-id.type.ts: -------------------------------------------------------------------------------- 1 | export type RelaxedId = string | number; 2 | -------------------------------------------------------------------------------- /screens/agents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/screens/agents.png -------------------------------------------------------------------------------- /apps/backend/src/modules/api/controllers/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base.controller'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './format-vector'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/ai-external-apps/create-ai-external-api-endpoints-restrictions.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/context/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-context-prompt'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './commercial-component-stub'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-models-search-select'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-creator/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/promoted-apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './promoted-apps-container'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/google-drive/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-google-drive-file-picker'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './access-level-select'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permission-avatars-list'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/status/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permissions-status-icon'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-search-select'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './form'; 2 | export * from './table'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/choose-organization/index.ts: -------------------------------------------------------------------------------- 1 | export * from './choose-organization.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/pagination/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-total-pages'; 2 | -------------------------------------------------------------------------------- /packages/commons-front/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '../../eslint.config.mjs'; 2 | -------------------------------------------------------------------------------- /packages/commons-front/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './helpers'; 2 | export * from './hooks'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/observable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-store-subscriber'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/nullable.type.ts: -------------------------------------------------------------------------------- 1 | export type Nullable = T | null | undefined; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/firewall/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-access-level-guard'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/search-engines/clients/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-search-engine-proxy'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/agents-library/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agents-library-container'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-apis/chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './external-ai-api-chat-badge'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-model-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/config-panel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-config-panel'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-history-sidebar-section'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/index.ts: -------------------------------------------------------------------------------- 1 | export * from './form'; 2 | export * from './table'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/is-ssr.ts: -------------------------------------------------------------------------------- 1 | export const isSSR = () => typeof window === 'undefined'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/can-be-promise.type.ts: -------------------------------------------------------------------------------- 1 | export type CanBePromise = T | Promise; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './is-sdk-app-creator-app'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/system/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-attach-app-system-message'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories-search-select'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './s3-bucket-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engines-search-select'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/ai-external-apis/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-ai-external-api.route'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/ai-external-apis/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './update-ai-external-api.route'; 2 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/observable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-non-rerender-store-subscribe'; 2 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/invert.ts: -------------------------------------------------------------------------------- 1 | export function invert(flag: boolean) { 2 | return !flag; 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/s3-files/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-base-s3-resource.dto'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/me/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-sdk-subscribe-me-or-throw'; 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/embeddings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-relevant-embeddings-ai-tag'; 2 | -------------------------------------------------------------------------------- /apps/chat/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/favicon.ico -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/license-utils.ts: -------------------------------------------------------------------------------- 1 | export function isPremiumEnabled() { 2 | return false; 3 | } 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-category-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/content/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-code-block'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organization-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/share-resource/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './resource-permissions-list'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './update'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engine-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './avatar'; 2 | export * from './colorized-avatar'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tagged-error'; 2 | export * from './validation.error'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/drop-hash.ts: -------------------------------------------------------------------------------- 1 | export const dropHash = (url: string) => url.split('#')[0]; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/record-index-key.type.ts: -------------------------------------------------------------------------------- 1 | export type RecordIndexKey = string | number | symbol; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/experts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './experts.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './helpers'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/controllers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './root.controller'; 2 | export * from './shared'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/content-badges/index.ts: -------------------------------------------------------------------------------- 1 | export * from './embeddings'; 2 | export * from './websearch'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/experts/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './expert-card'; 2 | export * from './experts-grid'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-bar'; 2 | export * from './search-bar-input'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/alert/index.ts: -------------------------------------------------------------------------------- 1 | export * from './alert-box'; 2 | export * from './form-alert-boxes'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/types/overwrite.type.ts: -------------------------------------------------------------------------------- 1 | export type Overwrite = Pick> & U; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/size.type.ts: -------------------------------------------------------------------------------- 1 | export type Size = { 2 | width: number; 3 | height: number; 4 | }; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/ai-models/dto/credentials/index.ts: -------------------------------------------------------------------------------- 1 | export * from './openai-credentials.dto'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/ai-models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-models.sdk'; 2 | export * from './dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/chats/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-sdk-permissions-access-level'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/favorites/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './favorites.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './projects.sdk'; 3 | -------------------------------------------------------------------------------- /apps/chat/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/favicon-16x16.png -------------------------------------------------------------------------------- /apps/chat/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/favicon-32x32.png -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-api-shared-form-fields'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/share-resource/autocomplete/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-users-groups-input'; 2 | -------------------------------------------------------------------------------- /apps/chat/src/routes/login/parts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './continue-with-divider'; 2 | export * from './login-terms'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './icons'; 3 | export * from './routing'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/organizations/guards/index.ts: -------------------------------------------------------------------------------- 1 | export * from './is-sdk-record-with-organization'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/s3-buckets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './s3-buckets.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users-groups/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './users-groups.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/fetch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-payload'; 2 | export * from './perform-api-request'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './gen-random-token'; 2 | export * from './try-decode-mimetype-extension'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/config/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config.dto'; 2 | export * from './try-read-env-or-panic'; 3 | -------------------------------------------------------------------------------- /apps/chat/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/chat/src/layouts/sidebar/links/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sidebar-links'; 2 | export * from './sidebar-links-skeleton'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-table-container'; 2 | export * from './users-table-row'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/login/steps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './login-using-email'; 2 | export * from './login-using-password'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/section-tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './section-tab-button'; 2 | export * from './section-tabs'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects-files/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './projects-files.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/search-engines/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './search-engines.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/share-resource/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-search-share-resource-users-groups.dto'; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/share-resource/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './share-resource.dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/response/sdk-success-response.dto.ts: -------------------------------------------------------------------------------- 1 | export type SdkSuccessResponseT = { 2 | data: D; 3 | }; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-connector/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-connector.errors'; 2 | export * from './ai-connector.service'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/middlewares/index.ts: -------------------------------------------------------------------------------- 1 | export * from './jwt.middleware'; 2 | export * from './not-found.middleware'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/s3/repo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './s3-resources-buckets.repo'; 2 | export * from './s3-resources.repo'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-predefined-form-validators'; 2 | export * from './use-sdk-error-translator'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-creator/creator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-create-form'; 2 | export * from './use-app-create-form'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-creator/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-update-form'; 2 | export * from './use-app-update-form'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/choose-app/index.ts: -------------------------------------------------------------------------------- 1 | export * from './choose-app-modal'; 2 | export * from './use-choose-app-modal'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './shared'; 3 | export * from './update'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './choose-users'; 2 | export * from './form'; 3 | export * from './table'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/badges/index.ts: -------------------------------------------------------------------------------- 1 | export * from './archived-badge'; 2 | export * from './boolean-badge'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/uniq.ts: -------------------------------------------------------------------------------- 1 | export function uniq(array: I[]): I[] { 2 | return Array.from(new Set(array)); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/types/partial-by.type.ts: -------------------------------------------------------------------------------- 1 | export type PartialBy = Omit & Partial>; 2 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/ai-external-apis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-apis.sdk'; 2 | export * from './dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps-categories/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories.sdk'; 2 | export * from './dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/pinned-messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './pinned-messages.sdk'; 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.css": "tailwindcss", 4 | "*.scss": "tailwindcss" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/apps/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-es-index.repo'; 2 | export * from './apps-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './try-compare-passwords'; 2 | export * from './try-encrypt-password'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-jwt.service'; 2 | export * from './auth-password-login.service'; 3 | -------------------------------------------------------------------------------- /apps/chat/.env.example: -------------------------------------------------------------------------------- 1 | PUBLIC_VITE_APP_ENV=dev 2 | PUBLIC_VITE_API_URL=http://localhost:3000 3 | PUBLIC_VITE_GOOGLE_DRIVE_CLIENT_ID= 4 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/sidebar/section/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sidebar-section'; 2 | export * from './use-sidebar-sections-storage'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-model-table-container'; 2 | export * from './ai-model-table-row'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controls'; 2 | export * from './form'; 3 | export * from './sidebar'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-creator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './creator'; 2 | export * from './shared'; 3 | export * from './update'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/files/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-file-card'; 2 | export * from './project-files-list-container'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-bar/entry/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-bar-group-entry'; 2 | export * from './search-bar-item-entry'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controls'; 2 | export * from './form'; 3 | export * from './table'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/choose-users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './choose-users-modal'; 2 | export * from './use-choose-users-modal'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './layout'; 2 | export * from './pages'; 3 | export * from './settings.route'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-absolute-url.ts: -------------------------------------------------------------------------------- 1 | export const isAbsoluteUrl = (url: string): boolean => /^https?:\/\//.test(url); 2 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-data-url.ts: -------------------------------------------------------------------------------- 1 | export function isDataUrl(url: string) { 2 | return url.startsWith('data:'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps.sdk'; 2 | export * from './dto'; 3 | export * from './helpers'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects-embeddings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './projects-embeddings.sdk'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-sdk'; 2 | export * from './use-sdk-browser-tokens-storage'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps.repo'; 2 | export * from './apps.service'; 3 | export * from './apps.tables'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/chats/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats-es-index.repo'; 2 | export * from './chats-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/connection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database-connection.repo'; 2 | export * from './is-silent-db-log'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/share-resource/index.ts: -------------------------------------------------------------------------------- 1 | export * from './share-resource.firewall'; 2 | export * from './share-resource.service'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users-groups/repo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-groups-users.repo'; 2 | export * from './users-groups.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-es-index.repo'; 2 | export * from './users-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/chat/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/chat/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DashHub-ai/DashHub/HEAD/apps/chat/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/chat/src/i18n/packs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './i18n-lang-en'; 2 | export * from './i18n-lang-pl'; 3 | export * from './i18n-packs'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/content/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-message-content'; 2 | export * from './hydrate'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './s3-bucket-table-container'; 2 | export * from './s3-bucket-table-row'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/management/index.ts: -------------------------------------------------------------------------------- 1 | export * from './layout'; 2 | export * from './management.route'; 3 | export * from './pages'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/routes/settings/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './me-settings.route'; 2 | export * from './my-organization-settings.route'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './archive-filter-tabs'; 2 | export * from './favorite-filter-tabs'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/chats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats.sdk'; 2 | export * from './dto'; 3 | export * from './helpers'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './guards'; 3 | export * from './helpers'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database'; 2 | export * from './license-utils'; 3 | export * from './migrations'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users-ai-settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-ai-settings.repo'; 2 | export * from './users-ai-settings.tables'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/config/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config-context'; 2 | export * from './config.dto'; 3 | export * from './try-read-env-or-panic'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './creator'; 2 | export * from './shared'; 3 | export * from './update'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/sidebar/items/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-category-button'; 2 | export * from './app-category-item'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-history-sidebar-section'; 2 | export * from './favorite-apps-sidebar-section'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/content-badges/websearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './websearch-chat-badge'; 2 | export * from './websearch-preview'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-groups-table-container'; 2 | export * from './users-groups-table-row'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/types/key-of-type.type.ts: -------------------------------------------------------------------------------- 1 | export type KeyOfType = { 2 | [P in keyof T]: T[P] extends U ? P : never; 3 | }[keyof T]; 4 | -------------------------------------------------------------------------------- /packages/commons/src/types/required-by.type.ts: -------------------------------------------------------------------------------- 1 | export type RequiredBy = 2 | & Omit 3 | & Required>; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './users-me.sdk'; 3 | export * from './users.sdk'; 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agents-library-api.controller'; 2 | export * from './apps-commercial.controller'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-models/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-models-es-index.repo'; 2 | export * from './ai-models-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/messages/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './messages-es-index.repo'; 2 | export * from './messages-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-users.repo'; 2 | export * from './organizations-users.tables'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-es-index.repo'; 2 | export * from './projects-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-card'; 2 | export * from './apps-container'; 3 | export * from './apps-placeholder'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/files/attach-file/index.ts: -------------------------------------------------------------------------------- 1 | export * from './attach-file-button'; 2 | export * from './attach-file-dropdown'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-table-container'; 2 | export * from './organizations-table-row'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engine-table-row'; 2 | export * from './search-engines-table-container'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/routes/ai-external-apis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-apis.route'; 2 | export * from './create'; 3 | export * from './update'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/pagination/toolbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pagination-search-toolbar-item'; 2 | export * from './pagination-toolbar'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/side-layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './side-layout'; 2 | export * from './side-nav'; 3 | export * from './side-nav-item'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/cache/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cache-async-task'; 2 | export * from './once'; 3 | export * from './wrap-with-cache'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-pdf-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isPDFFileUrl(url: string): boolean { 2 | return url.endsWith('.pdf'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/me/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | export * from './sdk-me-context'; 3 | export * from './sdk-me-provider'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/boot/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch-auto-reindex.job'; 2 | export * from './elasticsearch-registry.boot'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects.repo'; 2 | export * from './projects.service'; 3 | export * from './projects.tables'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './i18n-context'; 3 | export * from './i18n-provider'; 4 | export * from './packs'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/parts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './layout-breadcrumbs'; 2 | export * from './layout-header'; 3 | export * from './page-form-section'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-apis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat'; 2 | export * from './grid'; 3 | export * from './use-cached-external-api-lookup'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories-table-container'; 2 | export * from './apps-categories-table-row'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-search-select'; 2 | export * from './user-organization-role-select'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './group-users-select-table'; 2 | export * from './users-group-shared-form-fields'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/balloon/index.ts: -------------------------------------------------------------------------------- 1 | export * from './balloon-button'; 2 | export * from './balloon-content'; 3 | export * from './use-balloon'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/ellipsis-dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ellipsis-crud-dropdown-button'; 2 | export * from './ellipsis-dropdown-button'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './form-error-alert'; 2 | export * from './form-field'; 3 | export * from './form-spinner-cta'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/icons/svg/index.ts: -------------------------------------------------------------------------------- 1 | export * from './brand-logo.svg'; 2 | export * from './google-drive.svg'; 3 | export * from './select-expand.svg'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-markdown-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isMarkdownFileUrl(url: string): boolean { 2 | return /\.md$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/types/is-digit.type.ts: -------------------------------------------------------------------------------- 1 | export type IsDigit = T extends '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ? true : false; 2 | -------------------------------------------------------------------------------- /packages/commons/src/types/required-only-by.type.ts: -------------------------------------------------------------------------------- 1 | export type RequiredOnlyBy = 2 | & Partial 3 | & Required>; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/organizations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './guards'; 3 | export * from './organizations.sdk'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-models.repo'; 2 | export * from './ai-models.service'; 3 | export * from './ai-models.tables'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/websearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-websearch-function-tool'; 2 | export * from './create-websearch-results-prompt'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users-groups/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-groups-es-index.repo'; 2 | export * from './users-groups-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './manage-apps-categories-modal'; 2 | export * from './use-manage-apps-categories-modal'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/content-badges/embeddings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-embedding-chat-badge'; 2 | export * from './project-embedding-preview'; 3 | -------------------------------------------------------------------------------- /packages/commons/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-env.dto'; 2 | export * from './non-empty-or-null-string.dto'; 3 | export * from './strict-boolean.dto'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-word-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isWordFileUrl(url: string): boolean { 2 | return /\.(?:doc|docx)$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './drop-sdk-permissions-key'; 2 | export * from './find-sdk-permission-by-id'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-es-index.repo'; 2 | export * from './organizations-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/generators/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-embedding-generator'; 2 | export * from './ai-embedding-generator.error'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-files/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-files-es-index.repo'; 2 | export * from './projects-files-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/s3/index.ts: -------------------------------------------------------------------------------- 1 | export * from './repo'; 2 | export * from './s3.errors'; 3 | export * from './s3.service'; 4 | export * from './s3.tables'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/search-engines/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engines-es-index.repo'; 2 | export * from './search-engines-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-api-update-form'; 2 | export * from './use-ai-external-api-update-form'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-card'; 2 | export * from './projects-container'; 3 | export * from './projects-placeholder'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/routes/apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-tutorial'; 2 | export * from './apps.route'; 3 | export * from './create'; 4 | export * from './update'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './basic-records-list'; 2 | export * from './no-items-placeholder'; 3 | export * from './paginated-list'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './paginated-table'; 2 | export * from './table'; 3 | export * from './use-debounced-paginated-search'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/is-nil.ts: -------------------------------------------------------------------------------- 1 | export function isNil(val: unknown): val is undefined | null { 2 | return val === null || typeof val === 'undefined'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/drop-first-slash.ts: -------------------------------------------------------------------------------- 1 | export function dropFirstSlash(path: string) { 2 | return path.startsWith('/') ? path.slice(1) : path; 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/dto/ai-settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-upsert-user-ai-settings.dto'; 2 | export * from './sdk-user-ai-settings.dto'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-external-apis/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-apis-es-index.repo'; 2 | export * from './ai-external-apis-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/cron/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cron-job'; 2 | export * from './cron.error'; 3 | export * from './cron.service'; 4 | export * from './helpers'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/pinned-messages/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pinned-messages-es-index.repo'; 2 | export * from './pinned-messages-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/embeddings/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './embeddings-xml-tag'; 2 | export * from './group-embeddings'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/navigation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './navigation'; 2 | export * from './navigation-right-toolbar'; 3 | export * from './navigation-toolbar-portal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/schema/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-schema-creator'; 2 | export * from './endpoints'; 3 | export * from './parameters'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/buttons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './message-content-action-button'; 2 | export * from './toolbar-small-action-button'; 3 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/use-modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './modals-context-provider'; 2 | export * from './use-animated-modal'; 3 | export * from './use-modal'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/is-csv-mimetype.ts: -------------------------------------------------------------------------------- 1 | export function isCSVMimeType(mimeType: string): boolean { 2 | return /^text\/csv$/i.test(mimeType); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/types/object-with-id.type.ts: -------------------------------------------------------------------------------- 1 | export type ObjectWithId = { 2 | id?: any; 3 | }; 4 | 5 | export type ObjectWithStrictId = { 6 | id: any; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './modules'; 2 | export * from './react-integration'; 3 | export * from './sdk-translated-errors'; 4 | export * from './shared'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './of-unsafe-token'; 2 | export * from './should-refresh-token'; 3 | export * from './try-decode-token'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects-embeddings/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-project-embedding.dto'; 2 | export * from './sdk-search-project-embeddings.dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/favorites/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | export * from './sdk-favorites-context'; 3 | export * from './sdk-favorites-provider'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/tokens/index.ts: -------------------------------------------------------------------------------- 1 | export * from './encode-token'; 2 | export * from './generate-refresh-token'; 3 | export * from './try-verify-and-decode-token'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/helpers/format-vector.ts: -------------------------------------------------------------------------------- 1 | export function formatVector(vector: number[]): string { 2 | return `[${vector.join(',')}]`; 3 | } 4 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/navigation/links/index.ts: -------------------------------------------------------------------------------- 1 | export * from './navigation-item'; 2 | export * from './navigation-links'; 3 | export * from './stay-tuned-navigation-item'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/start-chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './start-chat-form'; 2 | export * from './start-chat-form.types'; 3 | export * from './use-start-chat-form'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/card/index.ts: -------------------------------------------------------------------------------- 1 | export * from './card-record-creator'; 2 | export * from './card-record-permissions-row'; 3 | export * from './shared-with'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/create/fields/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user-create-auth-methods-form-field'; 2 | export * from './user-organization-settings-form-field'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/update/fields/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user-organization-settings-form-field'; 2 | export * from './user-update-auth-methods-form-field'; 3 | -------------------------------------------------------------------------------- /dockerfiles/postgres.dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/pgvector/pgvector:pg17 2 | 3 | ENV TZ Europe/Warsaw 4 | 5 | RUN apt update && apt install postgis postgresql-17-postgis-3 -y 6 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/is-pdf-mimetype.ts: -------------------------------------------------------------------------------- 1 | export function isPDFMimeType(mimeType: string): boolean { 2 | return /^application\/pdf$/i.test(mimeType); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-presentation-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isPresentationFileUrl(url: string): boolean { 2 | return /\.(?:ppt|pptx)$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-spreadsheet-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isSpreadsheetFileUrl(url: string): boolean { 2 | return /\.(?:xls|xlsx|csv)$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './errors'; 3 | export * from './helpers'; 4 | export * from './regex'; 5 | export * from './types'; 6 | -------------------------------------------------------------------------------- /packages/commons/src/types/replace-fn-return-type.type.ts: -------------------------------------------------------------------------------- 1 | export type ReplaceFnReturnType any, R> = ( 2 | ...args: Parameters 3 | ) => R; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/response/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-error-response.dto'; 2 | export * from './sdk-response.dto'; 3 | export * from './sdk-success-response.dto'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/tokens/generate-refresh-token.ts: -------------------------------------------------------------------------------- 1 | import { genRandomToken } from '~/helpers'; 2 | 3 | export const generateRefreshToken = () => genRandomToken(24); 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-embeddings-es-index.repo'; 2 | export * from './projects-embeddings-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/ai-external-apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-ai-endpoint-function-definition'; 2 | export * from './create-ai-external-api-async-functions'; 3 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/commercial-providers.tsx: -------------------------------------------------------------------------------- 1 | import { CommercialComponentStub } from './shared'; 2 | 3 | export const CommercialProviders = CommercialComponentStub; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-user-create-form'; 2 | export * from './use-user-create-modal'; 3 | export * from './user-create-form-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-user-update-form'; 2 | export * from './use-user-update-modal'; 3 | export * from './user-update-form-modal'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-document-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isDocumentFileUrl(url: string): boolean { 2 | return /\.(?:doc|docx|pdf|txt|rtf)$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/is-image-file-url.ts: -------------------------------------------------------------------------------- 1 | export function isImageFileUrl(url: string): boolean { 2 | return /\.(?:jpeg|jpg|gif|png|svg|webp|bmp)$/i.test(url); 3 | } 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/apps-categories/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories.repo'; 2 | export * from './apps-categories.service'; 3 | export * from './apps-categories.tables'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/chats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats.firewall'; 2 | export * from './chats.repo'; 3 | export * from './chats.service'; 4 | export * from './chats.tables'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-archive-protection-column.type.ts: -------------------------------------------------------------------------------- 1 | export type TableWithArchiveProtectionColumn = { 2 | archive_protection: boolean | null; 3 | }; 4 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agents-library'; 2 | export * from './commercial-providers'; 3 | export * from './license-utils'; 4 | export * from './shared'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/files/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './file-card'; 2 | export * from './files-cards-controlled-list'; 3 | export * from './files-cards-list'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controls'; 2 | export * from './form'; 3 | export * from './organization-user-role-badge'; 4 | export * from './table'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controls'; 2 | export * from './files'; 3 | export * from './form'; 4 | export * from './grid'; 5 | export * from './sidebar'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/workspace/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-has-workspace-organization'; 2 | export * from './use-workspace-organization'; 3 | export * from './workspace-context'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/types/prefix-object-keys.type.ts: -------------------------------------------------------------------------------- 1 | export type PrefixObjectKeys

= { 2 | [K in keyof T as K extends string ? `${P}${K}` : never]: T[K]; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/installed-apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | export * from './sdk-installed-apps-context'; 3 | export * from './sdk-installed-apps-provider'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/migrate/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database-migrate.config'; 2 | export * from './database-migrate.error'; 3 | export * from './database-migrate.service'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/mappings/archived.mapping.ts: -------------------------------------------------------------------------------- 1 | export function createArchivedRecordMappings() { 2 | return { 3 | archived: { type: 'boolean' }, 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/generators/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './describe-embedding-type'; 2 | export * from './split-text'; 3 | export * from './wrap-embedding'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-auth-form-validator'; 2 | export * from './user-ai-settings-form-field'; 3 | export * from './user-shared-form-fields'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/modals/index.ts: -------------------------------------------------------------------------------- 1 | export * from './archive-confirm-modal'; 2 | export * from './delete-confirm-modal'; 3 | export * from './unarchive-confirm-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/selectable-badges/index.ts: -------------------------------------------------------------------------------- 1 | export * from './selectable-badge-item'; 2 | export * from './selectable-badges'; 3 | export * from './selectable-badges-skeleton'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/is-legacy-word-mimetype.ts: -------------------------------------------------------------------------------- 1 | export function isLegacyWordMimetype(mimetype: string): boolean { 2 | return mimetype === 'application/msword'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/without.ts: -------------------------------------------------------------------------------- 1 | export function without(excludeItems: O[]) { 2 | return (array: O[]): O[] => 3 | array.filter(item => !excludeItems.includes(item)); 4 | } 5 | -------------------------------------------------------------------------------- /packages/commons/src/types/record-of-type.type.ts: -------------------------------------------------------------------------------- 1 | import type { KeyOfType } from './key-of-type.type'; 2 | 3 | export type RecordOfType = { 4 | [K in KeyOfType]: T[K]; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/organizations/dto/ai-settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-organization-ai-settings.dto'; 2 | export * from './sdk-upsert-organization-ai-settings.dto'; 3 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './abstract-nested-sdk'; 2 | export * from './abstract-nested-sdk-with-auth'; 3 | export * from './auth'; 4 | export * from './dashboard'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/pinned-messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | export * from './sdk-pinned-messages-context'; 3 | export * from './sdk-pinned-messages-provider'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/controllers/shared/base.controller.ts: -------------------------------------------------------------------------------- 1 | import { Hono } from 'hono'; 2 | 3 | export abstract class BaseController { 4 | public readonly router = new Hono(); 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chain-database-promise-te'; 2 | export * from './tap-database-promise-te'; 3 | export * from './try-get-first-or-not-exists'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/s3-buckets/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-s3-buckets-es-index.repo'; 2 | export * from './organizations-s3-buckets-es-search.repo'; 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/message/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-ai-attached-files-tag'; 2 | export * from './create-ai-quote-tag'; 3 | export * from './wrap-user-prompt-with-ai-tags'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-apis/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-api-card'; 2 | export * from './ai-external-apis-container'; 3 | export * from './ai-external-apis-placeholder'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats-history-sidebar-section'; 2 | export * from './favorite-chats-sidebar-section'; 3 | export * from './new-chat-sidebar-button'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/card/shared-with/index.ts: -------------------------------------------------------------------------------- 1 | export * from './card-record-permissions'; 2 | export * from './card-record-public'; 3 | export * from './card-record-shared-with'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './card'; 2 | export * from './controls'; 3 | export * from './list'; 4 | export * from './share-resource'; 5 | export * from './status'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/pinned-messages/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pinned-message-card'; 2 | export * from './pinned-messages-container'; 3 | export * from './pinned-messages-placeholder'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-create-form-modal'; 2 | export * from './use-project-create-form'; 3 | export * from './use-project-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './project-update-form-modal'; 2 | export * from './use-project-update-form'; 3 | export * from './use-project-update-modal'; 4 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-email-form-validators'; 2 | export * from './use-numeric-form-validator'; 3 | export * from './use-required-form-validators'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/is-dangerous-object-key.ts: -------------------------------------------------------------------------------- 1 | export function isDangerousObjectKey(key: string): boolean { 2 | return ['__proto__', 'constructor', 'prototype'].includes(key); 3 | }; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/is-legacy-excel-mimetype.ts: -------------------------------------------------------------------------------- 1 | export function isLegacyExcelMimetype(mimetype: string): boolean { 2 | return mimetype === 'application/vnd.ms-excel'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/favorites/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-favorite.dto'; 2 | export * from './sdk-search-all-favorites.dto'; 3 | export * from './sdk-upsert-favorite.dto'; 4 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.astro", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.mjs", "**/*.cjs"], 4 | "exclude": ["node_modules/"] 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/firewall/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-firewall-service'; 2 | export * from './check-if-user-can-see-fetched-content-te'; 3 | export * from './try-task-either-if-user'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database-record-already-exists.error'; 2 | export * from './database-record-not-exists.error'; 3 | export * from './database.error'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/transaction/index.ts: -------------------------------------------------------------------------------- 1 | export * from './transaction.error'; 2 | export * from './try-reuse-or-create-transaction'; 3 | export * from './try-reuse-or-skip-transaction'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/repo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch-index.repo'; 2 | export * from './elasticsearch-indices-registry.repo'; 3 | export * from './elasticsearch.repo'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/agents-library/agents-library-container.tsx: -------------------------------------------------------------------------------- 1 | import { CommercialComponentStub } from '../shared'; 2 | 3 | export const AgentsLibraryContainer = CommercialComponentStub; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-model-create-form-modal'; 2 | export * from './use-ai-model-create-form'; 3 | export * from './use-ai-model-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-models/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-model-update-form-modal'; 2 | export * from './use-ai-model-update-form'; 3 | export * from './use-ai-model-update-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/files/index.ts: -------------------------------------------------------------------------------- 1 | export * from './attach-file'; 2 | export * from './list'; 3 | export * from './select-chat-file'; 4 | export * from './use-chat-file-drop'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/share-resource/list/parts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permission-group-item'; 2 | export * from './permission-owner-item'; 3 | export * from './permission-user-item'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './s3-bucket-create-form-modal'; 2 | export * from './use-s3-bucket-create-form'; 3 | export * from './use-s3-bucket-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/s3-buckets/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './s3-bucket-update-form-modal'; 2 | export * from './use-s3-bucket-update-form'; 3 | export * from './use-s3-bucket-update-modal'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/has-url-protocol.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Check if a URL has a protocol. 3 | */ 4 | export function hasUrlProtocol(url: string) { 5 | return /^\w+:\/\//.test(url); 6 | } 7 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-timestamp.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkTimestampV = z.coerce.date(); 4 | 5 | export type SdkTimestampT = z.infer; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-request.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkRequestError extends TaggedError.ofLiteral()('SdkRequestError') {} 4 | -------------------------------------------------------------------------------- /apps/backend/src/helpers/gen-random-token.ts: -------------------------------------------------------------------------------- 1 | import * as crypto from 'node:crypto'; 2 | 3 | export function genRandomToken(bytes: number) { 4 | return crypto.randomBytes(bytes).toString('hex'); 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/index.ts: -------------------------------------------------------------------------------- 1 | import 'reflect-metadata'; 2 | 3 | import { container } from 'tsyringe'; 4 | 5 | import { BootService } from '~/modules/boot'; 6 | 7 | container.resolve(BootService).boot(); 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/repo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-emails.repo'; 2 | export * from './auth-passwords.repo'; 3 | export * from './auth-reset-passwords.repo'; 4 | export * from './auth.repo'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/schema/endpoints/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-schema-endpoint'; 2 | export * from './ai-schema-endpoint-method'; 3 | export * from './ai-schema-endpoints'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-message-ai-actions'; 2 | export * from './chat-message-copy-action'; 3 | export * from './chat-message-pin-action'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/share-resource/autocomplete/parts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './autocomplete-group-item'; 2 | export * from './autocomplete-user-item'; 3 | export * from './choose-button'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './fake-lazy-dynamic-icons'; 2 | export * from './get-file-type-and-color'; 3 | export * from './ghost-placeholder'; 4 | export * from './lazy-icon'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/pagination/helpers/get-total-pages.ts: -------------------------------------------------------------------------------- 1 | export function getTotalPages(totalItems: number, pageSize: number) { 2 | return pageSize ? Math.ceil(totalItems / pageSize) : 0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/use-after-mount.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export function useAfterMount(callback: () => void | VoidFunction) { 4 | useEffect(callback, []); 5 | } 6 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/try-parse-json.ts: -------------------------------------------------------------------------------- 1 | import * as O from 'fp-ts/lib/Option'; 2 | 3 | export function tryParseJSON(data: string) { 4 | return O.tryCatch(() => JSON.parse(data) as T); 5 | } 6 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/drop-search-params.ts: -------------------------------------------------------------------------------- 1 | export const dropSearchParams = (url: string) => url.split('?')[0]; 2 | 3 | export const hasSearchParams = (href: string) => href.includes('?'); 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/zod/fallback.ts: -------------------------------------------------------------------------------- 1 | import { z, type ZodType } from 'zod'; 2 | 3 | export function fallback(value: T): ZodType { 4 | return z.any().transform(() => value); 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-id.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkTableRowIdV = z.coerce.number(); 4 | 5 | export type SdkTableRowIdT = z.infer; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-connector/clients/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-gemini-proxy'; 2 | export * from './ai-openai-proxy'; 3 | export * from './ai-proxy'; 4 | export * from './get-ai-proxy-for-model'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/connection/is-silent-db-log.ts: -------------------------------------------------------------------------------- 1 | import type { LogEvent } from 'kysely'; 2 | 3 | export function isSilentDbLog(event: LogEvent) { 4 | return event.level !== 'query'; 5 | } 6 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './centered-page.layout'; 2 | export * from './footer'; 3 | export * from './page-with-sidebar.layout'; 4 | export * from './parts'; 5 | export * from './sidebar'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories-sidebar'; 2 | export * from './apps-categories-sidebar-layout'; 3 | export * from './apps-categories-sidebar-loader'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-users-group-create-form'; 2 | export * from './use-users-group-create-modal'; 3 | export * from './users-group-create-form-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-users-group-update-form'; 2 | export * from './use-users-group-update-modal'; 3 | export * from './users-group-update-form-modal'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/gen-random-between-inclusive.ts: -------------------------------------------------------------------------------- 1 | export function genRandomBetweenInclusive(min: number, max: number): number { 2 | return Math.floor(Math.random() * (max - min + 1)) + min; 3 | } 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects-files/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-project-file.dto'; 2 | export * from './sdk-search-project-files.dto'; 3 | export * from './sdk-upload-project-file.dto'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './append-timestamp-to-index-name'; 2 | export * from './create-magic-null-id-es-value'; 3 | export * from './try-get-first-hit-or-not-exists'; 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './boot'; 3 | export * from './config'; 4 | export * from './database'; 5 | export * from './elasticsearch'; 6 | export * from './logger'; 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/context/personas/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-custom-persona-context-prompt'; 2 | export * from './create-default-persona-context-prompt'; 3 | export * from './persona-xml-tag'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-category-create-form-modal'; 2 | export * from './use-app-category-create-form'; 3 | export * from './use-app-category-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps-categories/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-category-update-form-modal'; 2 | export * from './use-app-category-update-form'; 3 | export * from './use-app-category-update-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/grid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-card'; 2 | export * from './chat-history-placeholder'; 3 | export * from './chats-container'; 4 | export * from './use-reload-interval-if-generating'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organization-create-form-modal'; 2 | export * from './use-organization-create-form'; 3 | export * from './use-organization-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/organizations/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organization-update-form-modal'; 2 | export * from './use-organization-update-form'; 3 | export * from './use-organization-update-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/form/create/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engine-create-form'; 2 | export * from './search-engine-create-form-modal'; 3 | export * from './use-search-engine-create-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/shared/fake-lazy-dynamic-icons.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * It used only for local development, as compilation `lucide-react` 3 | * produces 2k chunks in development mode. 4 | */ 5 | export default {}; 6 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/notifications/save/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-save-error-notification'; 2 | export * from './use-save-success-notification'; 3 | export * from './use-save-task-either-notifications'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/index.ts: -------------------------------------------------------------------------------- 1 | export * from './badges'; 2 | export * from './buttons'; 3 | export * from './create-sdk-search-select'; 4 | export * from './modals'; 5 | export * from './tabs'; 6 | -------------------------------------------------------------------------------- /packages/commons/src/types/distributive-overwrite.type.ts: -------------------------------------------------------------------------------- 1 | import type { Overwrite } from './overwrite.type'; 2 | 3 | export type DistributiveOverwrite = T extends any 4 | ? Overwrite 5 | : never; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/apps-categories/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './apps-categories-es-index.repo'; 2 | export * from './apps-categories-es-search.repo'; 3 | export * from './apps-categories-es-tree.repo'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/search-engines/form/update/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search-engine-update-form-modal'; 2 | export * from './use-search-engine-update-form'; 3 | export * from './use-search-engine-update-modal'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/modals/delete-confirm-modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './delete-confirm-modal'; 2 | export * from './use-delete-confirm-modal'; 3 | export * from './use-delete-with-notifications'; 4 | -------------------------------------------------------------------------------- /packages/commons/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @dashhub/commons 2 | 3 | ## 1.0.3 4 | 5 | ### Patch Changes 6 | 7 | - Add once helper 8 | 9 | ## 1.0.2 10 | 11 | ### Patch Changes 12 | 13 | - Add async validation util. 14 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/safe-to-array.ts: -------------------------------------------------------------------------------- 1 | import type { CanBeArray } from '../types'; 2 | 3 | export function safeToArray(items: CanBeArray): T[] { 4 | return Array.isArray(items) ? items : [items]; 5 | } 6 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/drop-last-slash.ts: -------------------------------------------------------------------------------- 1 | export function dropLastSlash(url: string): string { 2 | if (!url) { 3 | return ''; 4 | } 5 | 6 | return url.endsWith('/') ? url.slice(0, -1) : url; 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/chats/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-chat.dto'; 2 | export * from './sdk-create-chat.dto'; 3 | export * from './sdk-search-chats.dto'; 4 | export * from './sdk-update-chat.dto'; 5 | -------------------------------------------------------------------------------- /apps/backend/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_NAME= 2 | DATABASE_USER= 3 | DATABASE_PASSWORD= 4 | JWT_SECRET= 5 | APP_ENDUSER_DOMAIN= 6 | USER_ROOT_EMAIL= 7 | USER_ROOT_PASSWORD= 8 | SERVER_HOST=0.0.0.0 9 | SERVER_PORT=3000 10 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations-ai-settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations-ai-settings.repo'; 2 | export * from './organizations-ai-settings.service'; 3 | export * from './organizations-ai-settings.tables'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/creator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-api-create-form'; 2 | export * from './use-ai-external-api-create-form'; 3 | export * from './use-ai-external-api-default-value'; 4 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/modals/archive-confirm-modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './archive-confirm-modal'; 2 | export * from './use-archive-confirm-modal'; 3 | export * from './use-archive-with-notifications'; 4 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/pluck-ids.ts: -------------------------------------------------------------------------------- 1 | import type { ObjectWithId } from '../types'; 2 | 3 | export function pluckIds(items: O[]): Array { 4 | return items.map(({ id }) => id); 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-last-used-sdk-messages-ai-model'; 2 | export * from './get-sdk-app-mention-in-chat'; 3 | export * from './group-sdk-ai-messages-by-repeats'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/dto/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-user-auth-methods.dto'; 2 | export * from './sdk-enabled-user-auth-methods.dto'; 3 | export * from './sdk-update-user-auth-methods.dto'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dto'; 2 | export * from './errors'; 3 | export * from './fetch'; 4 | export * from './response'; 5 | export * from './sdk'; 6 | export * from './sdk-credentials-mask.dto'; 7 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/sdk-credentials-mask.dto.ts: -------------------------------------------------------------------------------- 1 | export const SDK_CREDENTIALS_MASK = '********'; 2 | 3 | export function isSDKCredentialsMasked(value: string): boolean { 4 | return value === SDK_CREDENTIALS_MASK; 5 | } 6 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/predefined/modals/unarchive-confirm-modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './unarchive-confirm-modal'; 2 | export * from './use-unarchive-confirm-modal'; 3 | export * from './use-unarchive-with-notifications'; 4 | -------------------------------------------------------------------------------- /packages/commons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "src", 5 | "paths": { 6 | "~/*": ["*"] 7 | } 8 | }, 9 | "include": ["src/"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/experts/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-expert.dto'; 2 | export * from './sdk-expert.dto'; 3 | export * from './sdk-search-experts.dto'; 4 | export * from './sdk-update-expert.dto'; 5 | -------------------------------------------------------------------------------- /packages/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "src", 5 | "paths": { 6 | "~/*": ["./*"] 7 | } 8 | }, 9 | "include": ["src/"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/backend/src/modules/messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './messages.firewall'; 3 | export * from './messages.repo'; 4 | export * from './messages.service'; 5 | export * from './messages.tables'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users-favorites/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-favorites.firewall'; 2 | export * from './users-favorites.repo'; 3 | export * from './users-favorites.service'; 4 | export * from './users-favorites.tables'; 5 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat'; 2 | export * from './choose-app'; 3 | export * from './grid'; 4 | export * from './promoted-apps'; 5 | export * from './sidebar'; 6 | export * from './use-cached-app-lookup'; 7 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './content-badges'; 2 | export * from './conversation'; 3 | export * from './grid'; 4 | export * from './history'; 5 | export * from './sidebar'; 6 | export * from './start-chat'; 7 | -------------------------------------------------------------------------------- /packages/commons-front/src/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './inject-script'; 2 | export * from './merge-refs'; 3 | export * from './preload-resource'; 4 | export * from './react-format'; 5 | export * from './wait-for-window-entry'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-project.dto'; 2 | export * from './sdk-project.dto'; 3 | export * from './sdk-search-projects.dto'; 4 | export * from './sdk-update-project.dto'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/cron/cron.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | /** 4 | * Error that occurs when a cron job fails. 5 | */ 6 | export class CronError extends TaggedError.ofLiteral()('CronError') {} 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './organizations.repo'; 2 | export * from './organizations.service'; 3 | export * from './organizations.tables'; 4 | export * from './s3-buckets'; 5 | export * from './users'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './projects-embeddings.repo'; 3 | export * from './projects-embeddings.service'; 4 | export * from './projects-embeddings.tables'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users-groups/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './repo'; 3 | export * from './users-groups.firewall'; 4 | export * from './users-groups.service'; 5 | export * from './users-groups.tables'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users/form/update/types.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | SdkTableRowWithIdT, 3 | SdkUpdateUserInputT, 4 | } from '@dashhub/sdk'; 5 | 6 | export type UpdateUserFormValue = 7 | SdkTableRowWithIdT & 8 | SdkUpdateUserInputT; 9 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/to-void-task-either.ts: -------------------------------------------------------------------------------- 1 | import * as TE from 'fp-ts/lib/TaskEither'; 2 | 3 | export function toVoidTE(task: TE.TaskEither): TE.TaskEither { 4 | return TE.map(() => void 0)(task); 5 | } 6 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/truncate-text.ts: -------------------------------------------------------------------------------- 1 | export function truncateText(length: number, literal: string = '...') { 2 | return (input: string) => 3 | input.length > length ? `${input.substring(0, length)}${literal}` : input; 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/pinned-messages/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-is-sdk-pinned-message-toggled'; 2 | export * from './use-sdk-subscribe-pinned-messages-or-throw'; 3 | export * from './use-sdk-toggle-pinned-message'; 4 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-server.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkServerError extends TaggedError.ofLiteral< 4 | { 5 | message: string; 6 | } 7 | >()('SdkServerError') {} 8 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/tree/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-tree-from-list'; 2 | export * from './filter-tree-by-ids'; 3 | export * from './iterate-tree'; 4 | export * from './map-tree'; 5 | export * from './with-counted-tree-nodes'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/helpers/is-sdk-app-creator-app.ts: -------------------------------------------------------------------------------- 1 | export const SDK_MAGIC_APP_NAME = 'App Creator'; 2 | 3 | export function isSdkAppCreatorApp(app: { name: string; }) { 4 | return app.name === SDK_MAGIC_APP_NAME; 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/s3-buckets/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-s3-bucket.dto'; 2 | export * from './sdk-s3-bucket.dto'; 3 | export * from './sdk-search-s3-buckets.dto'; 4 | export * from './sdk-update-s3-bucket.dto'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-counted-record.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkCountedRecordV = z.object({ 4 | count: z.number(), 5 | }); 6 | 7 | export type SdkCountedRecordT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './users.boot'; 3 | export * from './users.config'; 4 | export * from './users.repo'; 5 | export * from './users.service'; 6 | export * from './users.tables'; 7 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/iterators/async-iterator-to-void-promise.ts: -------------------------------------------------------------------------------- 1 | export async function asyncIteratorToVoidPromise(iterator: AsyncIterableIterator): Promise { 2 | for await (const _ of iterator) { 3 | /* nop */ 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/commons/src/types/unparsed-env-object.type.ts: -------------------------------------------------------------------------------- 1 | export type UnparsedEnvObject = O extends null 2 | ? null 3 | : O extends object 4 | ? { 5 | [K in keyof O]: UnparsedEnvObject; 6 | } 7 | : string | undefined; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/dto/sdk-email-login.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkEmailLoginInputV = z.object({ 4 | email: z.string(), 5 | }); 6 | 7 | export type SdkEmailLoginInputT = z.infer; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/guards/is-sdk-public-permissions.ts: -------------------------------------------------------------------------------- 1 | import type { SdkPermissionT } from '../dto'; 2 | 3 | export function isSdkPublicPermissions(permissions: SdkPermissionT[]) { 4 | return !permissions.length; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/permissions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permissions.firewall'; 2 | export * from './permissions.repo'; 3 | export * from './permissions.service'; 4 | export * from './permissions.tables'; 5 | export * from './record-protection'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './modal'; 2 | export * from './modal-body'; 3 | export * from './modal-close-button'; 4 | export * from './modal-footer'; 5 | export * from './modal-header'; 6 | export * from './modal-title'; 7 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/are-paths-equal.ts: -------------------------------------------------------------------------------- 1 | import { dropSearchParams } from './drop-search-params'; 2 | 3 | export function arePathsEqual(path1: string, path2: string) { 4 | return dropSearchParams(path1) === dropSearchParams(path2); 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-email-login.dto'; 2 | export * from './sdk-jwt-tokens-pair.dto'; 3 | export * from './sdk-jwt.dto'; 4 | export * from './sdk-password-login.dto'; 5 | export * from './sdk-refresh-jwt.dto'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/helpers/get-sdk-app-mention-in-chat.ts: -------------------------------------------------------------------------------- 1 | import type { SdkTableRowWithIdT } from '~/shared'; 2 | 3 | export function getSdkAppMentionInChat(app: SdkTableRowWithIdT): string { 4 | return `#app:${app.id}`; 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users-groups/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-users-group.dto'; 2 | export * from './sdk-search-users-groups.dto'; 3 | export * from './sdk-update-users-group.dto'; 4 | export * from './sdk-users-group.dto'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-record-not-found.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkRecordNotFoundError extends TaggedError.ofLiteral()('SdkRecordNotFoundError') { 4 | readonly httpCode = 404; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/modules/apps-commercial.controller.ts: -------------------------------------------------------------------------------- 1 | import { AuthorizedController } from '~/modules/api/controllers/shared/authorized.controller'; 2 | 3 | export class AppsCommercialAPIController extends AuthorizedController { /* NOP */ } 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth.config'; 2 | export * from './auth.tables'; 3 | export * from './firewall'; 4 | export * from './helpers'; 5 | export * from './repo'; 6 | export * from './services'; 7 | export * from './tokens'; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/repo/auth-emails.repo.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'tsyringe'; 2 | 3 | import { createDatabaseRepo } from '~/modules/database'; 4 | 5 | @injectable() 6 | export class AuthEmailsRepo extends createDatabaseRepo('auth_emails') {} 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/helpers/create-magic-null-id-es-value.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/null-value.html#null-value} 3 | */ 4 | export const createMagicNullIdEsValue = () => -1; 5 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/is-object-with-fake-id.ts: -------------------------------------------------------------------------------- 1 | export const FAKE_OBJECT_ID = -1; 2 | 3 | export function isObjectWithFakeID(obj: T): obj is T & { id: typeof FAKE_OBJECT_ID; } { 4 | return obj?.id === FAKE_OBJECT_ID; 5 | } 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-async-fetcher'; 2 | export * from './auth.sdk'; 3 | export * from './dto'; 4 | export * from './errors'; 5 | export * from './firewall'; 6 | export * from './helpers'; 7 | export * from './storage'; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/guards/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-record-access-guard'; 2 | export * from './is-sdk-permission-matching'; 3 | export * from './is-sdk-public-permissions'; 4 | export * from './is-sdk-record-with-creator'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/pinned-messages/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-pin-message-list-item.dto'; 2 | export * from './sdk-pin-message.dto'; 3 | export * from './sdk-pinned-message.dto'; 4 | export * from './sdk-pinned-search-messages.dto'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-endpoint-not-found.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkEndpointNotFoundError extends TaggedError.ofLiteral()('SdkEndpointNotFoundError') { 4 | readonly httpCode = 404; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/commercial.stub/modules/agents-library-api.controller.ts: -------------------------------------------------------------------------------- 1 | import { AuthorizedController } from '~/modules/api/controllers/shared/authorized.controller'; 2 | 3 | export class AgentsLibraryAPIController extends AuthorizedController { /* NOP */ } 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-files/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './projects-files.firewall'; 3 | export * from './projects-files.repo'; 4 | export * from './projects-files.service'; 5 | export * from './projects-files.tables'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-apps'; 2 | export * from './context'; 3 | export * from './embeddings'; 4 | export * from './message'; 5 | export * from './system'; 6 | export * from './websearch'; 7 | export * from './xml'; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/s3/repo/s3-resources.repo.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'tsyringe'; 2 | 3 | import { createDatabaseRepo } from '~/modules/database'; 4 | 5 | @injectable() 6 | export class S3ResourcesRepo extends createDatabaseRepo('s3_resources') {} 7 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/errors/sdk-invalid-jwt-token.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkInvalidJwtTokenError extends TaggedError.ofLiteral()('SdkInvalidJwtTokenError') { 4 | readonly httpCode = 401; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/errors/database-record-not-exists.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class DatabaseRecordNotExists extends TaggedError.ofLiteral()('DatabaseRecordNotExists') { 4 | readonly httpCode = 404; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/pinned-messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './pinned-messages.firewall'; 3 | export * from './pinned-messages.repo'; 4 | export * from './pinned-messages.service'; 5 | export * from './pinned-messages.tables'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-embeddings/generators/base/ai-embedding-generator.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class AIEmbeddingGeneratorError 4 | extends TaggedError.ofLiteral()('AIEmbeddingGeneratorError') { 5 | } 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/users-groups/form/create/types.ts: -------------------------------------------------------------------------------- 1 | import type { SdkCreateUsersGroupInputT, SdkUserListItemT } from '@dashhub/sdk'; 2 | 3 | export type CreateUsersGroupValue = Omit & { 4 | users: SdkUserListItemT[]; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/commons/src/dto/app-env.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const AppEnvV = z 4 | .enum([ 5 | 'dev', 6 | 'staging', 7 | 'production', 8 | ]) 9 | .default('dev'); 10 | 11 | export type AppEnvT = z.infer; 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-incorrect-username-or-password.error'; 2 | export * from './sdk-incorrect-username.error'; 3 | export * from './sdk-invalid-jwt-refresh-token.error'; 4 | export * from './sdk-invalid-jwt-token.error'; 5 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/ai-models/dto/credentials/openai-credentials.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkOpenAICredentialsV = z.object({ 4 | apiUrl: z.string().optional(), 5 | apiKey: z.string(), 6 | apiModel: z.string(), 7 | }); 8 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-payload-validation.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkPayloadValidationError extends TaggedError.ofLiteral< 4 | { 5 | errors: any[]; 6 | } 7 | >()('SdkPayloadValidationError') {} 8 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-record-already-exists.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkRecordAlreadyExistsError extends TaggedError.ofLiteral()('SdkRecordAlreadyExistsError') { 4 | readonly httpCode = 409; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/ai-external-apis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-external-apis.firewall'; 2 | export * from './ai-external-apis.repo'; 3 | export * from './ai-external-apis.service'; 4 | export * from './ai-external-apis.tables'; 5 | export * from './elasticsearch'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/input-toolbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-choose-app-button'; 2 | export * from './chat-input-toolbar'; 3 | export * from './chat-reply-message'; 4 | export * from './chat-select-app'; 5 | export * from './chat-web-search-button'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export * from './helpers'; 2 | export * from './page-number'; 3 | export * from './pagination-arrows'; 4 | export * from './pagination-footer'; 5 | export * from './pagination-items-per-page'; 6 | export * from './toolbar'; 7 | -------------------------------------------------------------------------------- /packages/commons-front/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "src", 5 | "paths": { 6 | "~/*": ["*"] 7 | }, 8 | "types": ["vite/client"] 9 | }, 10 | "include": ["src/"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/ai-models/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './credentials'; 2 | export * from './sdk-ai-model.dto'; 3 | export * from './sdk-create-ai-model.dto'; 4 | export * from './sdk-search-ai-models.dto'; 5 | export * from './sdk-update-ai-model.dto'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/migrations/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './add-ai-generated-columns'; 2 | export * from './add-archive-protection'; 3 | export * from './add-archived-at'; 4 | export * from './add-id'; 5 | export * from './add-timestamp-columns'; 6 | export * from './add-uuid'; 7 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/find-item-index-by-id.ts: -------------------------------------------------------------------------------- 1 | import type { ObjectWithId } from '../types'; 2 | 3 | export function findItemIndexById(id: unknown) { 4 | return (array: O[]) => 5 | array.findIndex(arrayItem => arrayItem.id === id); 6 | } 7 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/reject-by-id.ts: -------------------------------------------------------------------------------- 1 | import type { ObjectWithId } from '../types'; 2 | 3 | export function rejectById(id: K) { 4 | return (array: O[]) => 5 | array.filter(arrayItem => arrayItem.id !== id); 6 | } 7 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/run-task.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from 'fp-ts/lib/Task'; 2 | 3 | export const runTask = async (task: Task): Promise => task(); 4 | 5 | export async function runTaskAsVoid(task: Task): Promise { 6 | await runTask(task); 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/dto/sdk-jwt-tokens-pair.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkJwtTokensPairV = z.object({ 4 | token: z.string(), 5 | refreshToken: z.string(), 6 | }); 7 | 8 | export type SdkJwtTokensPairT = z.infer; 9 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/index.ts: -------------------------------------------------------------------------------- 1 | export * from './favorites'; 2 | export * from './hooks'; 3 | export * from './installed-apps'; 4 | export * from './me'; 5 | export * from './pinned-messages'; 6 | export * from './sdk-context'; 7 | export * from './sdk-provider'; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/response/sdk-response.dto.ts: -------------------------------------------------------------------------------- 1 | import type { SdkErrorResponseT } from './sdk-error-response.dto'; 2 | import type { SdkSuccessResponseT } from './sdk-success-response.dto'; 3 | 4 | export type SdkResponseT = SdkSuccessResponseT | SdkErrorResponseT; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/errors/database-record-already-exists.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class DatabaseRecordAlreadyExists extends TaggedError.ofLiteral()('DatabaseRecordAlreadyExists') { 4 | readonly httpCode = 409; 5 | } 6 | -------------------------------------------------------------------------------- /apps/chat/src/commercial.stub/shared/commercial-component-stub.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function CommercialComponentStub({ children }: PropsWithChildren) { 4 | return ( 5 | <> 6 | {children} 7 | 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/modal/modal-body.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function ModalBody({ children }: PropsWithChildren) { 4 | return ( 5 |

8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/modal/modal-title.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function ModalTitle({ children }: PropsWithChildren) { 4 | return ( 5 |

6 | {children} 7 |

8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/repo/auth-reset-passwords.repo.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'tsyringe'; 2 | 3 | import { createDatabaseRepo } from '~/modules/database'; 4 | 5 | @injectable() 6 | export class AuthResetPasswordsRepo extends createDatabaseRepo('auth_reset_passwords') {} 7 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/modal/modal-header.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function ModalHeader({ children }: PropsWithChildren) { 4 | return ( 5 |
6 | {children} 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/clamp.ts: -------------------------------------------------------------------------------- 1 | export function clamp(min: number, max: number, value: number) { 2 | return Math.min(Math.max(value, min), max); 3 | } 4 | 5 | export function clampC(min: number, max: number) { 6 | return (value: number) => 7 | clamp(min, max, value); 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/errors/sdk-invalid-jwt-refresh-token.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkInvalidJwtRefreshTokenError extends TaggedError.ofLiteral()('SdkInvalidJwtRefreshTokenError') { 4 | readonly httpCode = 401; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/tokens/encode-token.ts: -------------------------------------------------------------------------------- 1 | import jwtSimple from 'jwt-simple'; 2 | 3 | import type { SdkJwtTokenT } from '@dashhub/sdk'; 4 | 5 | export function encodeToken(jwtToken: SdkJwtTokenT, secret: string) { 6 | return jwtSimple.encode(jwtToken, secret, 'HS256'); 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/chats-summaries/chats-summaries.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const ChatsSummariesConfigV = z.object({ 4 | cron: z.string().default('*/20 * * * * *'), 5 | }); 6 | 7 | export type ChatsSummariesConfigT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch.config'; 2 | export * from './elasticsearch.error'; 3 | export * from './elasticsearch.type'; 4 | export * from './helpers'; 5 | export * from './mappings'; 6 | export * from './repo'; 7 | export * from './search'; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/search-engines/index.ts: -------------------------------------------------------------------------------- 1 | export * from './clients'; 2 | export * from './elasticsearch'; 3 | export * from './search-engines.firewall'; 4 | export * from './search-engines.repo'; 5 | export * from './search-engines.service'; 6 | export * from './search-engines.tables'; 7 | -------------------------------------------------------------------------------- /apps/chat/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions/chat-message-ai-actions'; 2 | export * from './chat-message'; 3 | export * from './chat-message-replied-message'; 4 | export * from './chat-message-variants'; 5 | export * from './content/chat-message-content'; 6 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/use-force-rerender.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | 3 | export function useForceRerender() { 4 | const [revision, set] = useState(0); 5 | 6 | return { 7 | revision, 8 | forceRerender: () => set(prev => prev + 1), 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/commons/src/dto/non-empty-or-null-string.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const NonEmptyOrNullStringV = z 4 | .string() 5 | .transform(val => val?.trim() || null) 6 | .nullable(); 7 | 8 | export type NonEmptyOrNullStringT = z.infer; 9 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/dto/ai-settings/sdk-user-ai-settings.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkUserAISettingsV = z.object({ 4 | chatContext: z.string().nullable(), 5 | }); 6 | 7 | export type SdkUserAISettingsT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/embeddings/utils/types.ts: -------------------------------------------------------------------------------- 1 | import type { TableRowWithId, TableRowWithIdName } from '~/modules/database'; 2 | 3 | export type MatchingEmbedding = TableRowWithId & { 4 | projectFile: TableRowWithIdName; 5 | text: string; 6 | isInternalKnowledge: boolean; 7 | }; 8 | -------------------------------------------------------------------------------- /apps/chat/src/routes/settings/settings.route.tsx: -------------------------------------------------------------------------------- 1 | import { Redirect } from 'wouter'; 2 | 3 | import { useSitemap } from '../use-sitemap'; 4 | 5 | export function SettingsRoute() { 6 | const sitemap = useSitemap(); 7 | 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/decode-html-entities.ts: -------------------------------------------------------------------------------- 1 | export function decodeHtmlEntities(text: string): string { 2 | return text 3 | .replace(/&/g, '&') 4 | .replace(/</g, '<') 5 | .replace(/>/g, '>') 6 | .replace(/"/g, '"') 7 | .replace(/'/g, '\''); 8 | } 9 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-invalid-file-format.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkInvalidFileFormatError extends TaggedError.ofLiteral<{ name?: string; mimeType?: string; }>()('SdkInvalidFileFormatError') { 4 | readonly httpCode = 400; 5 | } 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/http-server.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const HttpServerConfigV = z.object({ 4 | hostname: z.string().default('0.0.0.0'), 5 | port: z.coerce.number().default(3000), 6 | }); 7 | 8 | export type HttpServerConfigT = z.infer; 9 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/card/card-content.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function CardContent({ children }: PropsWithChildren) { 4 | return ( 5 |
6 | {children} 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './is-csv-mimetype'; 2 | export * from './is-image-mimetype'; 3 | export * from './is-legacy-excel-mimetype'; 4 | export * from './is-legacy-word-mimetype'; 5 | export * from './is-pdf-mimetype'; 6 | export * from './is-xml-office-mimetype'; 7 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/installed-apps/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-is-sdk-app-installed'; 2 | export * from './use-is-sdk-library-agent-installed'; 3 | export * from './use-sdk-non-rerender-subscribe-installed-apps'; 4 | export * from './use-sdk-subscribe-installed-apps-or-throw'; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-id-column.type.ts: -------------------------------------------------------------------------------- 1 | import type { Generated } from 'kysely'; 2 | 3 | export type TableId = number; 4 | 5 | export type TableRowWithId = { 6 | id: TableId; 7 | }; 8 | 9 | export type TableWithIdColumn = { 10 | id: Generated; 11 | }; 12 | -------------------------------------------------------------------------------- /apps/backend/src/modules/permissions/record-protection/permissions-row-protection.tables.ts: -------------------------------------------------------------------------------- 1 | import type { SdkPermissionT } from '@dashhub/sdk'; 2 | 3 | export type PermissionsTableRowRelation = { 4 | permissions: { 5 | inherited: SdkPermissionT[]; 6 | current: SdkPermissionT[]; 7 | }; 8 | }; 9 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-summaries/projects-summaries.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const ProjectsSummariesConfigV = z.object({ 4 | cron: z.string().default('*/20 * * * * *'), 5 | }); 6 | 7 | export type ProjectsSummariesConfigT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './links'; 2 | export * from './logged-in'; 3 | export * from './section'; 4 | export * from './sidebar'; 5 | export * from './sidebar-section-all-link'; 6 | export * from './sidebar-workspace-selector'; 7 | export * from './use-sidebar-toggled-storage'; 8 | -------------------------------------------------------------------------------- /apps/chat/src/routes/management/management.route.tsx: -------------------------------------------------------------------------------- 1 | import { Redirect } from 'wouter'; 2 | 3 | import { useSitemap } from '../use-sitemap'; 4 | 5 | export function ManagementRoute() { 6 | const sitemap = useSitemap(); 7 | 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/reject-falsy-items.ts: -------------------------------------------------------------------------------- 1 | export type FalsyValues = false | undefined | null; 2 | 3 | export type FalsyItem = O | FalsyValues; 4 | 5 | export function rejectFalsyItems(items: Array>) { 6 | return items.filter(Boolean) as Array>; 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/search-engines/dto/sdk-search-engine-credentials.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkSearchEngineCredentialsV = z.object({ 4 | apiKey: z.string(), 5 | }); 6 | 7 | export type SdkSearchEngineCredentialsT = z.infer; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/sdk-invalid-request.error.ts: -------------------------------------------------------------------------------- 1 | import type { ZodError } from 'zod'; 2 | 3 | import { TaggedError } from '@dashhub/commons'; 4 | 5 | export class SdkInvalidRequestError extends TaggedError.ofLiteral()('SdkInvalidRequestError') { 6 | readonly httpCode = 400; 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/auth.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const AuthConfigV = z.object({ 4 | jwt: z.object({ 5 | secret: z.string(), 6 | expiresIn: z.coerce.number().default(3600), 7 | }), 8 | }); 9 | 10 | export type AuthConfigT = z.infer; 11 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/queries/query-basic-factory-attrs.type.ts: -------------------------------------------------------------------------------- 1 | import type { DatabaseTables } from '../database.tables'; 2 | import type { KyselyDatabase } from '../types'; 3 | 4 | export type QueryBasicFactoryAttrs = { 5 | table: K; 6 | db: KyselyDatabase; 7 | }; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/s3-buckets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './elasticsearch'; 2 | export * from './organizations-s3-buckets.firewall'; 3 | export * from './organizations-s3-buckets.repo'; 4 | export * from './organizations-s3-buckets.service'; 5 | export * from './organizations-s3-buckets.tables'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/search-engines/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-create-search-engine.dto'; 2 | export * from './sdk-search-engine-credentials.dto'; 3 | export * from './sdk-search-engine.dto'; 4 | export * from './sdk-search-engines.dto'; 5 | export * from './sdk-update-search-engine.dto'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/chats-summaries/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chats-summaries.config'; 2 | export * from './chats-summaries.cron'; 3 | export * from './chats-summaries.errors'; 4 | export * from './chats-summaries.repo'; 5 | export * from './chats-summaries.service'; 6 | export * from './chats-summaries.tables'; 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/ai-generated-columns.type.ts: -------------------------------------------------------------------------------- 1 | export type AIGeneratedColumns = 2 | & { 3 | [key in T]: string | null; 4 | } 5 | & { 6 | [key in `${T}_generated`]: boolean; 7 | } 8 | & { 9 | [key in `${T}_generated_at`]: Date | null; 10 | }; 11 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-uuid-column.type.ts: -------------------------------------------------------------------------------- 1 | import type { Generated } from 'kysely'; 2 | 3 | export type TableUuid = string; 4 | 5 | export type TableRowWithUuid = { 6 | id: TableUuid; 7 | }; 8 | 9 | export type TableWithUuidColumn = { 10 | id: Generated; 11 | }; 12 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/mappings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-generated-field.mapping'; 2 | export * from './archived.mapping'; 3 | export * from './autocomplete.mapping'; 4 | export * from './dated-record.mapping'; 5 | export * from './id-name-object.mapping'; 6 | export * from './id-object.mapping'; 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/search/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-pagination-offset-search-query'; 2 | export * from './create-phrase-field-query'; 3 | export * from './create-sort-by-ids-order-script'; 4 | export * from './create-sort-field-query'; 5 | export * from './created-scored-sort-field-query'; 6 | -------------------------------------------------------------------------------- /apps/backend/src/modules/prompts/context/features/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-action-buttons-context-prompt'; 2 | export * from './create-date-time-context-prompt'; 3 | export * from './create-html-preview-context-prompt'; 4 | export * from './create-quotes-context-prompt'; 5 | export * from './feature-xml-tag'; 6 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-api-creator/schema/parameters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-schema-parameter-default-value'; 2 | export * from './ai-schema-parameter-placement'; 3 | export * from './ai-schema-parameter-row'; 4 | export * from './ai-schema-parameter-type'; 5 | export * from './ai-schema-parameters'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps-categories/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-app-category.dto'; 2 | export * from './sdk-counted-apps-categories-tree.dto'; 3 | export * from './sdk-create-app-category.dto'; 4 | export * from './sdk-search-apps-categories.dto'; 5 | export * from './sdk-update-app-category.dto'; 6 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/errors/is-sdk-tagged-error.ts: -------------------------------------------------------------------------------- 1 | import type { TaggedError } from '@dashhub/commons'; 2 | 3 | export function isSdkTaggedError( 4 | error: TaggedError, 5 | ): error is TaggedError<`Sdk${string}`, T> { 6 | return !!error.tag && error.tag.startsWith('Sdk'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/cache/once.ts: -------------------------------------------------------------------------------- 1 | export function once(fn: () => T): (() => T) { 2 | let result: T | undefined; 3 | let called = false; 4 | 5 | return () => { 6 | if (!called) { 7 | result = fn(); 8 | called = true; 9 | } 10 | 11 | return result as T; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/iterators/map-async-iterator.ts: -------------------------------------------------------------------------------- 1 | export function mapAsyncIterator(map: (input: I) => O) { 2 | return async function* walker(iterator: AsyncIterableIterator): AsyncIterableIterator { 3 | for await (const item of iterator) { 4 | yield map(item); 5 | } 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/timeout.ts: -------------------------------------------------------------------------------- 1 | import * as TE from 'fp-ts/lib/TaskEither'; 2 | 3 | export async function timeout(ms: number) { 4 | return new Promise((resolve) => { 5 | setTimeout(resolve, ms); 6 | }); 7 | } 8 | 9 | export const timeoutTE = (ms: number) => TE.fromTask(async () => timeout(ms)); 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/errors/sdk-incorrect-username.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkIncorrectUsernameError extends TaggedError.ofLiteral< 4 | { 5 | email: string; 6 | } 7 | >()('SdkIncorrectUsernameError') { 8 | readonly httpCode = 401; 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-settings'; 2 | export * from './auth'; 3 | export * from './sdk-create-user.dto'; 4 | export * from './sdk-search-users.dto'; 5 | export * from './sdk-update-user.dto'; 6 | export * from './sdk-user-list-item.dto'; 7 | export * from './sdk-user.dto'; 8 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-with-id.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowIdV } from './sdk-table-row-id.dto'; 4 | 5 | export const SdkTableRowWithIdV = z.object({ 6 | id: SdkTableRowIdV, 7 | }); 8 | 9 | export type SdkTableRowWithIdT = z.infer; 10 | -------------------------------------------------------------------------------- /apps/backend/src/modules/chats-summaries/chats-summaries.errors.ts: -------------------------------------------------------------------------------- 1 | import type { SdkSearchMessagesOutputT } from '@dashhub/sdk'; 2 | 3 | import { TaggedError } from '@dashhub/commons'; 4 | 5 | export class MissingAIModelInChatError 6 | extends TaggedError.ofLiteral()('MissingAIModelInChat') { 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-default-columns.type.ts: -------------------------------------------------------------------------------- 1 | import type { TableWithAccessTimeColumns } from './table-with-access-time-columns.type'; 2 | import type { TableWithIdColumn } from './table-with-id-column.type'; 3 | 4 | export type TableWithDefaultColumns = TableWithIdColumn & TableWithAccessTimeColumns; 5 | -------------------------------------------------------------------------------- /apps/backend/src/modules/users/users.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const UsersConfigV = z.object({ 4 | root: z.object({ 5 | email: z.string().default('root@localhost'), 6 | password: z.string().optional(), 7 | }), 8 | }); 9 | 10 | export type UsersConfigT = z.infer; 11 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/centered-page.layout.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | export function CenteredPageLayout({ children }: PropsWithChildren) { 4 | return ( 5 |
6 | {children} 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /apps/chat/src/routes/use-check-replaceable-link-path.ts: -------------------------------------------------------------------------------- 1 | import { useLocation } from 'wouter'; 2 | 3 | import { arePathsEqual } from '@dashhub/commons'; 4 | 5 | export function useCheckReplaceableLinkPath() { 6 | const [location] = useLocation(); 7 | 8 | return (href: string) => arePathsEqual(location, href); 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/use-is-mounted.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react'; 2 | 3 | export function useIsMounted(): boolean { 4 | const [isMounted, setIsMounted] = useState(false); 5 | 6 | useEffect(() => { 7 | setIsMounted(true); 8 | }, []); 9 | 10 | return isMounted; 11 | } 12 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/mimetypes/is-image-mimetype.ts: -------------------------------------------------------------------------------- 1 | const SUPPORTED_IMAGES_MIME_TYPES = new Set([ 2 | 'image/jpeg', 3 | 'image/jpg', 4 | 'image/png', 5 | 'image/webp', 6 | ]); 7 | 8 | export function isImageMimetype(mimetype: string): boolean { 9 | return SUPPORTED_IMAGES_MIME_TYPES.has(mimetype); 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/dto/sdk-attach-app.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowWithIdV } from '~/shared'; 4 | 5 | export const SdkAttachAppInputV = z.object({ 6 | app: SdkTableRowWithIdV, 7 | }); 8 | 9 | export type SdkAttachAppInputT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/users/dto/ai-settings/sdk-upsert-user-ai-settings.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkUpsertUserAISettingsInputV = z.object({ 4 | chatContext: z.string().nullable(), 5 | }); 6 | 7 | export type SdkUpsertUserAISettingsInputT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-summaries/index.ts: -------------------------------------------------------------------------------- 1 | export * from './projects-summaries.config'; 2 | export * from './projects-summaries.cron'; 3 | export * from './projects-summaries.errors'; 4 | export * from './projects-summaries.repo'; 5 | export * from './projects-summaries.service'; 6 | export * from './projects-summaries.tables'; 7 | -------------------------------------------------------------------------------- /apps/chat/src/layouts/navigation/navigation-toolbar-portal.tsx: -------------------------------------------------------------------------------- 1 | import type { PropsWithChildren } from 'react'; 2 | 3 | import { createPortal } from 'react-dom'; 4 | 5 | export function NavigationToolbarPortal({ children }: PropsWithChildren) { 6 | return createPortal(children, document.getElementById('navigation-toolbar')!); 7 | } 8 | -------------------------------------------------------------------------------- /apps/chat/src/modules/apps/grid/apps-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | import { GhostPlaceholder } from '~/modules/shared'; 3 | 4 | export function AppsPlaceholder() { 5 | const t = useI18n().pack.apps.grid; 6 | 7 | return ( 8 | {t.placeholder} 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/organizations/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-settings'; 2 | export * from './sdk-create-organization.dto'; 3 | export * from './sdk-organization-user.dto'; 4 | export * from './sdk-organization.dto'; 5 | export * from './sdk-search-organizations.dto'; 6 | export * from './sdk-update-organization.dto'; 7 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-with-uuid.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowUuidV } from './sdk-table-row-uuid.dto'; 4 | 5 | export const SdkTableRowWithUuidV = z.object({ 6 | id: SdkTableRowUuidV, 7 | }); 8 | 9 | export type SdkTableRowWithUuidT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/sdk.ts: -------------------------------------------------------------------------------- 1 | import { AuthSdk } from '~/modules'; 2 | 3 | import type { AbstractNestedSdkConfig } from '../modules/abstract-nested-sdk'; 4 | 5 | export class Sdk { 6 | readonly auth: AuthSdk; 7 | 8 | constructor(config: AbstractNestedSdkConfig) { 9 | this.auth = new AuthSdk(config); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/backend/src/modules/projects-summaries/projects-summaries.errors.ts: -------------------------------------------------------------------------------- 1 | import type { SdkSearchMessagesOutputT } from '@dashhub/sdk'; 2 | 3 | import { TaggedError } from '@dashhub/commons'; 4 | 5 | export class MissingAIModelInProjectError 6 | extends TaggedError.ofLiteral()('MissingAIModelInProject') { 7 | } 8 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/panic-error.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Create a new error with a message and optional metadata. 3 | */ 4 | export function panicError(message: string) { 5 | return (meta?: any) => 6 | new Error( 7 | [`PANIC! ${message}`, meta && JSON.stringify(meta, null, 2)].filter(Boolean).join('\n'), 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/pinned-messages/dto/sdk-pin-message.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowUuidV } from '~/shared'; 4 | 5 | export const SdkPinMessageInputV = z.object({ 6 | messageId: SdkTableRowUuidV, 7 | }); 8 | 9 | export type SdkPinMessageInputT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-success.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkSuccessV = z.object({ 4 | success: z.literal(true), 5 | }); 6 | 7 | export type SdkSuccessT = z.infer; 8 | 9 | export function ofSdkSuccess(): SdkSuccessT { 10 | return { 11 | success: true, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-with-archive-protection.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkTableRowWithArchiveProtectionV = z.object({ 4 | archiveProtection: z.boolean(), 5 | }); 6 | 7 | export type SdkTableRowWithArchiveProtectionT = z.infer< 8 | typeof SdkTableRowWithArchiveProtectionV 9 | >; 10 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/side-layout/side-nav.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | 3 | type SideNavProps = { 4 | children: ReactNode; 5 | }; 6 | 7 | export function SideNav({ children }: SideNavProps) { 8 | return ( 9 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/commons-front/src/hooks/use-context-or-throw.ts: -------------------------------------------------------------------------------- 1 | import { type Context, useContext } from 'react'; 2 | 3 | export function useContextOrThrow(context: Context, message: string): NonNullable { 4 | const ctx = useContext(context); 5 | if (!ctx) { 6 | throw new Error(message); 7 | } 8 | 9 | return ctx; 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/helpers/get-last-used-sdk-messages-ai-model.ts: -------------------------------------------------------------------------------- 1 | import type { SdkSearchMessageItemT } from '../dto'; 2 | 3 | export function getLastUsedSdkMessagesAIModel( 4 | messages: Array>, 5 | ) { 6 | return messages.findLast(message => message.aiModel)?.aiModel; 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-archive-at-column.type.ts: -------------------------------------------------------------------------------- 1 | import type { ColumnType } from 'kysely'; 2 | 3 | export type TableWithArchivedAtColumn = { 4 | archived: ColumnType; 5 | archived_at: Date | null; 6 | }; 7 | 8 | export type OmitTableArchivedAtKeys = Omit; 9 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/types/table-with-id-name-column.type.ts: -------------------------------------------------------------------------------- 1 | import type { TableRowWithId, TableWithIdColumn } from './table-with-id-column.type'; 2 | 3 | export type TableRowWithIdName = TableRowWithId & { 4 | name: string; 5 | }; 6 | 7 | export type TableWithIdNameColumn = TableWithIdColumn & { 8 | name: string; 9 | }; 10 | -------------------------------------------------------------------------------- /apps/chat/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('tailwindcss'), 4 | require('franken-ui/postcss/sort-media-queries')({ 5 | sort: 'mobile-first', 6 | }), 7 | require('franken-ui/postcss/combine-duplicated-selectors')({ 8 | removeDuplicatedProperties: true, 9 | }), 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat-attached-app'; 2 | export * from './chat-conversation-panel'; 3 | export * from './chat-conversation-with-sidebar'; 4 | export * from './config-panel'; 5 | export * from './files'; 6 | export * from './hooks'; 7 | export * from './input-toolbar'; 8 | export * from './messages'; 9 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/grid/projects-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | import { GhostPlaceholder } from '~/modules/shared'; 3 | 4 | export function ProjectsPlaceholder() { 5 | const t = useI18n().pack.projects.grid; 6 | 7 | return ( 8 | {t.placeholder} 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/chat/src/routes/management/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-models-management.route'; 2 | export * from './organization-management.route'; 3 | export * from './s3-buckets-management.route'; 4 | export * from './search-engines-management.route'; 5 | export * from './users-groups-management.route'; 6 | export * from './users-management.route'; 7 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/errors/sdk-incorrect-username-or-password.error.ts: -------------------------------------------------------------------------------- 1 | import { TaggedError } from '@dashhub/commons'; 2 | 3 | export class SdkIncorrectUsernameOrPasswordError extends TaggedError.ofLiteral< 4 | { 5 | email: string; 6 | } 7 | >()('SdkIncorrectUsernameOrPasswordError') { 8 | readonly httpCode = 401; 9 | } 10 | -------------------------------------------------------------------------------- /apps/chat/src/modules/permissions/share-resource/index.ts: -------------------------------------------------------------------------------- 1 | export * from './autocomplete'; 2 | export * from './list'; 3 | export * from './share-resource-button'; 4 | export * from './share-resource-form-group'; 5 | export * from './share-resource-form-modal'; 6 | export * from './use-share-resource-form'; 7 | export * from './use-share-resource-modal'; 8 | -------------------------------------------------------------------------------- /apps/chat/src/config/config.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { AppEnvV } from '@dashhub/commons'; 4 | 5 | export const ConfigV = z.object({ 6 | env: AppEnvV, 7 | apiUrl: z.string(), 8 | googleDrive: z.object({ 9 | clientId: z.string(), 10 | }).optional(), 11 | }); 12 | 13 | export type ConfigT = z.infer; 14 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/list/no-items-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | 3 | export function NoItemsPlaceholder() { 4 | const { pack } = useI18n(); 5 | 6 | return ( 7 |
8 | {pack.placeholders.noItemsFound} 9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/dto/sdk-permission-level.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SDK_PERMISSION_ACCESS_LEVELS = ['read', 'write'] as const; 4 | 5 | export const SdkPermissionAccessLevelV = z.enum(SDK_PERMISSION_ACCESS_LEVELS); 6 | 7 | export type SdkPermissionAccessLevelT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/chat/src/modules/projects/files/project-files-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | import { GhostPlaceholder } from '~/modules/shared'; 3 | 4 | export function ProjectFilesPlaceholder() { 5 | const t = useI18n().pack.projects.files; 6 | 7 | return ( 8 | {t.emptyPlaceholder} 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/controls/index.ts: -------------------------------------------------------------------------------- 1 | export * from './checkbox'; 2 | export * from './file-input'; 3 | export * from './hidden-required-input'; 4 | export * from './input'; 5 | export * from './input-with-icon'; 6 | export * from './numeric-input'; 7 | export * from './search-select'; 8 | export * from './select'; 9 | export * from './textarea'; 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/urls/with-hash.ts: -------------------------------------------------------------------------------- 1 | import { pipe } from 'fp-ts/lib/function'; 2 | 3 | import type { Nullable } from '../../types'; 4 | 5 | import { dropHash } from './drop-hash'; 6 | 7 | export function withHash(hash: Nullable) { 8 | return (url: string) => 9 | pipe(url, dropHash, str => (hash ? `${str}#${hash}` : str)); 10 | } 11 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-with-id-name.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowIdV } from './sdk-table-row-id.dto'; 4 | 5 | export const SdkTableRowWithIdNameV = z.object({ 6 | id: SdkTableRowIdV, 7 | name: z.string(), 8 | }); 9 | 10 | export type SdkTableRowWithIdNameT = z.infer; 11 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/messages/content/hydrate/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hydrate-result'; 2 | export * from './hydrate-with-app-chat-badges'; 3 | export * from './hydrate-with-chat-actions'; 4 | export * from './hydrate-with-projects-embeddings-badges'; 5 | export * from './hydrate-with-web-search-sources'; 6 | export * from './use-content-hydration'; 7 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/organizations/dto/ai-settings/sdk-upsert-organization-ai-settings.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkUpsertOrganizationAISettingsInputV = z.object({ 4 | chatContext: z.string().nullable(), 5 | }); 6 | 7 | export type SdkUpsertOrganizationAISettingsInputT = z.infer; 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/migrate/database-migrate.config.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { StrictBooleanV } from '@dashhub/commons'; 4 | 5 | export const DatabaseMigrateConfigV = z.object({ 6 | checkMigrationsOnStartup: StrictBooleanV.default(false), 7 | }); 8 | 9 | export type DatabaseMigrateConfigT = z.infer; 10 | -------------------------------------------------------------------------------- /apps/chat/src/modules/pinned-messages/grid/pinned-messages-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | import { GhostPlaceholder } from '~/modules/shared'; 3 | 4 | export function PinnedMessagesPlaceholder() { 5 | const t = useI18n().pack.pinnedMessages.grid; 6 | 7 | return ( 8 | {t.placeholder} 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/card/card-big-actions.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | 3 | type CardBigActionsProps = { 4 | children: ReactNode; 5 | }; 6 | 7 | export function CardBigActions({ children }: CardBigActionsProps) { 8 | return ( 9 |
10 | {children} 11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/helpers/of-unsafe-token.ts: -------------------------------------------------------------------------------- 1 | import * as E from 'fp-ts/lib/Either'; 2 | 3 | import type { SdkJwtTokenT } from '../dto'; 4 | 5 | import { tryDecodeToken } from './try-decode-token'; 6 | 7 | export function ofUnsafeToken(token: string | SdkJwtTokenT) { 8 | return typeof token === 'string' ? tryDecodeToken(token) : E.of(token); 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-table-row-with-uuid-name.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowUuidV } from './sdk-table-row-uuid.dto'; 4 | 5 | export const SdkTableRowWithUuidNameV = z.object({ 6 | id: SdkTableRowUuidV, 7 | name: z.string(), 8 | }); 9 | 10 | export type SdkTableRowWithUuidNameT = z.infer; 11 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/response/sdk-error-response.dto.ts: -------------------------------------------------------------------------------- 1 | import type { SerializedTaggedError } from '@dashhub/commons'; 2 | 3 | export type SdkErrorResponseT = { 4 | error: SerializedTaggedError; 5 | }; 6 | 7 | export function isSdkErrorResponseDto(data: any): data is SdkErrorResponseT { 8 | return !!data && typeof data === 'object' && 'error' in data; 9 | } 10 | -------------------------------------------------------------------------------- /.commitlintrc.ts: -------------------------------------------------------------------------------- 1 | import type { UserConfig } from '@commitlint/types'; 2 | 3 | import { commitlintScopePlugin } from './config/commitlint-scope'; 4 | 5 | export default { 6 | plugins: [commitlintScopePlugin as any], 7 | extends: ['@commitlint/config-conventional'], 8 | rules: { 9 | 'scope-enum': [2, 'always', ['global']], 10 | }, 11 | } satisfies UserConfig; 12 | -------------------------------------------------------------------------------- /apps/chat/src/modules/ai-external-apis/grid/ai-external-apis-placeholder.tsx: -------------------------------------------------------------------------------- 1 | import { useI18n } from '~/i18n'; 2 | import { GhostPlaceholder } from '~/modules/shared'; 3 | 4 | export function AIExternalAPIsPlaceholder() { 5 | const t = useI18n().pack.aiExternalAPIs.grid; 6 | 7 | return ( 8 | {t.placeholder} 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/iterators/create-async-stream-iterator.ts: -------------------------------------------------------------------------------- 1 | export async function* createAsyncStreamIterator( 2 | reader: ReadableStreamDefaultReader, 3 | ): AsyncIterableIterator { 4 | while (true) { 5 | const { done, value } = await reader.read(); 6 | 7 | if (done) { 8 | break; 9 | } 10 | 11 | yield value; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/tap-option.ts: -------------------------------------------------------------------------------- 1 | import { pipe } from 'fp-ts/function'; 2 | import * as O from 'fp-ts/Option'; 3 | 4 | export function tapOption
(fn: (data: A) => void) { 5 | return (task: O.Option): O.Option => 6 | pipe( 7 | task, 8 | O.map((data) => { 9 | fn(data); 10 | return data; 11 | }), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/backend/src/modules/database/index.ts: -------------------------------------------------------------------------------- 1 | export * from './connection'; 2 | export * from './database.config'; 3 | export * from './database.repo'; 4 | export * from './database.tables'; 5 | export * from './errors'; 6 | export * from './helpers'; 7 | export * from './migrate'; 8 | export * from './queries'; 9 | export * from './transaction'; 10 | export * from './types'; 11 | -------------------------------------------------------------------------------- /dockerfiles/app-dev.dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/node:22-alpine 2 | 3 | RUN apk add --no-cache python3 make g++ gcc \ 4 | postgresql-dev 5 | 6 | WORKDIR /app 7 | 8 | COPY package.json package-lock.json ./ 9 | COPY apps ./apps/ 10 | COPY packages ./packages/ 11 | COPY externals ./externals/ 12 | 13 | RUN npm install --no-audit --no-fund 14 | 15 | CMD ["npm", "run", "dev"] 16 | -------------------------------------------------------------------------------- /packages/sdk/src/react-integration/favorites/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-is-sdk-favorite-toggled'; 2 | export * from './use-sdk-non-rerender-subscribe-favorites'; 3 | export * from './use-sdk-on-favorite-action'; 4 | export * from './use-sdk-optimistic-favorites-count'; 5 | export * from './use-sdk-subscribe-favorites-or-throw'; 6 | export * from './use-sdk-toggle-favorite'; 7 | -------------------------------------------------------------------------------- /apps/backend/src/modules/organizations/users/organizations-users.tables.ts: -------------------------------------------------------------------------------- 1 | import type { SdkOrganizationUserRoleT } from '@dashhub/sdk'; 2 | import type { TableId, TableWithDefaultColumns } from '~/modules/database'; 3 | 4 | export type OrganizationsUsersTable = TableWithDefaultColumns & { 5 | organization_id: TableId; 6 | user_id: TableId; 7 | role: SdkOrganizationUserRoleT; 8 | }; 9 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/delay-task-either.ts: -------------------------------------------------------------------------------- 1 | import * as TE from 'fp-ts/lib/TaskEither'; 2 | 3 | import { timeout } from './timeout'; 4 | 5 | export function delayTaskEither(time: number) { 6 | return (task: TE): TE => 7 | TE.chainFirst(() => async () => { 8 | await timeout(time); 9 | return TE.of(void 0) as any; 10 | })(task as any) as TE; 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/dto/sdk-app-from-chat.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from 'zod'; 2 | 3 | import { SdkCreateAppInputV } from './sdk-create-app.dto'; 4 | 5 | export const SdkAppFromChatV = SdkCreateAppInputV.pick({ 6 | name: true, 7 | description: true, 8 | chatContext: true, 9 | }); 10 | 11 | export type SdkAppFromChatT = z.infer; 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/favorites/dto/sdk-search-all-favorites.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowIdV } from '~/shared'; 4 | 5 | export const SdkSearchAllFavoritesInputV = z.object({ 6 | organizationId: SdkTableRowIdV.optional().nullable(), 7 | }); 8 | 9 | export type SdkSearchAllFavoritesInputT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/guards/is-sdk-record-with-creator.ts: -------------------------------------------------------------------------------- 1 | import type { SdkTableRowWithIdT } from '~/shared'; 2 | 3 | export function isSdkRecordWithCreator(record: any): record is WithSdkCreator { 4 | return 'creator' in record && record.creator.id !== undefined; 5 | } 6 | 7 | export type WithSdkCreator = { 8 | creator: SdkTableRowWithIdT; 9 | }; 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/get-first-obj-key-value.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the first key value of an object. 3 | * 4 | * @param obj - The object to get the first key value from. 5 | * @returns The first key value of the object. 6 | */ 7 | export function getFirstObjKeyValue>(obj: O) { 8 | const [key] = Object.keys(obj); 9 | 10 | return obj[key]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-counted-id-record.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from 'zod'; 2 | 3 | import { SdkCountedRecordV } from './sdk-counted-record.dto'; 4 | import { SdkTableRowWithIdV } from './sdk-table-row-with-id.dto'; 5 | 6 | export const SdkCountedIdRecordV = SdkTableRowWithIdV.merge(SdkCountedRecordV); 7 | 8 | export type SdkCountedIdRecordT = z.infer; 9 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/projects-files/dto/sdk-upload-project-file.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowIdV } from '~/shared'; 4 | 5 | export const SdkUploadProjectFileInputV = z.object({ 6 | projectId: SdkTableRowIdV, 7 | file: z.instanceof(File), 8 | }); 9 | 10 | export type SdkUploadProjectFileInputT = z.infer; 11 | -------------------------------------------------------------------------------- /apps/backend/src/modules/api/controllers/health-check.controller.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'tsyringe'; 2 | 3 | import { BaseController } from './shared'; 4 | 5 | @injectable() 6 | export class HealthCheckController extends BaseController { 7 | constructor() { 8 | super(); 9 | 10 | this.router.get(context => context.json({ 11 | status: 'ok', 12 | })); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/backend/src/modules/elasticsearch/mappings/dated-record.mapping.ts: -------------------------------------------------------------------------------- 1 | type Attrs = { 2 | uuid?: boolean; 3 | }; 4 | 5 | export function createBaseDatedRecordMappings( 6 | { uuid }: Attrs = { 7 | uuid: false, 8 | }, 9 | ) { 10 | return { 11 | id: { type: uuid ? 'keyword' : 'integer' }, 12 | created_at: { type: 'date' }, 13 | updated_at: { type: 'date' }, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/controls/input.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from 'react'; 2 | 3 | import clsx from 'clsx'; 4 | 5 | export type InputProps = ComponentProps<'input'>; 6 | 7 | export function Input({ className, ...props }: InputProps) { 8 | return ( 9 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/messages/dto/sdk-request-ai-reply.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowWithIdV } from '~/shared'; 4 | 5 | export const SdkRequestAIReplyInputV = z.object({ 6 | aiModel: SdkTableRowWithIdV, 7 | preferredLanguageCode: z.string().optional(), 8 | }); 9 | 10 | export type SdkRequestAIReplyInputT = z.infer; 11 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/pinned-messages/dto/sdk-pin-message-list-item.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from 'zod'; 2 | 3 | import { SdkTableRowUuidV, SdkTableRowWithIdV } from '~/shared'; 4 | 5 | export const SdkPinMessageListItemV = SdkTableRowWithIdV.extend({ 6 | messageId: SdkTableRowUuidV, 7 | }); 8 | 9 | export type SdkPinMessageListItemT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-ids-array.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowIdV } from './sdk-table-row-id.dto'; 4 | 5 | export const SdkIdsArrayV = z 6 | .union([ 7 | SdkTableRowIdV, 8 | z.array(SdkTableRowIdV), 9 | ]) 10 | .transform(value => Array.isArray(value) ? value : [value]); 11 | 12 | export type SdkIdsArrayT = z.infer; 13 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-translated-string.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SdkTranslatedStringV = z.record(z.string(), z.string()); 4 | 5 | export type SdkTranslatedStringT = z.TypeOf; 6 | 7 | export function sdkPickTranslation(lang: string) { 8 | return (dto: SdkTranslatedStringT) => dto[lang] ?? dto.en ?? ''; 9 | } 10 | -------------------------------------------------------------------------------- /packages/commons/src/helpers/tap-task-option.ts: -------------------------------------------------------------------------------- 1 | import { pipe } from 'fp-ts/lib/function'; 2 | import * as TO from 'fp-ts/TaskOption'; 3 | 4 | export function tapTaskOption(fn: (data: A) => void) { 5 | return (task: TO.TaskOption): TO.TaskOption => 6 | pipe( 7 | task, 8 | TO.map((data) => { 9 | fn(data); 10 | return data; 11 | }), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/dto/sdk-search-installed-apps-metadata.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkIdsArrayV } from '~/shared'; 4 | 5 | export const SdkSearchInstalledAppsMetadataInputV = z.object({ 6 | organizationIds: SdkIdsArrayV.optional(), 7 | }); 8 | 9 | export type SdkSearchInstalledAppsMetadataInputT = z.infer; 10 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/permissions/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sdk-permission-level.dto'; 2 | export * from './sdk-permission-resource.dto'; 3 | export * from './sdk-permission-target.dto'; 4 | export * from './sdk-permission.dto'; 5 | export * from './sdk-table-row-with-permissions.dto'; 6 | export * from './sdk-upsert-permission.dto'; 7 | export * from './sdk-upsert-table-row-with-permissions.dto'; 8 | -------------------------------------------------------------------------------- /apps/chat/src/modules/chats/conversation/hooks/use-scroll-flickering-indicator.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | 3 | import { useTimeout } from '@dashhub/commons-front'; 4 | 5 | export function useScrollFlickeringIndicator() { 6 | const [visible, setVisible] = useState(false); 7 | 8 | useTimeout(() => { 9 | setVisible(true); 10 | }, { time: 100 }); 11 | 12 | return { visible }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/auth/helpers/should-refresh-token.ts: -------------------------------------------------------------------------------- 1 | import * as E from 'fp-ts/lib/Either'; 2 | import { flow } from 'fp-ts/lib/function'; 3 | 4 | import { Time } from '@dashhub/commons'; 5 | 6 | import { ofUnsafeToken } from './of-unsafe-token'; 7 | 8 | export const shouldRefreshToken = flow( 9 | ofUnsafeToken, 10 | E.map(({ exp }) => Date.now() + +Time.toMilliseconds.minutes(3) > exp), 11 | ); 12 | -------------------------------------------------------------------------------- /packages/sdk/src/modules/dashboard/apps/dto/sdk-installed-app-metadata.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowWithIdV, SdkTableRowWithUuidV } from '~/shared'; 4 | 5 | export const SdkInstalledAppMetadataV = z.object({ 6 | app: SdkTableRowWithIdV, 7 | libraryAgent: SdkTableRowWithUuidV, 8 | }); 9 | 10 | export type SdkInstalledAppMetadataT = z.infer; 11 | -------------------------------------------------------------------------------- /packages/sdk/src/shared/dto/sdk-uuids-array.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { SdkTableRowUuidV } from './sdk-table-row-uuid.dto'; 4 | 5 | export const SdkUuidsArrayV = z 6 | .union([ 7 | SdkTableRowUuidV, 8 | z.array(SdkTableRowUuidV), 9 | ]) 10 | .transform(value => Array.isArray(value) ? value : [value]); 11 | 12 | export type SdkUuidsArrayT = z.infer; 13 | -------------------------------------------------------------------------------- /apps/chat/src/ui/components/controls/textarea.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from 'react'; 2 | 3 | import clsx from 'clsx'; 4 | 5 | export type TextAreaProps = ComponentProps<'textarea'>; 6 | 7 | export function TextArea({ className, ...props }: TextAreaProps) { 8 | return ( 9 |