├── .cursor └── mcp.json ├── .dockerignore ├── .env.example ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── BUG-REPORT.yml │ └── FEATURE-REQUEST.yaml └── workflows │ ├── build-and-push-to-registry.yaml │ ├── ci.yaml │ ├── draft-new-release.yaml │ └── publish-new-release.yaml ├── .gitignore ├── .graphqlrc.yaml ├── .npmrc ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── CHANGELOG.md ├── Dockerfile ├── Dockerfile.dev ├── LICENSE ├── README.md ├── apps ├── backend │ ├── .gitignore │ ├── .undb │ │ ├── .gitkeep │ │ └── storage │ │ │ └── .gitkeep │ ├── README.md │ ├── assets │ │ ├── api-reference@1.25.30.js │ │ ├── favicon │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ └── site.webmanifest │ │ └── templates │ │ │ ├── agileDevelopment │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ ├── image2.png │ │ │ └── image3.png │ │ │ ├── crm │ │ │ ├── cover.jpg │ │ │ ├── image1.jpeg │ │ │ ├── image2.jpeg │ │ │ ├── image3.jpeg │ │ │ └── image4.jpeg │ │ │ ├── eventPlanning │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ ├── image2.png │ │ │ ├── image3.png │ │ │ └── image4.png │ │ │ ├── hr │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ ├── image2.png │ │ │ ├── image3.png │ │ │ ├── image4.png │ │ │ └── image5.png │ │ │ ├── officeInventoryManagement │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ ├── image2.png │ │ │ ├── image3.png │ │ │ └── image4.png │ │ │ ├── projectManagement │ │ │ ├── cover.jpg │ │ │ ├── image1.jpeg │ │ │ ├── image2.jpeg │ │ │ └── image3.jpeg │ │ │ ├── remoteWorkManagement │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ └── image2.png │ │ │ ├── salesCrm │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ └── image2.png │ │ │ ├── socialMediaContent │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ └── image2.png │ │ │ └── todo │ │ │ ├── cover.jpg │ │ │ ├── image1.png │ │ │ └── image2.png │ ├── dist │ │ └── .gitkeep │ ├── drizzle │ │ ├── mysql │ │ │ ├── 0000_numerous_stepford_cuckoos.sql │ │ │ └── meta │ │ │ │ ├── 0000_snapshot.json │ │ │ │ └── _journal.json │ │ ├── postgres │ │ │ ├── 0000_low_jimmy_woo.sql │ │ │ └── meta │ │ │ │ ├── 0000_snapshot.json │ │ │ │ └── _journal.json │ │ └── sqlite │ │ │ ├── 0000_lively_warstar.sql │ │ │ ├── 0001_familiar_joshua_kane.sql │ │ │ ├── 0002_fixed_lockjaw.sql │ │ │ ├── 0003_dry_starhawk.sql │ │ │ ├── 0004_tricky_phil_sheldon.sql │ │ │ ├── 0005_narrow_khan.sql │ │ │ ├── 0006_mature_madame_web.sql │ │ │ ├── 0007_steep_dragon_lord.sql │ │ │ ├── 0008_bored_terror.sql │ │ │ ├── 0009_workable_scorpion.sql │ │ │ ├── 0010_nostalgic_nehzno.sql │ │ │ ├── 0011_serious_marvex.sql │ │ │ ├── 0012_lying_tomorrow_man.sql │ │ │ ├── 0013_lovely_mordo.sql │ │ │ ├── 0014_messy_sasquatch.sql │ │ │ ├── 0015_greedy_ben_grimm.sql │ │ │ └── meta │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ ├── 0002_snapshot.json │ │ │ ├── 0003_snapshot.json │ │ │ ├── 0004_snapshot.json │ │ │ ├── 0005_snapshot.json │ │ │ ├── 0006_snapshot.json │ │ │ ├── 0007_snapshot.json │ │ │ ├── 0008_snapshot.json │ │ │ ├── 0009_snapshot.json │ │ │ ├── 0010_snapshot.json │ │ │ ├── 0011_snapshot.json │ │ │ ├── 0012_snapshot.json │ │ │ ├── 0013_snapshot.json │ │ │ ├── 0014_snapshot.json │ │ │ ├── 0015_snapshot.json │ │ │ └── _journal.json │ ├── migrations │ │ └── deployment.json │ ├── package.json │ ├── src │ │ ├── app.ts │ │ ├── index.ts │ │ ├── modules │ │ │ ├── auth │ │ │ │ ├── auth.provider.ts │ │ │ │ ├── auth.service.ts │ │ │ │ ├── auth.ts │ │ │ │ ├── index.ts │ │ │ │ ├── oauth │ │ │ │ │ ├── github.provider.ts │ │ │ │ │ ├── github.ts │ │ │ │ │ ├── google.provider.ts │ │ │ │ │ ├── google.ts │ │ │ │ │ └── oauth.ts │ │ │ │ ├── otp.route.ts │ │ │ │ └── otp.service.ts │ │ │ ├── file │ │ │ │ ├── file.ts │ │ │ │ └── storage │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── local-object-storage.ts │ │ │ │ │ ├── minio-object.storaget.ts │ │ │ │ │ ├── s3-object.storaget.ts │ │ │ │ │ └── storage.registry.ts │ │ │ ├── index.ts │ │ │ ├── mail │ │ │ │ ├── mail.register.ts │ │ │ │ ├── mail.ts │ │ │ │ └── templates │ │ │ │ │ ├── compile.ts │ │ │ │ │ ├── invite.hbs │ │ │ │ │ ├── otp.hbs │ │ │ │ │ ├── reset-password.hbs │ │ │ │ │ └── verify-email.hbs │ │ │ ├── openapi │ │ │ │ ├── auth │ │ │ │ │ └── auth.openapi.ts │ │ │ │ ├── index.ts │ │ │ │ ├── openapi.ts │ │ │ │ └── record.openapi.ts │ │ │ ├── opentelemetry │ │ │ │ └── opentelemetry.module.ts │ │ │ ├── realtime │ │ │ │ ├── index.ts │ │ │ │ └── realtime.ts │ │ │ ├── space │ │ │ │ ├── index.ts │ │ │ │ └── space.module.ts │ │ │ ├── table │ │ │ │ ├── index.ts │ │ │ │ └── table.module.ts │ │ │ ├── template │ │ │ │ └── template.module.ts │ │ │ ├── web │ │ │ │ ├── index.ts │ │ │ │ └── web.tsx │ │ │ └── webhook │ │ │ │ ├── index.ts │ │ │ │ ├── webhook.in-memory.http.service.ts │ │ │ │ ├── webhook.registry.ts │ │ │ │ └── webhook.signature-service.ts │ │ ├── plugins │ │ │ └── logging.ts │ │ ├── registry │ │ │ ├── context.registry.ts │ │ │ ├── db.registry.ts │ │ │ └── index.ts │ │ └── serve.ts │ └── tsconfig.json ├── desktop │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src-tauri │ │ ├── .gitignore │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── binaries │ │ │ └── .gitkeep │ │ ├── build.rs │ │ ├── icons │ │ │ ├── 128x128.png │ │ │ ├── 128x128@2x.png │ │ │ ├── 32x32.png │ │ │ ├── Square107x107Logo.png │ │ │ ├── Square142x142Logo.png │ │ │ ├── Square150x150Logo.png │ │ │ ├── Square284x284Logo.png │ │ │ ├── Square30x30Logo.png │ │ │ ├── Square310x310Logo.png │ │ │ ├── Square44x44Logo.png │ │ │ ├── Square71x71Logo.png │ │ │ ├── Square89x89Logo.png │ │ │ ├── StoreLogo.png │ │ │ ├── icon.icns │ │ │ ├── icon.ico │ │ │ └── icon.png │ │ ├── src │ │ │ └── main.rs │ │ └── tauri.conf.json │ ├── src │ │ ├── assets │ │ │ ├── tauri.svg │ │ │ ├── typescript.svg │ │ │ └── vite.svg │ │ ├── main.ts │ │ └── styles.css │ ├── tsconfig.json │ └── vite.config.ts └── frontend │ ├── .gitignore │ ├── .npmrc │ ├── README.md │ ├── components.json │ ├── houdini.config.js │ ├── package.json │ ├── postcss.config.cjs │ ├── schema.graphql │ ├── src │ ├── app.d.ts │ ├── app.html │ ├── app.pcss │ ├── client.ts │ ├── lib │ │ ├── components │ │ │ ├── blocks │ │ │ │ ├── aggregate │ │ │ │ │ ├── aggregate-type-picker.svelte │ │ │ │ │ ├── aggregate.svelte │ │ │ │ │ └── config │ │ │ │ │ │ └── aggregate-config.svelte │ │ │ │ ├── api-toksn │ │ │ │ │ └── create-api-token-button.svelte │ │ │ │ ├── attachment │ │ │ │ │ └── image-preview.svelte │ │ │ │ ├── audit │ │ │ │ │ ├── audit-list-item-field.svelte │ │ │ │ │ ├── audit-list-item.svelte │ │ │ │ │ ├── audit-list.svelte │ │ │ │ │ ├── audit.gql │ │ │ │ │ └── variants │ │ │ │ │ │ └── rating-audit.svelte │ │ │ │ ├── auth │ │ │ │ │ ├── auth.svelte │ │ │ │ │ ├── login-or-signup.svelte │ │ │ │ │ ├── login-with-otp.svelte │ │ │ │ │ ├── login.svelte │ │ │ │ │ ├── reset-password.svelte │ │ │ │ │ ├── signup.svelte │ │ │ │ │ └── verify-otp.svelte │ │ │ │ ├── base │ │ │ │ │ ├── base-detail.svelte │ │ │ │ │ ├── base-header.svelte │ │ │ │ │ ├── base-setting.svelte │ │ │ │ │ ├── create-base-button.svelte │ │ │ │ │ ├── duplicate-base.svelte │ │ │ │ │ ├── empty-base.svelte │ │ │ │ │ ├── share-base-nav.svelte │ │ │ │ │ ├── update-base-dialog.svelte │ │ │ │ │ └── update-base.svelte │ │ │ │ ├── bulk-update-records │ │ │ │ │ ├── bulk-update-records-button.svelte │ │ │ │ │ ├── bulk-update-records-preview.svelte │ │ │ │ │ └── bulk-update-records.svelte │ │ │ │ ├── calendar-view │ │ │ │ │ ├── calendar-date-remove-button.svelte │ │ │ │ │ ├── calendar-field-form.svelte │ │ │ │ │ ├── calendar-option-button.svelte │ │ │ │ │ ├── calendar-timescale-picker.svelte │ │ │ │ │ ├── calendar-view-day-timeline.svelte │ │ │ │ │ ├── calendar-view-day.svelte │ │ │ │ │ ├── calendar-view-mini-day.svelte │ │ │ │ │ ├── calendar-view-mini-month-control.svelte │ │ │ │ │ ├── calendar-view-mini-month.svelte │ │ │ │ │ ├── calendar-view-month-date-record.svelte │ │ │ │ │ ├── calendar-view-month-date.svelte │ │ │ │ │ ├── calendar-view-month-record.svelte │ │ │ │ │ ├── calendar-view-month-records-filter-picker.svelte │ │ │ │ │ ├── calendar-view-month-records.svelte │ │ │ │ │ ├── calendar-view-month.svelte │ │ │ │ │ ├── calendar-view-toolbar.svelte │ │ │ │ │ ├── calendar-view.svelte │ │ │ │ │ ├── calendar-view.util.ts │ │ │ │ │ ├── select-calendar-field-form.svelte │ │ │ │ │ └── select-calendar-field.svelte │ │ │ │ ├── chart │ │ │ │ │ └── chart.svelte │ │ │ │ ├── command │ │ │ │ │ ├── command.store.ts │ │ │ │ │ └── command.svelte │ │ │ │ ├── create-base │ │ │ │ │ ├── create-base-dialog.svelte │ │ │ │ │ └── create-base.svelte │ │ │ │ ├── create-field │ │ │ │ │ ├── create-field-button.svelte │ │ │ │ │ └── create-field.svelte │ │ │ │ ├── create-record │ │ │ │ │ ├── create-record-button.svelte │ │ │ │ │ ├── create-record-sheet.svelte │ │ │ │ │ └── create-record.svelte │ │ │ │ ├── create-table │ │ │ │ │ ├── create-schema.svelte │ │ │ │ │ ├── create-table-sheet.svelte │ │ │ │ │ └── create-table.svelte │ │ │ │ ├── currency │ │ │ │ │ └── symbol-picker.svelte │ │ │ │ ├── dashboard │ │ │ │ │ ├── create-dashboard-dialog.svelte │ │ │ │ │ ├── create-dialog.svelte │ │ │ │ │ ├── dashboard-widget-share-table.gql │ │ │ │ │ ├── dashboard-widget.svelte │ │ │ │ │ ├── dashboard-widgets.svelte │ │ │ │ │ └── dashboard.svelte │ │ │ │ ├── date │ │ │ │ │ ├── date-formatter-picker.svelte │ │ │ │ │ ├── date-macro-picker.svelte │ │ │ │ │ ├── date-macro.svelte │ │ │ │ │ ├── time-formatter-picker.svelte │ │ │ │ │ └── time-picker.svelte │ │ │ │ ├── delete-record │ │ │ │ │ └── confirm-delete-record.svelte │ │ │ │ ├── delete-table │ │ │ │ │ └── delete-table-dialog.svelte │ │ │ │ ├── developer │ │ │ │ │ └── developer.svelte │ │ │ │ ├── duplicate-record │ │ │ │ │ └── confirm-duplicate-record.svelte │ │ │ │ ├── duplicate-table │ │ │ │ │ └── duplicate-table.svelte │ │ │ │ ├── duration │ │ │ │ │ └── duration-input.svelte │ │ │ │ ├── field-control │ │ │ │ │ ├── attachment-control.svelte │ │ │ │ │ ├── button-control.svelte │ │ │ │ │ ├── checkbox-control.svelte │ │ │ │ │ ├── currency-control.svelte │ │ │ │ │ ├── date-control.svelte │ │ │ │ │ ├── date-range-control.svelte │ │ │ │ │ ├── duration-control.svelte │ │ │ │ │ ├── email-control.svelte │ │ │ │ │ ├── field-control.svelte │ │ │ │ │ ├── id-control.svelte │ │ │ │ │ ├── json-control.svelte │ │ │ │ │ ├── long-text-control.svelte │ │ │ │ │ ├── number-control.svelte │ │ │ │ │ ├── percentage-control.svelte │ │ │ │ │ ├── rating-control.svelte │ │ │ │ │ ├── reference-control.svelte │ │ │ │ │ ├── select-control.svelte │ │ │ │ │ ├── string-control.svelte │ │ │ │ │ ├── url-control.svelte │ │ │ │ │ └── user-control.svelte │ │ │ │ ├── field-icon │ │ │ │ │ ├── field-icon.svelte │ │ │ │ │ ├── number-icon.svelte │ │ │ │ │ └── string-icon.svelte │ │ │ │ ├── field-options │ │ │ │ │ ├── attachment-field-option.svelte │ │ │ │ │ ├── button-field-option.svelte │ │ │ │ │ ├── checkbox-field-option.svelte │ │ │ │ │ ├── create-reference-field-optioin.svelte │ │ │ │ │ ├── currency-field-option.svelte │ │ │ │ │ ├── date-field-option.svelte │ │ │ │ │ ├── date-range-field-option.svelte │ │ │ │ │ ├── duration-field-option.svelte │ │ │ │ │ ├── email-field-option.svelte │ │ │ │ │ ├── field-options.svelte │ │ │ │ │ ├── formula-field-option.svelte │ │ │ │ │ ├── json-field-option.svelte │ │ │ │ │ ├── long-text-field-option.svelte │ │ │ │ │ ├── number-field-option.svelte │ │ │ │ │ ├── percentage-field-option.svelte │ │ │ │ │ ├── rating-field-option.svelte │ │ │ │ │ ├── reference-field-option.svelte │ │ │ │ │ ├── rollup-field-option.svelte │ │ │ │ │ ├── select-field-option.svelte │ │ │ │ │ ├── string-field-option.svelte │ │ │ │ │ ├── update-reference-field-optioin.svelte │ │ │ │ │ ├── url-field-option.svelte │ │ │ │ │ └── user-field-option.svelte │ │ │ │ ├── field-picker │ │ │ │ │ ├── field-picker.svelte │ │ │ │ │ └── field-type-picker.svelte │ │ │ │ ├── field-value │ │ │ │ │ ├── attachment-field.svelte │ │ │ │ │ ├── checkbox-field.svelte │ │ │ │ │ ├── currency-field.svelte │ │ │ │ │ ├── date-field.svelte │ │ │ │ │ ├── date-range-field.svelte │ │ │ │ │ ├── duration-field.svelte │ │ │ │ │ ├── field-value.svelte │ │ │ │ │ ├── formula-field.svelte │ │ │ │ │ ├── id-field.svelte │ │ │ │ │ ├── json-field.svelte │ │ │ │ │ ├── long-text-field.svelte │ │ │ │ │ ├── number-field.svelte │ │ │ │ │ ├── percentage-field.svelte │ │ │ │ │ ├── rating-field.svelte │ │ │ │ │ ├── reference-field-value-item.svelte │ │ │ │ │ ├── reference-field.svelte │ │ │ │ │ ├── rollup-field.svelte │ │ │ │ │ ├── select-field.svelte │ │ │ │ │ ├── string-field.svelte │ │ │ │ │ ├── url-field.svelte │ │ │ │ │ └── user-field.svelte │ │ │ │ ├── field │ │ │ │ │ ├── field-menu.svelte │ │ │ │ │ └── get-rollup-foreign-tables.gql │ │ │ │ ├── filters-editor │ │ │ │ │ ├── condition-group.svelte │ │ │ │ │ ├── conjunction-picker.svelte │ │ │ │ │ ├── field-filter-control.svelte │ │ │ │ │ ├── field-filter-option.svelte │ │ │ │ │ ├── filter-field.svelte │ │ │ │ │ ├── filter-input.svelte │ │ │ │ │ ├── filters-editor.svelte │ │ │ │ │ ├── op-picker.svelte │ │ │ │ │ └── variants │ │ │ │ │ │ ├── date-range-field-filter-option.svelte │ │ │ │ │ │ ├── date-range-scope-picker.svelte │ │ │ │ │ │ ├── get-user-filter-value.gql │ │ │ │ │ │ ├── id-filter-input.svelte │ │ │ │ │ │ ├── option-filter-input.svelte │ │ │ │ │ │ ├── options-filter-input.svelte │ │ │ │ │ │ ├── user-filter-input-component.svelte │ │ │ │ │ │ ├── user-filter-input.svelte │ │ │ │ │ │ └── users-filter-input-component.svelte │ │ │ │ ├── forms │ │ │ │ │ ├── create-form-button.svelte │ │ │ │ │ ├── create-form.svelte │ │ │ │ │ ├── empty-forms.svelte │ │ │ │ │ ├── form-bg-color.ts │ │ │ │ │ ├── form-display.svelte │ │ │ │ │ ├── form-editor.svelte │ │ │ │ │ ├── form-field-options.svelte │ │ │ │ │ ├── form-fields-editor.svelte │ │ │ │ │ ├── form-option.svelte │ │ │ │ │ ├── form-readonly.svelte │ │ │ │ │ ├── forms-readonly.svelte │ │ │ │ │ └── forms.svelte │ │ │ │ ├── gallery-view │ │ │ │ │ ├── gallery-option-button.svelte │ │ │ │ │ ├── gallery-view-card.svelte │ │ │ │ │ ├── gallery-view-cards.svelte │ │ │ │ │ ├── gallery-view-empty.svelte │ │ │ │ │ ├── gallery-view-field-form.svelte │ │ │ │ │ ├── gallery-view-field.svelte │ │ │ │ │ ├── gallery-view-loading.svelte │ │ │ │ │ └── gallery-view.svelte │ │ │ │ ├── grid-view │ │ │ │ │ ├── editable-cell │ │ │ │ │ │ ├── attachment-cell.svelte │ │ │ │ │ │ ├── button-cell.svelte │ │ │ │ │ │ ├── checkbox-cell.svelte │ │ │ │ │ │ ├── currency-cell.svelte │ │ │ │ │ │ ├── date-cell.svelte │ │ │ │ │ │ ├── date-range-cell.svelte │ │ │ │ │ │ ├── duration-cell.svelte │ │ │ │ │ │ ├── email-cell.svelte │ │ │ │ │ │ ├── formula-cell.svelte │ │ │ │ │ │ ├── json-cell.svelte │ │ │ │ │ │ ├── long-text-cell.svelte │ │ │ │ │ │ ├── number-cell.svelte │ │ │ │ │ │ ├── percentage-cell.svelte │ │ │ │ │ │ ├── rating-cell.svelte │ │ │ │ │ │ ├── readonly-user-cell.svelte │ │ │ │ │ │ ├── reference-cell.svelte │ │ │ │ │ │ ├── rollup-cell.svelte │ │ │ │ │ │ ├── select-cell.svelte │ │ │ │ │ │ ├── string-cell.svelte │ │ │ │ │ │ ├── url-cell.svelte │ │ │ │ │ │ └── user-cell.svelte │ │ │ │ │ ├── grid-view-action-header.svelte │ │ │ │ │ ├── grid-view-actions.svelte │ │ │ │ │ ├── grid-view-cell.svelte │ │ │ │ │ ├── grid-view-checkbox.svelte │ │ │ │ │ ├── grid-view-data-table.svelte │ │ │ │ │ ├── grid-view-empty.svelte │ │ │ │ │ ├── grid-view-footer.svelte │ │ │ │ │ ├── grid-view-header.svelte │ │ │ │ │ ├── grid-view-open.svelte │ │ │ │ │ ├── grid-view-pagination.svelte │ │ │ │ │ ├── grid-view.store.ts │ │ │ │ │ ├── grid-view.svelte │ │ │ │ │ ├── grid-view.util.ts │ │ │ │ │ └── selected-records-button.svelte │ │ │ │ ├── import-table │ │ │ │ │ ├── import-table-dialog.svelte │ │ │ │ │ └── import-table.svelte │ │ │ │ ├── invitations │ │ │ │ │ ├── invitations-list-button.svelte │ │ │ │ │ ├── invitations-list.svelte │ │ │ │ │ └── invitations.gql │ │ │ │ ├── invite │ │ │ │ │ └── invite-button.svelte │ │ │ │ ├── json │ │ │ │ │ └── json-dropdown.svelte │ │ │ │ ├── kanban-view │ │ │ │ │ ├── kanban-card.svelte │ │ │ │ │ ├── kanban-option-button.svelte │ │ │ │ │ ├── kanban-skeleton.svelte │ │ │ │ │ ├── kanban-view.svelte │ │ │ │ │ ├── select-kanban-collapsed-lane.svelte │ │ │ │ │ ├── select-kanban-field-form.svelte │ │ │ │ │ ├── select-kanban-field.svelte │ │ │ │ │ ├── select-kanban-lane.svelte │ │ │ │ │ ├── select-kanban-requires-single.svelte │ │ │ │ │ └── select-kanban-view.svelte │ │ │ │ ├── language │ │ │ │ │ └── language-picker.svelte │ │ │ │ ├── list-view │ │ │ │ │ ├── list-view-list.svelte │ │ │ │ │ ├── list-view-loading.svelte │ │ │ │ │ └── list-view.svelte │ │ │ │ ├── member │ │ │ │ │ ├── get-role-bg-color.ts │ │ │ │ │ ├── member-menu.svelte │ │ │ │ │ ├── member-setting.svelte │ │ │ │ │ ├── members-table.svelte │ │ │ │ │ └── role.svelte │ │ │ │ ├── nav │ │ │ │ │ └── nav-tools.svelte │ │ │ │ ├── openapi │ │ │ │ │ └── openapi.svelte │ │ │ │ ├── option │ │ │ │ │ ├── option-editor.svelte │ │ │ │ │ ├── option-picker.svelte │ │ │ │ │ ├── option.svelte │ │ │ │ │ └── options-picker.svelte │ │ │ │ ├── pivot-view │ │ │ │ │ ├── pivot-aggregate-picker.svelte │ │ │ │ │ ├── pivot-option-button.svelte │ │ │ │ │ ├── pivot-view-data.svelte │ │ │ │ │ ├── pivot-view-option-form.svelte │ │ │ │ │ ├── pivot-view-option.svelte │ │ │ │ │ ├── pivot-view-toolbar.svelte │ │ │ │ │ └── pivot-view.svelte │ │ │ │ ├── playground │ │ │ │ │ ├── playground-alert.svelte │ │ │ │ │ ├── playground-menubar.svelte │ │ │ │ │ ├── playground-space-button.svelte │ │ │ │ │ └── playground.svelte │ │ │ │ ├── record-detail │ │ │ │ │ ├── record-detail-menu.svelte │ │ │ │ │ ├── record-detail-sheet.svelte │ │ │ │ │ ├── record-detail.svelte │ │ │ │ │ ├── share-record-detail-sheet.svelte │ │ │ │ │ └── table-record-detail-sheet.svelte │ │ │ │ ├── record-updating │ │ │ │ │ └── record-updating.svelte │ │ │ │ ├── reference │ │ │ │ │ ├── create-foreign-record-button.svelte │ │ │ │ │ ├── foreign-record-detail-button.svelte │ │ │ │ │ ├── foreign-records-picker-dropdown.svelte │ │ │ │ │ ├── foreign-records-picker.svelte │ │ │ │ │ └── foreign-table-picker.svelte │ │ │ │ ├── relations │ │ │ │ │ ├── relations.svelte │ │ │ │ │ └── table-node.svelte │ │ │ │ ├── rls │ │ │ │ │ ├── create-rls-button.svelte │ │ │ │ │ ├── create-rls-dialog.svelte │ │ │ │ │ ├── create-rls.svelte │ │ │ │ │ ├── empty-rls.svelte │ │ │ │ │ ├── rls-card.svelte │ │ │ │ │ ├── rls-list.svelte │ │ │ │ │ ├── rls.svelte │ │ │ │ │ └── update-rls.svelte │ │ │ │ ├── role │ │ │ │ │ └── role-picker.svelte │ │ │ │ ├── rollup │ │ │ │ │ └── rollup-fn-picker.svelte │ │ │ │ ├── search │ │ │ │ │ └── records-search.svelte │ │ │ │ ├── share │ │ │ │ │ ├── share-button.svelte │ │ │ │ │ ├── share-calendar-view.svelte │ │ │ │ │ ├── share-form-button.svelte │ │ │ │ │ ├── share-gallery-view.svelte │ │ │ │ │ ├── share-grid-view.svelte │ │ │ │ │ ├── share-kanban-view.svelte │ │ │ │ │ ├── share-list-view.svelte │ │ │ │ │ ├── share-pivot-view.svelte │ │ │ │ │ ├── share-view-button.svelte │ │ │ │ │ └── share-view-page.svelte │ │ │ │ ├── space │ │ │ │ │ ├── space-dropdown.svelte │ │ │ │ │ └── space-setting.svelte │ │ │ │ ├── table-header │ │ │ │ │ ├── share-table-header.svelte │ │ │ │ │ └── table-header.svelte │ │ │ │ ├── table-picker │ │ │ │ │ ├── table-picker.svelte │ │ │ │ │ └── tables.gql │ │ │ │ ├── table-tools │ │ │ │ │ ├── share-table-tools.svelte │ │ │ │ │ └── table-tools.svelte │ │ │ │ ├── tables-nav │ │ │ │ │ └── tables-nav.svelte │ │ │ │ ├── template │ │ │ │ │ ├── template-card.svelte │ │ │ │ │ ├── template-header.svelte │ │ │ │ │ ├── template-list-sheet.svelte │ │ │ │ │ ├── template-list.svelte │ │ │ │ │ └── template-preview.svelte │ │ │ │ ├── update-field │ │ │ │ │ ├── update-field-button.svelte │ │ │ │ │ └── update-field.svelte │ │ │ │ ├── update-table │ │ │ │ │ ├── update-table-dialog.svelte │ │ │ │ │ └── update-table.svelte │ │ │ │ ├── user │ │ │ │ │ ├── get-member.gql │ │ │ │ │ ├── get-users.gql │ │ │ │ │ ├── user-card.svelte │ │ │ │ │ ├── user-macro.svelte │ │ │ │ │ ├── user-picker.svelte │ │ │ │ │ └── users-picker.svelte │ │ │ │ ├── view-color-editor │ │ │ │ │ └── view-color-editor.svelte │ │ │ │ ├── view-fields │ │ │ │ │ └── view-fields.svelte │ │ │ │ ├── view-filter-editor │ │ │ │ │ └── view-filter-editor.svelte │ │ │ │ ├── view-sort │ │ │ │ │ ├── sort-picker.svelte │ │ │ │ │ └── view-sort.svelte │ │ │ │ ├── view-widget │ │ │ │ │ ├── view-widget-button.svelte │ │ │ │ │ └── view-widget-sheet.svelte │ │ │ │ ├── view │ │ │ │ │ ├── create-view-button.svelte │ │ │ │ │ ├── delete-view-dialog.svelte │ │ │ │ │ ├── duplicate-view-dialog.svelte │ │ │ │ │ ├── duplicate-view.svelte │ │ │ │ │ ├── set-as-default-view.svelte │ │ │ │ │ ├── update-view-dialog.svelte │ │ │ │ │ ├── update-view.svelte │ │ │ │ │ ├── view-icon.svelte │ │ │ │ │ ├── view-pagination.svelte │ │ │ │ │ ├── view-type-picker.svelte │ │ │ │ │ └── view.svelte │ │ │ │ ├── webhook │ │ │ │ │ ├── create-webhook-button.svelte │ │ │ │ │ ├── create-webhook-dialog.svelte │ │ │ │ │ ├── create-webhook.svelte │ │ │ │ │ ├── empty-webhook.svelte │ │ │ │ │ ├── webhook-card.svelte │ │ │ │ │ └── webhook.svelte │ │ │ │ └── widget │ │ │ │ │ ├── add-dashboard-widget-button.svelte │ │ │ │ │ ├── add-dashboard-widget.svelte │ │ │ │ │ ├── create-view-widget-form.svelte │ │ │ │ │ ├── widget-type-picker.svelte │ │ │ │ │ └── widget.svelte │ │ │ ├── formula │ │ │ │ ├── formula-cursor.visitor.ts │ │ │ │ ├── formula-editor.svelte │ │ │ │ ├── plugins │ │ │ │ │ └── varaible.plugin.ts │ │ │ │ └── style.ts │ │ │ ├── tiptap │ │ │ │ ├── tiptap.css │ │ │ │ └── tiptap.svelte │ │ │ └── ui │ │ │ │ ├── accordion │ │ │ │ ├── accordion-content.svelte │ │ │ │ ├── accordion-item.svelte │ │ │ │ ├── accordion-trigger.svelte │ │ │ │ └── index.ts │ │ │ │ ├── alert-dialog │ │ │ │ ├── alert-dialog-action.svelte │ │ │ │ ├── alert-dialog-cancel.svelte │ │ │ │ ├── alert-dialog-content.svelte │ │ │ │ ├── alert-dialog-description.svelte │ │ │ │ ├── alert-dialog-footer.svelte │ │ │ │ ├── alert-dialog-header.svelte │ │ │ │ ├── alert-dialog-overlay.svelte │ │ │ │ ├── alert-dialog-portal.svelte │ │ │ │ ├── alert-dialog-title.svelte │ │ │ │ └── index.ts │ │ │ │ ├── alert │ │ │ │ ├── alert-description.svelte │ │ │ │ ├── alert-title.svelte │ │ │ │ ├── alert.svelte │ │ │ │ └── index.ts │ │ │ │ ├── aspect-ratio │ │ │ │ ├── aspect-ratio.svelte │ │ │ │ └── index.ts │ │ │ │ ├── avatar │ │ │ │ ├── avatar-fallback.svelte │ │ │ │ ├── avatar-image.svelte │ │ │ │ ├── avatar.svelte │ │ │ │ └── index.ts │ │ │ │ ├── badge │ │ │ │ ├── badge.svelte │ │ │ │ └── index.ts │ │ │ │ ├── breadcrumb │ │ │ │ ├── breadcrumb-ellipsis.svelte │ │ │ │ ├── breadcrumb-item.svelte │ │ │ │ ├── breadcrumb-link.svelte │ │ │ │ ├── breadcrumb-list.svelte │ │ │ │ ├── breadcrumb-page.svelte │ │ │ │ ├── breadcrumb-separator.svelte │ │ │ │ ├── breadcrumb.svelte │ │ │ │ └── index.ts │ │ │ │ ├── button │ │ │ │ ├── button.svelte │ │ │ │ └── index.ts │ │ │ │ ├── calendar │ │ │ │ ├── calendar-cell.svelte │ │ │ │ ├── calendar-day.svelte │ │ │ │ ├── calendar-grid-body.svelte │ │ │ │ ├── calendar-grid-head.svelte │ │ │ │ ├── calendar-grid-row.svelte │ │ │ │ ├── calendar-grid.svelte │ │ │ │ ├── calendar-head-cell.svelte │ │ │ │ ├── calendar-header.svelte │ │ │ │ ├── calendar-heading.svelte │ │ │ │ ├── calendar-months.svelte │ │ │ │ ├── calendar-next-button.svelte │ │ │ │ ├── calendar-prev-button.svelte │ │ │ │ ├── calendar.svelte │ │ │ │ └── index.ts │ │ │ │ ├── card │ │ │ │ ├── card-content.svelte │ │ │ │ ├── card-description.svelte │ │ │ │ ├── card-footer.svelte │ │ │ │ ├── card-header.svelte │ │ │ │ ├── card-title.svelte │ │ │ │ ├── card.svelte │ │ │ │ └── index.ts │ │ │ │ ├── carousel │ │ │ │ ├── carousel-content.svelte │ │ │ │ ├── carousel-item.svelte │ │ │ │ ├── carousel-next.svelte │ │ │ │ ├── carousel-previous.svelte │ │ │ │ ├── carousel.svelte │ │ │ │ ├── context.ts │ │ │ │ └── index.ts │ │ │ │ ├── checkbox │ │ │ │ ├── checkbox.svelte │ │ │ │ └── index.ts │ │ │ │ ├── collapsible │ │ │ │ ├── collapsible-content.svelte │ │ │ │ └── index.ts │ │ │ │ ├── color-picker │ │ │ │ ├── color-item.svelte │ │ │ │ ├── color-picker.svelte │ │ │ │ └── index.ts │ │ │ │ ├── command │ │ │ │ ├── command-dialog.svelte │ │ │ │ ├── command-empty.svelte │ │ │ │ ├── command-group.svelte │ │ │ │ ├── command-input.svelte │ │ │ │ ├── command-item.svelte │ │ │ │ ├── command-list.svelte │ │ │ │ ├── command-separator.svelte │ │ │ │ ├── command-shortcut.svelte │ │ │ │ ├── command.svelte │ │ │ │ └── index.ts │ │ │ │ ├── context-menu │ │ │ │ ├── context-menu-checkbox-item.svelte │ │ │ │ ├── context-menu-content.svelte │ │ │ │ ├── context-menu-item.svelte │ │ │ │ ├── context-menu-label.svelte │ │ │ │ ├── context-menu-radio-group.svelte │ │ │ │ ├── context-menu-radio-item.svelte │ │ │ │ ├── context-menu-separator.svelte │ │ │ │ ├── context-menu-shortcut.svelte │ │ │ │ ├── context-menu-sub-content.svelte │ │ │ │ ├── context-menu-sub-trigger.svelte │ │ │ │ └── index.ts │ │ │ │ ├── dialog │ │ │ │ ├── dialog-content.svelte │ │ │ │ ├── dialog-description.svelte │ │ │ │ ├── dialog-footer.svelte │ │ │ │ ├── dialog-header.svelte │ │ │ │ ├── dialog-overlay.svelte │ │ │ │ ├── dialog-portal.svelte │ │ │ │ ├── dialog-title.svelte │ │ │ │ └── index.ts │ │ │ │ ├── drawer │ │ │ │ ├── drawer-content.svelte │ │ │ │ ├── drawer-description.svelte │ │ │ │ ├── drawer-footer.svelte │ │ │ │ ├── drawer-header.svelte │ │ │ │ ├── drawer-nested.svelte │ │ │ │ ├── drawer-overlay.svelte │ │ │ │ ├── drawer-title.svelte │ │ │ │ ├── drawer.svelte │ │ │ │ └── index.ts │ │ │ │ ├── dropdown-menu │ │ │ │ ├── dropdown-menu-checkbox-item.svelte │ │ │ │ ├── dropdown-menu-content.svelte │ │ │ │ ├── dropdown-menu-item.svelte │ │ │ │ ├── dropdown-menu-label.svelte │ │ │ │ ├── dropdown-menu-radio-group.svelte │ │ │ │ ├── dropdown-menu-radio-item.svelte │ │ │ │ ├── dropdown-menu-separator.svelte │ │ │ │ ├── dropdown-menu-shortcut.svelte │ │ │ │ ├── dropdown-menu-sub-content.svelte │ │ │ │ ├── dropdown-menu-sub-trigger.svelte │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ ├── form-button.svelte │ │ │ │ ├── form-description.svelte │ │ │ │ ├── form-element-field.svelte │ │ │ │ ├── form-field-errors.svelte │ │ │ │ ├── form-field.svelte │ │ │ │ ├── form-fieldset.svelte │ │ │ │ ├── form-label.svelte │ │ │ │ ├── form-legend.svelte │ │ │ │ └── index.ts │ │ │ │ ├── hover-card │ │ │ │ ├── hover-card-content.svelte │ │ │ │ └── index.ts │ │ │ │ ├── input │ │ │ │ ├── index.ts │ │ │ │ ├── input.svelte │ │ │ │ ├── number-input.svelte │ │ │ │ └── password-input.svelte │ │ │ │ ├── label │ │ │ │ ├── index.ts │ │ │ │ └── label.svelte │ │ │ │ ├── menubar │ │ │ │ ├── index.ts │ │ │ │ ├── menubar-checkbox-item.svelte │ │ │ │ ├── menubar-content.svelte │ │ │ │ ├── menubar-item.svelte │ │ │ │ ├── menubar-label.svelte │ │ │ │ ├── menubar-radio-item.svelte │ │ │ │ ├── menubar-separator.svelte │ │ │ │ ├── menubar-shortcut.svelte │ │ │ │ ├── menubar-sub-content.svelte │ │ │ │ ├── menubar-sub-trigger.svelte │ │ │ │ ├── menubar-trigger.svelte │ │ │ │ └── menubar.svelte │ │ │ │ ├── pagination │ │ │ │ ├── index.ts │ │ │ │ ├── pagination-content.svelte │ │ │ │ ├── pagination-ellipsis.svelte │ │ │ │ ├── pagination-item.svelte │ │ │ │ ├── pagination-link.svelte │ │ │ │ ├── pagination-next-button.svelte │ │ │ │ ├── pagination-prev-button.svelte │ │ │ │ └── pagination.svelte │ │ │ │ ├── popover │ │ │ │ ├── index.ts │ │ │ │ └── popover-content.svelte │ │ │ │ ├── progress │ │ │ │ ├── index.ts │ │ │ │ └── progress.svelte │ │ │ │ ├── radio-group │ │ │ │ ├── index.ts │ │ │ │ ├── radio-group-item.svelte │ │ │ │ └── radio-group.svelte │ │ │ │ ├── range-calendar │ │ │ │ ├── index.ts │ │ │ │ ├── range-calendar-cell.svelte │ │ │ │ ├── range-calendar-day.svelte │ │ │ │ ├── range-calendar-grid-body.svelte │ │ │ │ ├── range-calendar-grid-head.svelte │ │ │ │ ├── range-calendar-grid-row.svelte │ │ │ │ ├── range-calendar-grid.svelte │ │ │ │ ├── range-calendar-head-cell.svelte │ │ │ │ ├── range-calendar-header.svelte │ │ │ │ ├── range-calendar-heading.svelte │ │ │ │ ├── range-calendar-months.svelte │ │ │ │ ├── range-calendar-next-button.svelte │ │ │ │ ├── range-calendar-prev-button.svelte │ │ │ │ └── range-calendar.svelte │ │ │ │ ├── resizable │ │ │ │ ├── index.ts │ │ │ │ ├── resizable-handle.svelte │ │ │ │ └── resizable-pane-group.svelte │ │ │ │ ├── scroll-area │ │ │ │ ├── index.ts │ │ │ │ ├── scroll-area-scrollbar.svelte │ │ │ │ └── scroll-area.svelte │ │ │ │ ├── select │ │ │ │ ├── index.ts │ │ │ │ ├── select-content.svelte │ │ │ │ ├── select-item.svelte │ │ │ │ ├── select-label.svelte │ │ │ │ ├── select-separator.svelte │ │ │ │ └── select-trigger.svelte │ │ │ │ ├── separator │ │ │ │ ├── index.ts │ │ │ │ └── separator.svelte │ │ │ │ ├── sheet │ │ │ │ ├── index.ts │ │ │ │ ├── sheet-content.svelte │ │ │ │ ├── sheet-description.svelte │ │ │ │ ├── sheet-footer.svelte │ │ │ │ ├── sheet-header.svelte │ │ │ │ ├── sheet-overlay.svelte │ │ │ │ ├── sheet-portal.svelte │ │ │ │ └── sheet-title.svelte │ │ │ │ ├── skeleton │ │ │ │ ├── index.ts │ │ │ │ └── skeleton.svelte │ │ │ │ ├── slider │ │ │ │ ├── index.ts │ │ │ │ └── slider.svelte │ │ │ │ ├── sonner │ │ │ │ ├── index.ts │ │ │ │ └── sonner.svelte │ │ │ │ ├── switch │ │ │ │ ├── index.ts │ │ │ │ └── switch.svelte │ │ │ │ ├── table │ │ │ │ ├── index.ts │ │ │ │ ├── table-body.svelte │ │ │ │ ├── table-caption.svelte │ │ │ │ ├── table-cell.svelte │ │ │ │ ├── table-footer.svelte │ │ │ │ ├── table-head.svelte │ │ │ │ ├── table-header.svelte │ │ │ │ ├── table-row.svelte │ │ │ │ └── table.svelte │ │ │ │ ├── tabs │ │ │ │ ├── index.ts │ │ │ │ ├── tabs-content.svelte │ │ │ │ ├── tabs-list.svelte │ │ │ │ └── tabs-trigger.svelte │ │ │ │ ├── textarea │ │ │ │ ├── index.ts │ │ │ │ └── textarea.svelte │ │ │ │ ├── toggle-group │ │ │ │ ├── index.ts │ │ │ │ ├── toggle-group-item.svelte │ │ │ │ └── toggle-group.svelte │ │ │ │ ├── toggle │ │ │ │ ├── index.ts │ │ │ │ └── toggle.svelte │ │ │ │ └── tooltip │ │ │ │ ├── index.ts │ │ │ │ └── tooltip-content.svelte │ │ ├── graphql │ │ │ ├── fragments │ │ │ │ └── table.fragment.gql │ │ │ ├── get-spaces.gql │ │ │ └── get-table-foreign-tables.gql │ │ ├── images │ │ │ ├── Google.svg │ │ │ ├── github.svg │ │ │ ├── logo.svg │ │ │ ├── svelte-logo.svg │ │ │ ├── svelte-welcome.png │ │ │ └── svelte-welcome.webp │ │ ├── import │ │ │ └── import.helper.ts │ │ ├── registry.svelte.ts │ │ ├── store │ │ │ ├── aggregates.store.ts │ │ │ ├── attachment.store.ts │ │ │ ├── base.store.ts │ │ │ ├── calendar.store.ts │ │ │ ├── dashboard.store.ts │ │ │ ├── data-service.store.ts │ │ │ ├── field.store.ts │ │ │ ├── form.store.ts │ │ │ ├── kanban.store.ts │ │ │ ├── media-query.store.ts │ │ │ ├── modal.store.ts │ │ │ ├── persisted.store.ts │ │ │ ├── playground.svelte.ts │ │ │ ├── records.store.ts │ │ │ ├── share.store.svelte.ts │ │ │ ├── space-member.store.ts │ │ │ ├── space.store.ts │ │ │ ├── tab.store.ts │ │ │ ├── table.store.ts │ │ │ ├── template.store.svelte.ts │ │ │ └── widget.store.ts │ │ ├── trpc │ │ │ └── client.ts │ │ └── utils.ts │ └── routes │ │ ├── (auth) │ │ ├── +layout.svelte │ │ ├── login-with-otp │ │ │ ├── +layout.gql │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── login │ │ │ ├── +layout.gql │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── reset-password │ │ │ └── [token] │ │ │ │ ├── +layout.ts │ │ │ │ └── +page.svelte │ │ ├── signup │ │ │ ├── +layout.gql │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── verify-email │ │ │ └── +page.svelte │ │ └── verify-otp │ │ │ └── +page.svelte │ │ ├── (authed) │ │ ├── (share) │ │ │ └── create-from-share │ │ │ │ └── [shareId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ └── +page.svelte │ │ ├── (space) │ │ │ ├── +layout.gql │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ ├── +page.svelte │ │ │ ├── account │ │ │ │ ├── profile │ │ │ │ │ ├── +layout.svelte │ │ │ │ │ └── +page.svelte │ │ │ │ └── token │ │ │ │ │ └── +page.svelte │ │ │ ├── bases │ │ │ │ └── [baseId] │ │ │ │ │ ├── +layout.gql │ │ │ │ │ ├── +layout.svelte │ │ │ │ │ ├── +layout.ts │ │ │ │ │ ├── +page.svelte │ │ │ │ │ └── setting │ │ │ │ │ ├── +layout.svelte │ │ │ │ │ └── +page.svelte │ │ │ ├── dashboards │ │ │ │ └── [dashboardId] │ │ │ │ │ ├── +layout.gql │ │ │ │ │ ├── +layout.svelte │ │ │ │ │ ├── +layout.ts │ │ │ │ │ └── +page.svelte │ │ │ ├── settings │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.ts │ │ │ │ └── +page.svelte │ │ │ └── t │ │ │ │ └── [tableId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ └── [[viewId]] │ │ │ │ ├── +layout.svelte │ │ │ │ └── +page.svelte │ │ └── +layout.ts │ │ ├── (share) │ │ └── s │ │ │ ├── [d] │ │ │ └── [shareId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ └── +page.svelte │ │ │ ├── b │ │ │ └── [shareId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ ├── +page.svelte │ │ │ │ └── t │ │ │ │ └── [tableId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ └── [[viewId]] │ │ │ │ └── +page.svelte │ │ │ ├── f │ │ │ └── [shareId] │ │ │ │ ├── +layout.gql │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +layout.ts │ │ │ │ └── +page.svelte │ │ │ └── v │ │ │ └── [shareId] │ │ │ ├── +layout.gql │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── (template) │ │ └── templates │ │ │ ├── +layout.ts │ │ │ └── [templateId] │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ ├── +error.svelte │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ └── playground │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ ├── +page.svelte │ │ └── bases │ │ └── [baseId] │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ ├── +page.svelte │ │ ├── d │ │ └── [dashboardId] │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ └── +page.svelte │ │ └── t │ │ └── [tableId] │ │ └── [[viewId]] │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ └── +page.svelte │ ├── static │ ├── favicon.png │ ├── robots.txt │ └── sql-wasm.wasm │ ├── svelte.config.js │ ├── tailwind.config.js │ ├── tsconfig.json │ └── vite.config.ts ├── biome.json ├── bun.lockb ├── bunfig.toml ├── docker-compose.yaml ├── docs └── images │ ├── calendar.jpeg │ ├── form.jpeg │ ├── gallery.jpeg │ ├── intro.jpeg │ ├── kanban.jpeg │ ├── logo.png │ ├── openapi.jpeg │ └── pivot.jpeg ├── drizzle.mysql.config.ts ├── drizzle.postgres.config.ts ├── drizzle.sqlite.config.ts ├── drizzle.turso.config.ts ├── package.json ├── packages ├── audit │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── audit-detail.vo.ts │ │ ├── audit-id.vo.ts │ │ ├── audit.factory.ts │ │ ├── audit.repository.ts │ │ ├── audit.ts │ │ ├── dto │ │ │ ├── audit.dto.ts │ │ │ ├── get-record-audit.dto.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── audit.event-handler.ts │ │ │ ├── audit.service.ts │ │ │ └── index.ts │ │ └── specifications │ │ │ ├── audit-detail.specification.ts │ │ │ ├── audit-from-event.specification.ts │ │ │ ├── audit-id.specification.ts │ │ │ ├── audit-meta.specification.ts │ │ │ ├── audit-op.specification.ts │ │ │ ├── audit-operaotr.specification.ts │ │ │ ├── audit-record-id.specification.ts │ │ │ ├── audit-table-id.specification.ts │ │ │ ├── audit-timestamp.specification.ts │ │ │ ├── index.ts │ │ │ └── interface.ts │ └── tsconfig.json ├── authz │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── member │ │ │ └── member-id.vo.ts │ │ ├── rbac │ │ │ ├── index.ts │ │ │ └── permission.ts │ │ └── space-member │ │ │ ├── dto │ │ │ ├── accept-invitation.dto.ts │ │ │ ├── delete-invitation.dto.ts │ │ │ ├── index.ts │ │ │ ├── invitation.dto.ts │ │ │ ├── invite.dto.ts │ │ │ └── space-member.dto.ts │ │ │ ├── index.ts │ │ │ ├── invitation.do.ts │ │ │ ├── invitation.repository.ts │ │ │ ├── invitation.service.ts │ │ │ ├── invitation.specification.ts │ │ │ ├── space-action.ts │ │ │ ├── space-member.composite-specification.ts │ │ │ ├── space-member.repository.ts │ │ │ ├── space-member.service.ts │ │ │ ├── space-member.ts │ │ │ ├── space-member.visitor.ts │ │ │ ├── space-permission.ts │ │ │ └── specifications │ │ │ ├── index.ts │ │ │ ├── space-member-base-id.specification.ts │ │ │ ├── space-member-email.specification.ts │ │ │ ├── space-member-id.specification.ts │ │ │ ├── space-member-q.specification.ts │ │ │ ├── space-member-space-id.specification.ts │ │ │ └── space-member-user-id.specification.ts │ └── tsconfig.json ├── base │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── base.factory.ts │ │ ├── base.outbox.ts │ │ ├── base.repository.ts │ │ ├── base.ts │ │ ├── dto │ │ │ ├── base.dto.ts │ │ │ ├── create-base.dto.ts │ │ │ ├── delete-base.dto.ts │ │ │ ├── duplicate-base.dto.ts │ │ │ ├── index.ts │ │ │ ├── unique-base.dto.ts │ │ │ └── update-base.dto.ts │ │ ├── events │ │ │ ├── base-created.event.ts │ │ │ └── base-updated.event.ts │ │ ├── fixtures │ │ │ └── base.fixture.ts │ │ ├── index.ts │ │ ├── interface.ts │ │ ├── rules │ │ │ ├── base-name-should-be-unique.rule.ts │ │ │ └── index.ts │ │ ├── specifications │ │ │ ├── base-id.specification.ts │ │ │ ├── base-name.specification.ts │ │ │ ├── base-option.specification.ts │ │ │ ├── base-q.specification.ts │ │ │ ├── base-space-id.specification.ts │ │ │ ├── base.specification.ts │ │ │ └── index.ts │ │ └── value-objects │ │ │ ├── base-id.vo.ts │ │ │ ├── base-name.vo.ts │ │ │ ├── base-option.ts │ │ │ └── index.ts │ └── tsconfig.json ├── command-handlers │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── handlers │ │ │ ├── accept-invitation.command-handler.ts │ │ │ ├── add-dashboard-widget.command-handler.ts │ │ │ ├── bulk-delete-records.command-handler.ts │ │ │ ├── bulk-duplicate-records.command-handler.ts │ │ │ ├── bulk-update-records.command-handler.ts │ │ │ ├── create-api-token.command-handler.ts │ │ │ ├── create-base.command-handler.ts │ │ │ ├── create-dashboard.command-handler.ts │ │ │ ├── create-from-share.command-handler.ts │ │ │ ├── create-from-template.command-handler.ts │ │ │ ├── create-record.command-handler.ts │ │ │ ├── create-records.command-handler.ts │ │ │ ├── create-space.command-handler.ts │ │ │ ├── create-table-field.command-handler.ts │ │ │ ├── create-table-form.command-handler.ts │ │ │ ├── create-table-view.command-handler.ts │ │ │ ├── create-table.command-handler.ts │ │ │ ├── create-view-widget.command-handler.ts │ │ │ ├── create-webhook.command-handler.ts │ │ │ ├── delete-base.command-handler.ts │ │ │ ├── delete-dashboard-widget.command-handler.ts │ │ │ ├── delete-dashboard.command-handler.ts │ │ │ ├── delete-invitation.command-handler.ts │ │ │ ├── delete-record.command-handler.ts │ │ │ ├── delete-space.command-handler.ts │ │ │ ├── delete-table-field.command-handler.ts │ │ │ ├── delete-table-form.command-handler.ts │ │ │ ├── delete-table.command-handler.ts │ │ │ ├── delete-view-widget.command-handler.ts │ │ │ ├── delete-view.command-handler.ts │ │ │ ├── delete-webhook.command-handler.ts │ │ │ ├── disable-share.command-handler.ts │ │ │ ├── duplicate-base.command-handler.ts │ │ │ ├── duplicate-dashboard-widget.command-handler.ts │ │ │ ├── duplicate-dashboard.command-handler.ts │ │ │ ├── duplicate-record.command-handler.ts │ │ │ ├── duplicate-table-field.command-handler.ts │ │ │ ├── duplicate-table-form.command-handler.ts │ │ │ ├── duplicate-table.command-handler.ts │ │ │ ├── duplicate-view-widget.command-handler.ts │ │ │ ├── duplicate-view.command-handler.ts │ │ │ ├── enable-share.command-handler.ts │ │ │ ├── export-view.command-handler.ts │ │ │ ├── index.ts │ │ │ ├── invite.command-handler.ts │ │ │ ├── relayout-dashboard-widgets.command-handler.ts │ │ │ ├── set-default-view.command-handler.ts │ │ │ ├── set-field-width.command-handler.ts │ │ │ ├── set-table-form.command-handler.ts │ │ │ ├── set-table-rls.command-handler.ts │ │ │ ├── set-view-aggregate.command-handler.ts │ │ │ ├── set-view-color.command-handler.ts │ │ │ ├── set-view-fields.command-handler.ts │ │ │ ├── set-view-filter.command-handler.ts │ │ │ ├── set-view-option.command-handler.ts │ │ │ ├── set-view-sort.command-handler.ts │ │ │ ├── submit-form.command-handler.ts │ │ │ ├── trigger-record-button.command-handler.ts │ │ │ ├── update-account.command-handler.ts │ │ │ ├── update-base.command-handler.ts │ │ │ ├── update-dashboard-widget.command-handler.ts │ │ │ ├── update-dashboard.command-handler.ts │ │ │ ├── update-record.command-handler.ts │ │ │ ├── update-space.command-handler.ts │ │ │ ├── update-table-field.command-handler.ts │ │ │ ├── update-table.command-handler.ts │ │ │ ├── update-view-widget.command-handler.ts │ │ │ ├── update-view.command-handler.ts │ │ │ └── update-webhook.command-handler.ts │ │ ├── index.ts │ │ └── registry.ts │ └── tsconfig.json ├── commands │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── accept-invitation.command.ts │ │ ├── add-dashboard-widget.command.ts │ │ ├── bulk-delete-records.command.ts │ │ ├── bulk-duplicate-records.command.ts │ │ ├── bulk-update-records.command.ts │ │ ├── create-api-token.command.ts │ │ ├── create-base.command.ts │ │ ├── create-dashboard.command.ts │ │ ├── create-from-share.command.ts │ │ ├── create-from-template.command.ts │ │ ├── create-record.command.ts │ │ ├── create-records.command.ts │ │ ├── create-space.command.ts │ │ ├── create-table-field.command.ts │ │ ├── create-table-form.command.ts │ │ ├── create-table-view.command.ts │ │ ├── create-table.command.ts │ │ ├── create-view-widget.command.ts │ │ ├── create-webhook.command.ts │ │ ├── delete-base.command.ts │ │ ├── delete-dashboard-widget.command.ts │ │ ├── delete-dashboard.command.ts │ │ ├── delete-form.command.ts │ │ ├── delete-invitation.command.ts │ │ ├── delete-record.command.ts │ │ ├── delete-space.command.ts │ │ ├── delete-table-field.command.ts │ │ ├── delete-table.command.ts │ │ ├── delete-view-widget.command.ts │ │ ├── delete-view.command.ts │ │ ├── delete-webhook.command.ts │ │ ├── disable-share.command.ts │ │ ├── duplicate-base.command.ts │ │ ├── duplicate-dashboard-widget.command.ts │ │ ├── duplicate-dashboard.command.ts │ │ ├── duplicate-record.command.ts │ │ ├── duplicate-table-field.command.ts │ │ ├── duplicate-table-form.command.ts │ │ ├── duplicate-table.command.ts │ │ ├── duplicate-view-widget.command.ts │ │ ├── duplicate-view.command.ts │ │ ├── enable-share.command.ts │ │ ├── export-view.command.ts │ │ ├── index.ts │ │ ├── invite.command.ts │ │ ├── relayout-dashboard-widget.command.ts │ │ ├── set-default-view.command.ts │ │ ├── set-field-width.command.ts │ │ ├── set-table-form.command.ts │ │ ├── set-table-rls.command.ts │ │ ├── set-view-aggregate.command.ts │ │ ├── set-view-color.command.ts │ │ ├── set-view-fields.command.ts │ │ ├── set-view-filter.command.ts │ │ ├── set-view-option.command.ts │ │ ├── set-view-sort.command.ts │ │ ├── submit-form.command.ts │ │ ├── trigger-record-button.command.ts │ │ ├── update-account.command.ts │ │ ├── update-base.command.ts │ │ ├── update-dashboard-widget.command.ts │ │ ├── update-dashboard.command.ts │ │ ├── update-record.command.ts │ │ ├── update-space.command.ts │ │ ├── update-table-field.command.ts │ │ ├── update-table.command.ts │ │ ├── update-view-widget.command.ts │ │ ├── update-view.command.ts │ │ └── update-webhook.command.ts │ └── tsconfig.json ├── context │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── context.type.ts │ │ ├── index.ts │ │ └── server.ts │ └── tsconfig.json ├── cqrs │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── command-bus.ts │ │ ├── decorators │ │ │ ├── command-handler.decorator.ts │ │ │ ├── constants.ts │ │ │ ├── event-handler.decorator.ts │ │ │ ├── index.ts │ │ │ └── query-handler.decorator.ts │ │ ├── default-command-publisher.ts │ │ ├── default-event-publisher.ts │ │ ├── default-query-publisher.ts │ │ ├── event-bus.ts │ │ ├── exceptions │ │ │ ├── command-handler-not-found.exception.ts │ │ │ ├── event-handler-not-found.exception.ts │ │ │ ├── invalid-command-handler.exception.ts │ │ │ ├── invalid-event-handler.exception.ts │ │ │ ├── invalid-query-handler.exception.ts │ │ │ └── query-handler-not-found.exception.ts │ │ ├── index.ts │ │ └── query-bus.ts │ └── tsconfig.json ├── dashboard │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dashboard.do.ts │ │ ├── dashboard.factory.ts │ │ ├── dashboard.outbox.ts │ │ ├── dashboard.repository.ts │ │ ├── dto │ │ │ ├── add-dashboard-widget.dto.ts │ │ │ ├── create-dashboard.dto.ts │ │ │ ├── dashboard.dto.ts │ │ │ ├── delete-dashboard-widget.dto.ts │ │ │ ├── delete-dashboard.dto.ts │ │ │ ├── duplicate-dashboard-widget.dto.ts │ │ │ ├── duplicate-dashboard.dto.ts │ │ │ ├── index.ts │ │ │ ├── relayout-dashboard-widgets.dto.ts │ │ │ ├── unique-dashboard.dto.ts │ │ │ ├── update-dashboard-widget.dto.ts │ │ │ └── update-dashboard.dto.ts │ │ ├── events │ │ │ ├── dashboard-created.event.ts │ │ │ └── dashboard-updated.event.ts │ │ ├── index.ts │ │ ├── interface.ts │ │ ├── rules │ │ │ ├── dashboard-id-should-be-unique.rule.ts │ │ │ ├── dashboard-name-should-be-unique.rule.ts │ │ │ └── index.ts │ │ ├── services │ │ │ ├── dashboard.query-service.provider.ts │ │ │ ├── dashboard.query-service.ts │ │ │ ├── dashboard.service.provider.ts │ │ │ ├── dashboard.service.ts │ │ │ ├── index.ts │ │ │ └── methods │ │ │ │ ├── get-dashboard-by-id.method.ts │ │ │ │ └── get-dashboards.method.ts │ │ ├── specifications │ │ │ ├── dashboard-base-id.specification.ts │ │ │ ├── dashboard-description.specification.ts │ │ │ ├── dashboard-id.specification.ts │ │ │ ├── dashboard-layout.specification.ts │ │ │ ├── dashboard-name.specification.ts │ │ │ ├── dashboard-q.specification.ts │ │ │ ├── dashboard-space-id.specification.ts │ │ │ ├── dashboard-table-id.specification.ts │ │ │ ├── dashboard-unique.specification.ts │ │ │ ├── dashboard-widget.specification.ts │ │ │ ├── dashboard.specification.ts │ │ │ └── index.ts │ │ └── value-objects │ │ │ ├── dashboard-id.vo.ts │ │ │ ├── dashboard-layout.vo.ts │ │ │ ├── dashboard-name.vo.ts │ │ │ ├── dashboard-widgets.vo.ts │ │ │ └── index.ts │ └── tsconfig.json ├── data-service │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── data-service.context.ts │ │ ├── data-service.impl.ts │ │ ├── data-service.provider.ts │ │ ├── data-service.registery.ts │ │ └── index.ts │ └── tsconfig.json ├── di │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── domain │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── aggregate-root.ts │ │ ├── cache.ts │ │ ├── command-bus.ts │ │ ├── command-handler.ts │ │ ├── command-metadata.ts │ │ ├── command-publisher.ts │ │ ├── command.ts │ │ ├── date.vo.ts │ │ ├── email.vo.ts │ │ ├── entity.base.ts │ │ ├── event-bus.ts │ │ ├── event-handler.ts │ │ ├── event-metadata.ts │ │ ├── event-publisher.ts │ │ ├── event.ts │ │ ├── exception.base.ts │ │ ├── exceptions │ │ │ ├── index.ts │ │ │ ├── not-implement.exception.ts │ │ │ └── wont-implement.exception.ts │ │ ├── id.vo.ts │ │ ├── index.ts │ │ ├── mapper.ts │ │ ├── nanoid.vo.ts │ │ ├── order.vo.ts │ │ ├── outbox.ts │ │ ├── pagination.ts │ │ ├── query-bus.ts │ │ ├── query-handler.ts │ │ ├── query-metadata.ts │ │ ├── query-publisher.ts │ │ ├── query.test.ts │ │ ├── query.ts │ │ ├── rule.ts │ │ ├── specification.test.ts │ │ ├── specification.ts │ │ ├── utils.ts │ │ └── value-object.ts │ └── tsconfig.json ├── env │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── event-handlers │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── handlers │ │ │ ├── dashboard-on-field-deleted.event-handler.ts │ │ │ ├── dashboard-on-table-deleted.event-handler.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ └── registry.ts │ └── tsconfig.json ├── formula │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── scripts │ │ └── generate-parser.ts │ ├── src │ │ ├── formula.constants.ts │ │ ├── formula │ │ │ ├── formula.registry.test.ts │ │ │ ├── formula.registry.ts │ │ │ └── formula.type.ts │ │ ├── grammar │ │ │ ├── FormulaLexer.g4 │ │ │ ├── FormulaLexer.interp │ │ │ ├── FormulaLexer.tokens │ │ │ ├── FormulaLexer.ts │ │ │ ├── FormulaParser.g4 │ │ │ ├── FormulaParser.interp │ │ │ ├── FormulaParser.tokens │ │ │ ├── FormulaParser.ts │ │ │ └── FormulaParserVisitor.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── util.ts │ └── tsconfig.json ├── graphql │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── i18n │ ├── .gitignore │ ├── .typesafe-i18n.json │ ├── README.md │ ├── package.json │ ├── src │ │ ├── client.ts │ │ ├── i18n │ │ │ ├── custom-types.ts │ │ │ ├── en │ │ │ │ └── index.ts │ │ │ ├── es │ │ │ │ └── index.ts │ │ │ ├── formatters.ts │ │ │ ├── i18n-detector.ts │ │ │ ├── i18n-node.ts │ │ │ ├── i18n-svelte.ts │ │ │ ├── i18n-types.ts │ │ │ ├── i18n-util.async.ts │ │ │ ├── i18n-util.sync.ts │ │ │ ├── i18n-util.ts │ │ │ ├── ja │ │ │ │ └── index.ts │ │ │ ├── ko │ │ │ │ └── index.ts │ │ │ ├── pt │ │ │ │ └── index.ts │ │ │ └── zh │ │ │ │ └── index.ts │ │ └── server.ts │ └── tsconfig.json ├── logger │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── logger.provider.ts │ └── tsconfig.json ├── mail │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── mail.dto.ts │ │ ├── mail.provider.ts │ │ ├── mail.service.ts │ │ └── mail.template.ts │ └── tsconfig.json ├── openapi │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── api-token │ │ │ ├── api-token-id.vo.ts │ │ │ ├── api-token-token.vo.ts │ │ │ ├── api-token.do.ts │ │ │ ├── api-token.repository.ts │ │ │ ├── api-token.service.ts │ │ │ ├── dto │ │ │ │ ├── api-token.dto.ts │ │ │ │ ├── create-api-token.dto.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ └── specifications │ │ │ │ ├── api-token-id.specification.ts │ │ │ │ ├── api-token-space-id.specification.ts │ │ │ │ ├── api-token-token.specification.ts │ │ │ │ ├── api-token-user-id.specification.ts │ │ │ │ └── index.ts │ │ ├── index.ts │ │ └── openapi │ │ │ └── record.openapi.ts │ └── tsconfig.json ├── persistence │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── abstract-qb.visitor.ts │ │ ├── api-token │ │ │ ├── api-token.filter-visitor.ts │ │ │ ├── api-token.query-repository.ts │ │ │ ├── api-token.repository.ts │ │ │ └── index.ts │ │ ├── audit │ │ │ ├── audit.filter-visitor.ts │ │ │ ├── audit.mapper.ts │ │ │ ├── audit.query-repository.ts │ │ │ ├── audit.repository.ts │ │ │ └── index.ts │ │ ├── base │ │ │ ├── base.filter-visitor.ts │ │ │ ├── base.mapper.ts │ │ │ ├── base.mutate-visitor.ts │ │ │ ├── base.outbox-service.ts │ │ │ ├── base.query-repository.ts │ │ │ ├── base.repository.ts │ │ │ └── index.ts │ │ ├── client.ts │ │ ├── container.ts │ │ ├── ctx.interface.ts │ │ ├── ctx.provider.ts │ │ ├── ctx.ts │ │ ├── dashboard │ │ │ ├── dashboard.filter-visitor.ts │ │ │ ├── dashboard.mapper.ts │ │ │ ├── dashboard.mutate-visitor.ts │ │ │ ├── dashboard.outbox-service.ts │ │ │ ├── dashboard.query-repository.ts │ │ │ ├── dashboard.reference-visitor.ts │ │ │ ├── dashboard.repository.ts │ │ │ └── index.ts │ │ ├── db-client.ts │ │ ├── db.logger.ts │ │ ├── db.provider.ts │ │ ├── db.ts │ │ ├── member │ │ │ ├── index.ts │ │ │ ├── invitation.filter-visitor.ts │ │ │ ├── invitation.mutation-visitor.ts │ │ │ ├── invitation.query-repository.ts │ │ │ ├── invitation.repository.ts │ │ │ ├── member.mapper.ts │ │ │ ├── space-member.filter-visitor.ts │ │ │ ├── space-member.query-repository.ts │ │ │ └── space-member.repository.ts │ │ ├── migrate.client.ts │ │ ├── migrate.server.ts │ │ ├── outbox.mapper.ts │ │ ├── qb.client.ts │ │ ├── qb.provider.ts │ │ ├── qb.server.ts │ │ ├── qb.type.ts │ │ ├── qb.util.ts │ │ ├── record │ │ │ ├── __snapshots__ │ │ │ │ └── record.filter-visitor.test.ts.snap │ │ │ ├── index.ts │ │ │ ├── record-query-creator-visitor.ts │ │ │ ├── record-query-spec-creator-visitor.ts │ │ │ ├── record-query.helper.ts │ │ │ ├── record-reference-visitor.ts │ │ │ ├── record-select-field-visitor.ts │ │ │ ├── record-spec-reference-visitor.ts │ │ │ ├── record-utils.ts │ │ │ ├── record.aggregate-builder.ts │ │ │ ├── record.filter-visitor.ts │ │ │ ├── record.mapper.ts │ │ │ ├── record.mutate-visitor.ts │ │ │ ├── record.outbox-service.ts │ │ │ ├── record.query-repository.ts │ │ │ └── record.repository.ts │ │ ├── schema │ │ │ ├── mysql.ts │ │ │ ├── postgres.ts │ │ │ └── sqlite.ts │ │ ├── server.ts │ │ ├── share │ │ │ ├── index.ts │ │ │ ├── share.filter-visitor.ts │ │ │ ├── share.mapper.ts │ │ │ ├── share.query-repository.ts │ │ │ └── share.repository.ts │ │ ├── space │ │ │ ├── index.ts │ │ │ ├── space.filter-visitor.ts │ │ │ ├── space.mutate-visitor.ts │ │ │ ├── space.query-repository.ts │ │ │ └── space.repository.ts │ │ ├── table │ │ │ ├── __snapshots__ │ │ │ │ └── table.query-visitor.test.ts.snap │ │ │ ├── index.ts │ │ │ ├── table.filter-visitor.ts │ │ │ ├── table.mapper.ts │ │ │ ├── table.mutation-visitor.ts │ │ │ ├── table.outbox-service.ts │ │ │ ├── table.query-repository.ts │ │ │ ├── table.reference-visitor.ts │ │ │ └── table.repository.ts │ │ ├── template │ │ │ ├── index.ts │ │ │ ├── template-data.ts │ │ │ └── template.query-repository.ts │ │ ├── type.ts │ │ ├── underlying │ │ │ ├── conversion │ │ │ │ ├── conversion.constant.ts │ │ │ │ ├── conversion.context.ts │ │ │ │ ├── conversion.factory.ts │ │ │ │ ├── conversion.interface.ts │ │ │ │ ├── noop.strategy.ts │ │ │ │ └── strategies │ │ │ │ │ ├── any-to-currency.strategy.ts │ │ │ │ │ ├── any-to-date-range.strategy.ts │ │ │ │ │ ├── any-to-email.strategy.ts │ │ │ │ │ ├── any-to-number.strategy.ts │ │ │ │ │ ├── any-to-text.strategy.ts │ │ │ │ │ ├── any-to-url.strategy.ts │ │ │ │ │ ├── clear-value.strategy.ts │ │ │ │ │ ├── date-to-date-range.strategy.ts │ │ │ │ │ ├── just-copy.strategy.ts │ │ │ │ │ ├── number-to-boolean.strategy.ts │ │ │ │ │ ├── number-to-date-range.strategy.ts │ │ │ │ │ ├── number-to-date.strategy.ts │ │ │ │ │ ├── select-to-string.strategy.ts │ │ │ │ │ ├── string-to-boolean.strategy.ts │ │ │ │ │ ├── string-to-date-range.strategy.ts │ │ │ │ │ ├── string-to-date.strategy.ts │ │ │ │ │ ├── string-to-select.strategy.ts │ │ │ │ │ ├── string-to-user.strategy.ts │ │ │ │ │ └── user-to-string.strategy.ts │ │ │ ├── reference │ │ │ │ └── join-table.ts │ │ │ ├── underlying-formula.util.ts │ │ │ ├── underlying-formula.visitor.test.ts │ │ │ ├── underlying-formula.visitor.ts │ │ │ ├── underlying-table-field-updated.visitor.ts │ │ │ ├── underlying-table-field.visitor.ts │ │ │ ├── underlying-table-spec.visitor.ts │ │ │ ├── underlying-table.interface.ts │ │ │ ├── underlying-table.service.ts │ │ │ ├── underlying-table.ts │ │ │ └── underlying-table.util.ts │ │ ├── user │ │ │ ├── index.ts │ │ │ ├── user.query-repository.ts │ │ │ └── user.repository.ts │ │ ├── utils │ │ │ └── fn.util.ts │ │ └── webhook │ │ │ ├── index.ts │ │ │ ├── webhook.filter-visitor.ts │ │ │ ├── webhook.mapper.ts │ │ │ ├── webhook.mutation-visitor.ts │ │ │ ├── webhook.query-repository.ts │ │ │ └── webhook.repository.ts │ └── tsconfig.json ├── queries │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── count-records.query.ts │ │ ├── get-aggregates.query.ts │ │ ├── get-api-tokens.query.ts │ │ ├── get-base-by-share.query.ts │ │ ├── get-base-share.query.ts │ │ ├── get-base.query.ts │ │ ├── get-bases.query.ts │ │ ├── get-dashboard-by-id.query.ts │ │ ├── get-dashboard-by-share.query.ts │ │ ├── get-dashboards.query.ts │ │ ├── get-invitations.query.ts │ │ ├── get-member-by-id.query.ts │ │ ├── get-member-spaces.query.ts │ │ ├── get-members-by-ids.query.ts │ │ ├── get-members.query.ts │ │ ├── get-pivot-data.query.ts │ │ ├── get-readable-record-by-id.query.ts │ │ ├── get-readable-records.query.ts │ │ ├── get-record-audits.query.ts │ │ ├── get-record-by-id.query.ts │ │ ├── get-records.query.ts │ │ ├── get-rollup-foreign-tables.query.ts │ │ ├── get-share-aggregate.query.ts │ │ ├── get-share-pivot-data.query.ts │ │ ├── get-share-record-by-id.query.ts │ │ ├── get-share-records.query.ts │ │ ├── get-share.query.ts │ │ ├── get-space-by-id.query.ts │ │ ├── get-space-member.query.ts │ │ ├── get-table-by-share-base.query.ts │ │ ├── get-table-by-share-dashboard.query.ts │ │ ├── get-table-by-share.query.ts │ │ ├── get-table-foreign-tables.query.ts │ │ ├── get-table.query.ts │ │ ├── get-tables-by-base-id.query.ts │ │ ├── get-tables.query.ts │ │ ├── get-template.query.ts │ │ ├── get-templates.query.ts │ │ ├── get-webhooks.query.ts │ │ └── index.ts │ └── tsconfig.json ├── query-handlers │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── handlers │ │ │ ├── count-records.query-handler.ts │ │ │ ├── get-aggregates.query-handler.ts │ │ │ ├── get-api-tokens.query-handler.ts │ │ │ ├── get-base-by-share.query-handler.ts │ │ │ ├── get-base-share.query-handler.ts │ │ │ ├── get-base.query-handler.ts │ │ │ ├── get-bases.query-handler.ts │ │ │ ├── get-dashboard-by-id.query-handler.ts │ │ │ ├── get-dashboard-by-share.query-handler.ts │ │ │ ├── get-dashboards.query-handler.ts │ │ │ ├── get-invitations.query-handler.ts │ │ │ ├── get-member-by-id.query-handler.ts │ │ │ ├── get-member-spaces.query-handler.ts │ │ │ ├── get-members-by-ids.query-handler.ts │ │ │ ├── get-members.query-handler.ts │ │ │ ├── get-pivot-data.query-handler.ts │ │ │ ├── get-readable-record-by-id.query-handler.ts │ │ │ ├── get-readable-records.query-handler.ts │ │ │ ├── get-record-audits.query-handler.ts │ │ │ ├── get-record-by-id.query-handler.ts │ │ │ ├── get-records.query-handler.ts │ │ │ ├── get-rollup-foreign-tables.query-handler.ts │ │ │ ├── get-share-aggregates.query-handler.ts │ │ │ ├── get-share-pivot-data.query-handler.ts │ │ │ ├── get-share-record-by-id.query-handler.ts │ │ │ ├── get-share-records.query-handler.ts │ │ │ ├── get-share.query-handler.ts │ │ │ ├── get-space-by-id.query-handler.ts │ │ │ ├── get-space-member.query-handler.ts │ │ │ ├── get-table-by-share-base.query-handler.ts │ │ │ ├── get-table-by-share-dashboard.query-handler.ts │ │ │ ├── get-table-by-share.query-handler.ts │ │ │ ├── get-table-foreign-tables.query-handler.ts │ │ │ ├── get-table.query-handler.ts │ │ │ ├── get-tables-by-base-id.query-handler.ts │ │ │ ├── get-tables.query-handler.ts │ │ │ ├── get-template.query-handler.ts │ │ │ ├── get-templates.query-handler.ts │ │ │ ├── get-webhooks.query-handler.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ └── registry.ts │ └── tsconfig.json ├── realtime │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── pubsub │ │ │ ├── index.ts │ │ │ ├── pubsub.context.ts │ │ │ └── rxjs.pubsub.ts │ │ └── reply │ │ │ ├── index.ts │ │ │ ├── reply-event.factory.ts │ │ │ ├── reply.service.ts │ │ │ └── topic.ts │ └── tsconfig.json ├── share │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dto │ │ │ ├── disable-share.dto.ts │ │ │ ├── enable-share.dto.ts │ │ │ ├── index.ts │ │ │ └── share.dto.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ ├── share-guard.service.ts │ │ │ └── share.service.ts │ │ ├── share-id.vo.ts │ │ ├── share-target.vo.ts │ │ ├── share.errors.ts │ │ ├── share.factory.ts │ │ ├── share.repository.ts │ │ ├── share.ts │ │ ├── share.util.ts │ │ └── specifications │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ ├── share-enabled.specification.ts │ │ │ ├── share-id.specification.ts │ │ │ ├── share-space-id.specification.ts │ │ │ └── share-target.specification.ts │ └── tsconfig.json ├── space │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dto │ │ │ ├── create-space.dto.ts │ │ │ ├── index.ts │ │ │ ├── space.dto.ts │ │ │ └── update-space.dto.ts │ │ ├── events │ │ │ ├── space-created.event.ts │ │ │ └── space-updated.event.ts │ │ ├── index.ts │ │ ├── interface.ts │ │ ├── space.constant.ts │ │ ├── space.do.ts │ │ ├── space.factory.ts │ │ ├── space.outbox.ts │ │ ├── space.repository.ts │ │ ├── space.service.ts │ │ ├── specifications │ │ │ ├── index.ts │ │ │ ├── space-api-token.specification.ts │ │ │ ├── space-avatar.specification.ts │ │ │ ├── space-base-id.specification.ts │ │ │ ├── space-id.specification.ts │ │ │ ├── space-is-personal.specification.ts │ │ │ ├── space-name.specification.ts │ │ │ ├── space-share-id.specification.ts │ │ │ ├── space-table-id.specification.ts │ │ │ └── space-user-id.specification.ts │ │ └── value-objects │ │ │ ├── index.ts │ │ │ ├── space-avatar.vo.ts │ │ │ ├── space-id.vo.ts │ │ │ └── space-name.vo.ts │ └── tsconfig.json ├── table │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dto │ │ │ ├── create-table-field.dto.ts │ │ │ ├── create-table.dto.ts │ │ │ ├── delete-table-field.dto.ts │ │ │ ├── delete-table.dto.ts │ │ │ ├── delete-view.dto.ts │ │ │ ├── duplicate-table-field.dto.ts │ │ │ ├── duplicate-table.dto.ts │ │ │ ├── duplicate-view.dto.ts │ │ │ ├── index.ts │ │ │ ├── set-default-view.dto.ts │ │ │ ├── set-field-width.dto.ts │ │ │ ├── set-table-form.dto.ts │ │ │ ├── set-table-rls.dto.ts │ │ │ ├── set-view-aggregate.dto.ts │ │ │ ├── set-view-color.dto.ts │ │ │ ├── set-view-fields.dto.ts │ │ │ ├── set-view-filter.dto.ts │ │ │ ├── set-view-option.dto.ts │ │ │ ├── set-view-sort.dto.ts │ │ │ ├── table.dto.ts │ │ │ ├── unique-table.dto.ts │ │ │ ├── update-table-field.dto.ts │ │ │ ├── update-table.dto.ts │ │ │ └── update-view.dto.ts │ │ ├── events │ │ │ ├── field-created.event.ts │ │ │ ├── field-deleted.event.ts │ │ │ ├── field-updated.event.ts │ │ │ ├── index.ts │ │ │ ├── set-table-form.event.ts │ │ │ ├── set-table-rls.event.ts │ │ │ ├── set-view-aggregate.event.ts │ │ │ ├── set-view-color.event.ts │ │ │ ├── set-view-fields.event.ts │ │ │ ├── set-view-filter.event.ts │ │ │ ├── set-view-option.event.ts │ │ │ ├── set-view-sort.event.ts │ │ │ ├── table-created.event.ts │ │ │ ├── table-deleted.event.ts │ │ │ ├── view-created.event.ts │ │ │ ├── view-deleted.event.ts │ │ │ └── view-updated.event.ts │ │ ├── index.ts │ │ ├── methods │ │ │ ├── create-field.method.ts │ │ │ ├── create-form.method.ts │ │ │ ├── create-view.method.ts │ │ │ ├── delete-field.method.ts │ │ │ ├── delete-form.method.ts │ │ │ ├── delete-table.method.ts │ │ │ ├── delete-view.method.ts │ │ │ ├── duplicate-field.method.ts │ │ │ ├── duplicate-form.method.ts │ │ │ ├── duplicate-table.method.ts │ │ │ ├── duplicate-view.method.ts │ │ │ ├── set-default-view.method.ts │ │ │ ├── set-field-width.method.ts │ │ │ ├── set-table-form.method.ts │ │ │ ├── set-table-rls.method.ts │ │ │ ├── set-view-aggregate.method.ts │ │ │ ├── set-view-color.method.ts │ │ │ ├── set-view-fields.method.ts │ │ │ ├── set-view-filter.method.ts │ │ │ ├── set-view-option.method.ts │ │ │ ├── set-view-sort.method.ts │ │ │ ├── update-field.method.ts │ │ │ ├── update-table.method.ts │ │ │ └── update-view.method.ts │ │ ├── modules │ │ │ ├── aggregate │ │ │ │ ├── aggregate.vo.ts │ │ │ │ └── index.ts │ │ │ ├── chart │ │ │ │ ├── chart.vo.ts │ │ │ │ └── index.ts │ │ │ ├── colors │ │ │ │ ├── colors.ts │ │ │ │ ├── colors.vo.ts │ │ │ │ └── index.ts │ │ │ ├── forms │ │ │ │ ├── dto │ │ │ │ │ ├── create-form.dto.ts │ │ │ │ │ ├── delete-form.dto.ts │ │ │ │ │ ├── duplicate-form.dto.ts │ │ │ │ │ ├── forms.dto.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ │ ├── form-field.vo.ts │ │ │ │ │ ├── form-fields.vo.ts │ │ │ │ │ ├── form-id.vo.ts │ │ │ │ │ ├── form-name.vo.ts │ │ │ │ │ ├── form-option.vo.ts │ │ │ │ │ ├── form.vo.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── forms.vo.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── records │ │ │ │ ├── dto │ │ │ │ │ ├── count-records.dto.ts │ │ │ │ │ ├── get-pivot-data.dto.ts │ │ │ │ │ ├── get-record-by-id.dto.ts │ │ │ │ │ ├── get-records.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── record-aggregate.dto.ts │ │ │ │ │ └── records.dto.ts │ │ │ │ ├── events │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── record-created.event.ts │ │ │ │ │ ├── record-deleted.event.ts │ │ │ │ │ ├── record-event.factory.ts │ │ │ │ │ ├── record-event.service.ts │ │ │ │ │ ├── record-events-meta.ts │ │ │ │ │ ├── record-updated.event.ts │ │ │ │ │ └── refine-record-events.ts │ │ │ │ ├── index.ts │ │ │ │ ├── record.util.ts │ │ │ │ ├── record │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── bulk-delete-records.dto.ts │ │ │ │ │ │ ├── bulk-duplicate-records.dto.ts │ │ │ │ │ │ ├── bulk-update-records.dto.ts │ │ │ │ │ │ ├── create-record.dto.ts │ │ │ │ │ │ ├── delete-record.dto.ts │ │ │ │ │ │ ├── duplicate-record.dto.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── record.dto.ts │ │ │ │ │ │ ├── submit-form.dto.ts │ │ │ │ │ │ ├── trigger-record-button.dto.ts │ │ │ │ │ │ └── update-record.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── record-display-values.vo.ts │ │ │ │ │ ├── record-id.vo.ts │ │ │ │ │ ├── record-values.vo.ts │ │ │ │ │ ├── record-visitor.interface.ts │ │ │ │ │ ├── record.composite-specification.ts │ │ │ │ │ ├── record.do.ts │ │ │ │ │ ├── record.outbox-service.provider.ts │ │ │ │ │ ├── record.outbox-service.ts │ │ │ │ │ ├── record.repository.provider.ts │ │ │ │ │ └── record.repository.ts │ │ │ │ ├── records.vo.ts │ │ │ │ ├── services │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── methods │ │ │ │ │ │ ├── bulk-delete-records.method.ts │ │ │ │ │ │ ├── bulk-duplicate-records.method.ts │ │ │ │ │ │ ├── bulk-update-records.method.ts │ │ │ │ │ │ ├── count-records.method.ts │ │ │ │ │ │ ├── create-record.method.ts │ │ │ │ │ │ ├── create-records.method.ts │ │ │ │ │ │ ├── create-tables-records.method.ts │ │ │ │ │ │ ├── delete-record.method.ts │ │ │ │ │ │ ├── duplicate-record.method.ts │ │ │ │ │ │ ├── get-aggregates.method.ts │ │ │ │ │ │ ├── get-pivot-data.method.ts │ │ │ │ │ │ ├── get-readable-record-by-id.method.ts │ │ │ │ │ │ ├── get-readable-records.method.ts │ │ │ │ │ │ ├── get-record-by-id.method.ts │ │ │ │ │ │ ├── get-records.method.ts │ │ │ │ │ │ ├── submit-form.method.ts │ │ │ │ │ │ ├── trigger-record-button.method.ts │ │ │ │ │ │ └── update-record.method.ts │ │ │ │ │ ├── records.query-service.provider.ts │ │ │ │ │ ├── records.query-service.ts │ │ │ │ │ ├── records.service.provider.ts │ │ │ │ │ └── records.service.ts │ │ │ │ └── specification │ │ │ │ │ └── with-q.specification.ts │ │ │ ├── rls │ │ │ │ ├── dto │ │ │ │ │ ├── index.ts │ │ │ │ │ └── rls.dto.ts │ │ │ │ ├── index.ts │ │ │ │ ├── table-rls-action.vo.ts │ │ │ │ ├── table-rls-condition.vo.ts │ │ │ │ ├── table-rls-group.vo.ts │ │ │ │ ├── table-rls-id.vo.ts │ │ │ │ ├── table-rls-subject.vo.ts │ │ │ │ └── table-rls.vo.ts │ │ │ ├── schema │ │ │ │ ├── dto │ │ │ │ │ ├── create-schema.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── schema.dto.ts │ │ │ │ ├── fields │ │ │ │ │ ├── condition │ │ │ │ │ │ ├── abstract-condition.vo.ts │ │ │ │ │ │ ├── base.condition.ts │ │ │ │ │ │ ├── condition.type.ts │ │ │ │ │ │ ├── condition.util.ts │ │ │ │ │ │ ├── field-condition.type.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── create-field.dto.ts │ │ │ │ │ │ ├── default-create-field-dto.ts │ │ │ │ │ │ ├── delete-field.dto.ts │ │ │ │ │ │ ├── duplicate-field.dto.ts │ │ │ │ │ │ ├── field.dto.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── update-field.dto.ts │ │ │ │ │ ├── field-constraint.vo.ts │ │ │ │ │ ├── field-id.vo.ts │ │ │ │ │ ├── field-name.vo.ts │ │ │ │ │ ├── field-value.factory.ts │ │ │ │ │ ├── field-value.ts │ │ │ │ │ ├── field.aggregate.ts │ │ │ │ │ ├── field.factory.ts │ │ │ │ │ ├── field.macro.ts │ │ │ │ │ ├── field.type.ts │ │ │ │ │ ├── field.util.test.ts │ │ │ │ │ ├── field.util.ts │ │ │ │ │ ├── field.visitor.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── option │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── option-id.vo.ts │ │ │ │ │ │ ├── option.vo.ts │ │ │ │ │ │ └── options.vo.ts │ │ │ │ │ ├── rules │ │ │ │ │ │ └── option-name-should-be-unique.rule.ts │ │ │ │ │ └── variants │ │ │ │ │ │ ├── abstract-field.vo.ts │ │ │ │ │ │ ├── abstractions │ │ │ │ │ │ ├── abstract-date-field.condition.ts │ │ │ │ │ │ ├── abstract-date-option.ts │ │ │ │ │ │ ├── abstract-date-value.specification.ts │ │ │ │ │ │ ├── abstract-date-value.visitor.ts │ │ │ │ │ │ ├── abstract-date.aggregate.ts │ │ │ │ │ │ ├── abstract-number-field.condition.ts │ │ │ │ │ │ ├── abstract-number-value.specification.ts │ │ │ │ │ │ ├── abstract-number-value.visitor.ts │ │ │ │ │ │ ├── abstract-number.aggregate.ts │ │ │ │ │ │ ├── abstract-user-field.condition.ts │ │ │ │ │ │ ├── abstract-user-value.specification.ts │ │ │ │ │ │ ├── abstract-user-value.visitor.ts │ │ │ │ │ │ ├── abstract-user.aggregate.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── attachment-field │ │ │ │ │ │ ├── attachment-field-constraint.vo.ts │ │ │ │ │ │ ├── attachment-field-value.visitor.ts │ │ │ │ │ │ ├── attachment-field-value.vo.ts │ │ │ │ │ │ ├── attachment-field.aggregate.ts │ │ │ │ │ │ ├── attachment-field.condition.ts │ │ │ │ │ │ ├── attachment-field.specification.ts │ │ │ │ │ │ ├── attachment-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── autoincrement-field │ │ │ │ │ │ ├── autoincrement-field-value.visitor.ts │ │ │ │ │ │ ├── autoincrement-field-value.vo.ts │ │ │ │ │ │ ├── autoincrement-field.condition.ts │ │ │ │ │ │ ├── autoincrement-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── button-field │ │ │ │ │ │ ├── button-field-value.vo.ts │ │ │ │ │ │ ├── button-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── checkbox-field │ │ │ │ │ │ ├── checkbox-field-constraint.vo.ts │ │ │ │ │ │ ├── checkbox-field-value.visitor.ts │ │ │ │ │ │ ├── checkbox-field-value.vo.ts │ │ │ │ │ │ ├── checkbox-field.aggregate.ts │ │ │ │ │ │ ├── checkbox-field.condition.ts │ │ │ │ │ │ ├── checkbox-field.specification.ts │ │ │ │ │ │ ├── checkbox-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── created-at-field │ │ │ │ │ │ ├── created-at-field-value.visitor.ts │ │ │ │ │ │ ├── created-at-field-value.vo.ts │ │ │ │ │ │ ├── created-at-field.condition.ts │ │ │ │ │ │ ├── created-at-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── created-by-field │ │ │ │ │ │ ├── created-by-field-value.visitor.ts │ │ │ │ │ │ ├── created-by-field-value.vo.ts │ │ │ │ │ │ ├── created-by-field.condition.ts │ │ │ │ │ │ ├── created-by-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── currency-field │ │ │ │ │ │ ├── currency-field-constraint.vo.ts │ │ │ │ │ │ ├── currency-field-value.visitor.ts │ │ │ │ │ │ ├── currency-field-value.vo.ts │ │ │ │ │ │ ├── currency-field.aggregate.ts │ │ │ │ │ │ ├── currency-field.condition.ts │ │ │ │ │ │ ├── currency-field.specification.ts │ │ │ │ │ │ ├── currency-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── date-field │ │ │ │ │ │ ├── date-field-constraint.vo.ts │ │ │ │ │ │ ├── date-field-macro.ts │ │ │ │ │ │ ├── date-field-value.visitor.ts │ │ │ │ │ │ ├── date-field-value.vo.ts │ │ │ │ │ │ ├── date-field.condition.ts │ │ │ │ │ │ ├── date-field.specification.ts │ │ │ │ │ │ ├── date-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── date-range-field │ │ │ │ │ │ ├── date-range-field-constraint.vo.ts │ │ │ │ │ │ ├── date-range-field-value.visitor.ts │ │ │ │ │ │ ├── date-range-field-value.vo.ts │ │ │ │ │ │ ├── date-range-field.aggregate.ts │ │ │ │ │ │ ├── date-range-field.condition.ts │ │ │ │ │ │ ├── date-range-field.specification.ts │ │ │ │ │ │ ├── date-range-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── duration-field │ │ │ │ │ │ ├── duration-field-constraint.vo.ts │ │ │ │ │ │ ├── duration-field-value.visitor.ts │ │ │ │ │ │ ├── duration-field-value.vo.test.ts │ │ │ │ │ │ ├── duration-field-value.vo.ts │ │ │ │ │ │ ├── duration-field.aggregate.ts │ │ │ │ │ │ ├── duration-field.condition.ts │ │ │ │ │ │ ├── duration-field.specification.ts │ │ │ │ │ │ ├── duration-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── email-field │ │ │ │ │ │ ├── email-field-constraint.vo.ts │ │ │ │ │ │ ├── email-field-value.visitor.ts │ │ │ │ │ │ ├── email-field-value.vo.ts │ │ │ │ │ │ ├── email-field.aggregate.ts │ │ │ │ │ │ ├── email-field.condition.ts │ │ │ │ │ │ ├── email-field.specification.ts │ │ │ │ │ │ ├── email-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── formula-field │ │ │ │ │ │ ├── formula-field-value.visitor.ts │ │ │ │ │ │ ├── formula-field-value.vo.ts │ │ │ │ │ │ ├── formula-field.aggregate.ts │ │ │ │ │ │ ├── formula-field.condition.ts │ │ │ │ │ │ ├── formula-field.specification.ts │ │ │ │ │ │ ├── formula-field.vo.ts │ │ │ │ │ │ ├── formula-return-type.visitor.ts │ │ │ │ │ │ ├── formula.util.test.ts │ │ │ │ │ │ ├── formula.util.ts │ │ │ │ │ │ ├── formula.visitor.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── id-field │ │ │ │ │ │ ├── id-field-value.specification.ts │ │ │ │ │ │ ├── id-field-value.visitor.ts │ │ │ │ │ │ ├── id-field-value.vo.ts │ │ │ │ │ │ ├── id-field.aggregate.ts │ │ │ │ │ │ ├── id-field.condition.ts │ │ │ │ │ │ ├── id-field.vo.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── json-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── json-field-constraint.vo.ts │ │ │ │ │ │ ├── json-field-value.visitor.ts │ │ │ │ │ │ ├── json-field-value.vo.ts │ │ │ │ │ │ ├── json-field.aggregate.ts │ │ │ │ │ │ ├── json-field.condition.ts │ │ │ │ │ │ ├── json-field.specification.ts │ │ │ │ │ │ └── json-field.vo.ts │ │ │ │ │ │ ├── long-text-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── long-text-field-constraint.vo.ts │ │ │ │ │ │ ├── long-text-field-value.visitor.ts │ │ │ │ │ │ ├── long-text-field-value.vo.ts │ │ │ │ │ │ ├── long-text-field.aggregate.ts │ │ │ │ │ │ ├── long-text-field.condition.ts │ │ │ │ │ │ ├── long-text-field.specification.ts │ │ │ │ │ │ └── long-text-field.vo.ts │ │ │ │ │ │ ├── number-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── number-field-constraint.vo.ts │ │ │ │ │ │ ├── number-field-value.visitor.ts │ │ │ │ │ │ ├── number-field-value.vo.ts │ │ │ │ │ │ ├── number-field.condition.ts │ │ │ │ │ │ └── number-field.vo.ts │ │ │ │ │ │ ├── percentage-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── percentage-field-constraint.vo.ts │ │ │ │ │ │ ├── percentage-field-value.visitor.ts │ │ │ │ │ │ ├── percentage-field-value.vo.ts │ │ │ │ │ │ ├── percentage-field.aggregate.ts │ │ │ │ │ │ ├── percentage-field.condition.ts │ │ │ │ │ │ ├── percentage-field.specification.ts │ │ │ │ │ │ └── percentage-field.vo.ts │ │ │ │ │ │ ├── rating-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── rating-field-constraint.vo.ts │ │ │ │ │ │ ├── rating-field-value.visitor.ts │ │ │ │ │ │ ├── rating-field-value.vo.ts │ │ │ │ │ │ ├── rating-field.condition.ts │ │ │ │ │ │ ├── rating-field.specification.ts │ │ │ │ │ │ └── rating-field.vo.ts │ │ │ │ │ │ ├── reference-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── reference-field-constraint.vo.ts │ │ │ │ │ │ ├── reference-field-value.specification.ts │ │ │ │ │ │ ├── reference-field-value.visitor.ts │ │ │ │ │ │ ├── reference-field-value.vo.ts │ │ │ │ │ │ ├── reference-field.aggregate.ts │ │ │ │ │ │ ├── reference-field.condition.ts │ │ │ │ │ │ └── reference-field.vo.ts │ │ │ │ │ │ ├── rollup-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── rollup-field-value.visitor.ts │ │ │ │ │ │ ├── rollup-field-value.vo.ts │ │ │ │ │ │ ├── rollup-field.aggregate.ts │ │ │ │ │ │ ├── rollup-field.condition.ts │ │ │ │ │ │ └── rollup-field.vo.ts │ │ │ │ │ │ ├── select-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── select-field-constraint.vo.ts │ │ │ │ │ │ ├── select-field-specification.ts │ │ │ │ │ │ ├── select-field-value.visitor.ts │ │ │ │ │ │ ├── select-field-value.vo.ts │ │ │ │ │ │ ├── select-field.aggregate.ts │ │ │ │ │ │ ├── select-field.condition.ts │ │ │ │ │ │ └── select-field.vo.ts │ │ │ │ │ │ ├── string-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── string-field-constraint.vo.ts │ │ │ │ │ │ ├── string-field-value.specification.ts │ │ │ │ │ │ ├── string-field-value.visitor.ts │ │ │ │ │ │ ├── string-field-value.vo.ts │ │ │ │ │ │ ├── string-field.aggregate.ts │ │ │ │ │ │ ├── string-field.condition.ts │ │ │ │ │ │ └── string-field.vo.ts │ │ │ │ │ │ ├── updated-at-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── updated-at-field-value.visitor.ts │ │ │ │ │ │ ├── updated-at-field-value.vo.ts │ │ │ │ │ │ ├── updated-at-field.condition.ts │ │ │ │ │ │ └── updated-at-field.vo.ts │ │ │ │ │ │ ├── updated-by-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── updated-by-field-value.visitor.ts │ │ │ │ │ │ ├── updated-by-field-value.vo.ts │ │ │ │ │ │ ├── updated-by-field.condition.ts │ │ │ │ │ │ └── updated-by-field.vo.ts │ │ │ │ │ │ ├── url-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── url-field-constraint.vo.ts │ │ │ │ │ │ ├── url-field-value.visitor.ts │ │ │ │ │ │ ├── url-field-value.vo.ts │ │ │ │ │ │ ├── url-field.aggregate.ts │ │ │ │ │ │ ├── url-field.condition.ts │ │ │ │ │ │ ├── url-field.specification.ts │ │ │ │ │ │ └── url-field.vo.ts │ │ │ │ │ │ └── user-field │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── user-field-constraint.vo.ts │ │ │ │ │ │ ├── user-field-macro.ts │ │ │ │ │ │ ├── user-field-value.visitor.ts │ │ │ │ │ │ ├── user-field-value.vo.ts │ │ │ │ │ │ ├── user-field.aggregate.ts │ │ │ │ │ │ ├── user-field.condition.ts │ │ │ │ │ │ └── user-field.vo.ts │ │ │ │ ├── index.ts │ │ │ │ ├── rules │ │ │ │ │ ├── field-id-should-be-unique.rule.ts │ │ │ │ │ ├── field-name-should-be-unique.rule.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── schema.type.ts │ │ │ │ └── schema.vo.ts │ │ │ ├── storage │ │ │ │ ├── index.ts │ │ │ │ ├── storage.provider.ts │ │ │ │ └── storage.ts │ │ │ ├── views │ │ │ │ ├── dto │ │ │ │ │ ├── create-view.dto.ts │ │ │ │ │ ├── export-view.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── views.dto.ts │ │ │ │ ├── index.ts │ │ │ │ ├── view │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view.dto.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── variants │ │ │ │ │ │ ├── abstract-view.vo.ts │ │ │ │ │ │ ├── calendar-view.vo.ts │ │ │ │ │ │ ├── gallery-view.vo.ts │ │ │ │ │ │ ├── grid-view.vo.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── kanban-view.vo.ts │ │ │ │ │ │ ├── list-view.vo.ts │ │ │ │ │ │ └── pivot-view.vo.ts │ │ │ │ │ ├── view-aggregate │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-aggregate.vo.ts │ │ │ │ │ ├── view-color │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-color.vo.ts │ │ │ │ │ ├── view-fields │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-fields.vo.ts │ │ │ │ │ ├── view-filter │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-filter.vo.ts │ │ │ │ │ ├── view-id.vo.ts │ │ │ │ │ ├── view-name.vo.ts │ │ │ │ │ ├── view-option.vo.ts │ │ │ │ │ ├── view-sort │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-sort.vo.ts │ │ │ │ │ ├── view-widget │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── view-widget.dto.ts │ │ │ │ │ ├── view.factory.ts │ │ │ │ │ └── view.type.ts │ │ │ │ └── views.vo.ts │ │ │ └── widgets │ │ │ │ ├── index.ts │ │ │ │ ├── widget-id.vo.ts │ │ │ │ ├── widget-name.vo.ts │ │ │ │ └── widget.vo.ts │ │ ├── rules │ │ │ ├── form-name-should-be-unique.rule.ts │ │ │ ├── table-name-should-be-unique.rule.ts │ │ │ ├── view-name-should-be-unique.rule.ts │ │ │ ├── view-sort-should-be-sortable.rule.ts │ │ │ ├── view-sort-should-not-duplicated.rule.ts │ │ │ └── view-widget-name-should-be-unique.rule.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ ├── methods │ │ │ │ ├── create-table-field.method.ts │ │ │ │ ├── create-table-form.method.ts │ │ │ │ ├── create-table-view.method.ts │ │ │ │ ├── create-table.method.ts │ │ │ │ ├── delete-table-field.method.ts │ │ │ │ ├── delete-table-form.method.ts │ │ │ │ ├── delete-table.method.ts │ │ │ │ ├── duplicate-base.method.ts │ │ │ │ ├── duplicate-table-field.method.ts │ │ │ │ ├── duplicate-table-form.method.ts │ │ │ │ ├── duplicate-table.method.ts │ │ │ │ ├── duplicate-tables.method.ts │ │ │ │ ├── export-view.method.ts │ │ │ │ ├── get-rollup-foreign-tables.method.ts │ │ │ │ ├── get-table-foreign-tables.method.ts │ │ │ │ ├── get-table.method.ts │ │ │ │ ├── get-tables.method.ts │ │ │ │ ├── update-table-field.method.ts │ │ │ │ └── update-table.method.ts │ │ │ ├── table.query-service.provider.ts │ │ │ ├── table.query-service.ts │ │ │ ├── table.service.provider.ts │ │ │ └── table.service.ts │ │ ├── specifications │ │ │ ├── index.ts │ │ │ ├── table-base-id.specification.ts │ │ │ ├── table-forms.specification.ts │ │ │ ├── table-id.specification.ts │ │ │ ├── table-name.specification.ts │ │ │ ├── table-rls.specification.ts │ │ │ ├── table-schema.specification.ts │ │ │ ├── table-space-id.specification.ts │ │ │ ├── table-speficitaion.type.ts │ │ │ ├── table-view.specification.ts │ │ │ ├── table-views.specification.ts │ │ │ ├── table-visitor.interface.ts │ │ │ ├── table.composite-specification.ts │ │ │ └── table.specification.ts │ │ ├── table-id.vo.ts │ │ ├── table-name.vo.ts │ │ ├── table.builder.ts │ │ ├── table.do.ts │ │ ├── table.factory.ts │ │ ├── table.outbox-service.provider.ts │ │ ├── table.outbox-service.ts │ │ ├── table.query-repository.provider.ts │ │ ├── table.repository.provider.ts │ │ └── table.repository.ts │ └── tsconfig.json ├── template │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dto │ │ │ ├── create-from-template.dto.ts │ │ │ ├── get-template.dto.ts │ │ │ ├── index.ts │ │ │ ├── template-schema.dto.ts │ │ │ └── template.dto.ts │ │ ├── index.ts │ │ ├── schema │ │ │ ├── index.ts │ │ │ └── template-schema.schema.ts │ │ ├── service │ │ │ ├── index.ts │ │ │ ├── template.service.provider.ts │ │ │ └── template.service.ts │ │ ├── template.factory.ts │ │ ├── template │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ ├── specifications │ │ │ │ ├── index.ts │ │ │ │ └── template-id.specification.ts │ │ │ ├── template.do.ts │ │ │ ├── template.repository.ts │ │ │ └── value-objects │ │ │ │ ├── template-category.vo.ts │ │ │ │ ├── template-id.vo.ts │ │ │ │ ├── template-name.vo.ts │ │ │ │ └── template-schema-variants.vo.ts │ │ └── templates │ │ │ ├── agileDevelopment.base.json │ │ │ ├── crm.base.json │ │ │ ├── eventPlaning.base.json │ │ │ ├── everything.base.json │ │ │ ├── hr.base.json │ │ │ ├── index.ts │ │ │ ├── officeInventoryManagement.base.json │ │ │ ├── projectManagement.base.json │ │ │ ├── remoteWorkManagement.base.json │ │ │ ├── salesCrm.base.json │ │ │ ├── socialMediaContent.base.json │ │ │ ├── test.base.json │ │ │ └── todoList.base.json │ └── tsconfig.json ├── trpc │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── authz.middleware.ts │ │ ├── index.ts │ │ ├── router.ts │ │ └── trpc.ts │ └── tsconfig.json ├── user │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── user.repository.ts │ │ ├── user.service.ts │ │ └── user.type.ts │ └── tsconfig.json ├── utils │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ │ ├── get-next-name.ts │ │ └── index.ts │ └── tsconfig.json ├── webhook │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dto │ │ │ ├── create-webhook.dto.ts │ │ │ ├── delete-webhook.dto.ts │ │ │ ├── get-webhooks.dto.ts │ │ │ ├── index.ts │ │ │ ├── update-webhook.dto.ts │ │ │ └── webhook.dto.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ ├── webhook-record.event-handler.ts │ │ │ ├── webhook-sign.service.ts │ │ │ └── webhook.http-service.ts │ │ ├── specifications │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ ├── webhook-condition.specification.ts │ │ │ ├── webhook-enabled.specification.ts │ │ │ ├── webhook-headers.specification.ts │ │ │ ├── webhook-id.specification.ts │ │ │ ├── webhook-method.specification.ts │ │ │ ├── webhook-name.specification.ts │ │ │ ├── webhook-tableId.specification.ts │ │ │ └── webhook-url.specification.ts │ │ ├── webhook-headers.vo.ts │ │ ├── webhook-id.vo.ts │ │ ├── webhook-method.vo.ts │ │ ├── webhook-url.vo.ts │ │ ├── webhook.condition.ts │ │ ├── webhook.constants.ts │ │ ├── webhook.factory.ts │ │ ├── webhook.message.ts │ │ ├── webhook.repository.ts │ │ └── webhook.ts │ └── tsconfig.json └── zod │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ └── index.ts │ └── tsconfig.json ├── scripts ├── migrate.ts └── move-assets.ts └── turbo.json /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | Dockerfile* 3 | docker-compose* 4 | .dockerignore 5 | .git 6 | .gitignore 7 | README.md 8 | LICENSE 9 | .vscode 10 | Makefile 11 | helm-charts 12 | .env 13 | .editorconfig 14 | .idea 15 | coverage* 16 | .undb -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | UNDB_BASE_URL=http://localhost:3721 2 | -------------------------------------------------------------------------------- /.graphqlrc.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | default: 3 | schema: 4 | - ./apps/frontend/schema.graphql 5 | - ./apps/frontend/$houdini/graphql/schema.graphql 6 | documents: 7 | - "**/*.gql" 8 | - "**/*.svelte" 9 | - ./apps.frontend/$houdini/graphql/documents.gql 10 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/.npmrc -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["biomejs.biome"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "json.schemas": [ 3 | { 4 | "fileMatch": ["packages/template/src/templates/*.base.json"], 5 | "url": "http://localhost:3721/api/template/base/schema.json" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /Dockerfile.dev: -------------------------------------------------------------------------------- 1 | FROM oven/bun:latest 2 | 3 | WORKDIR /app 4 | 5 | ENV TINI_VERSION v0.19.0 6 | ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini 7 | RUN chmod +x /tini 8 | 9 | COPY . . 10 | 11 | RUN bun install 12 | 13 | EXPOSE 3721 14 | 15 | ENTRYPOINT ["/tini", "--"] 16 | CMD ["bun", "run", "dev"] -------------------------------------------------------------------------------- /apps/backend/.undb/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/.undb/.gitkeep -------------------------------------------------------------------------------- /apps/backend/.undb/storage/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/.undb/storage/.gitkeep -------------------------------------------------------------------------------- /apps/backend/README.md: -------------------------------------------------------------------------------- 1 | # Elysia with Bun runtime 2 | 3 | ## Getting Started 4 | 5 | To get started with this template, simply paste this command into your terminal: 6 | 7 | ```bash 8 | bun create elysia ./elysia-example 9 | ``` 10 | 11 | ## Development 12 | 13 | To start the development server run: 14 | 15 | ```bash 16 | bun run dev 17 | ``` 18 | 19 | Open http://localhost:3721/ with your browser to see the result. 20 | -------------------------------------------------------------------------------- /apps/backend/assets/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/backend/assets/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/backend/assets/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/backend/assets/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/backend/assets/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/backend/assets/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/backend/assets/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "background_color": "#ffffff", 3 | "display": "standalone", 4 | "icons": [ 5 | { "sizes": "192x192", "src": "/assets/favicon/android-chrome-192x192.png", "type": "image/png" }, 6 | { "sizes": "512x512", "src": "/assets/favicon/android-chrome-512x512.png", "type": "image/png" } 7 | ], 8 | "name": "", 9 | "short_name": "", 10 | "theme_color": "#ffffff" 11 | } 12 | -------------------------------------------------------------------------------- /apps/backend/assets/templates/agileDevelopment/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/agileDevelopment/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/agileDevelopment/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/agileDevelopment/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/agileDevelopment/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/agileDevelopment/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/agileDevelopment/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/agileDevelopment/image3.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/crm/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/crm/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/crm/image1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/crm/image1.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/crm/image2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/crm/image2.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/crm/image3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/crm/image3.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/crm/image4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/crm/image4.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/eventPlanning/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/eventPlanning/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/eventPlanning/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/eventPlanning/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/eventPlanning/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/eventPlanning/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/eventPlanning/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/eventPlanning/image3.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/eventPlanning/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/eventPlanning/image4.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/image3.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/image4.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/hr/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/hr/image5.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/officeInventoryManagement/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/officeInventoryManagement/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/officeInventoryManagement/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/officeInventoryManagement/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/officeInventoryManagement/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/officeInventoryManagement/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/officeInventoryManagement/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/officeInventoryManagement/image3.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/officeInventoryManagement/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/officeInventoryManagement/image4.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/projectManagement/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/projectManagement/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/projectManagement/image1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/projectManagement/image1.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/projectManagement/image2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/projectManagement/image2.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/projectManagement/image3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/projectManagement/image3.jpeg -------------------------------------------------------------------------------- /apps/backend/assets/templates/remoteWorkManagement/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/remoteWorkManagement/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/remoteWorkManagement/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/remoteWorkManagement/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/remoteWorkManagement/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/remoteWorkManagement/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/salesCrm/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/salesCrm/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/salesCrm/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/salesCrm/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/salesCrm/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/salesCrm/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/socialMediaContent/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/socialMediaContent/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/socialMediaContent/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/socialMediaContent/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/socialMediaContent/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/socialMediaContent/image2.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/todo/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/todo/cover.jpg -------------------------------------------------------------------------------- /apps/backend/assets/templates/todo/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/todo/image1.png -------------------------------------------------------------------------------- /apps/backend/assets/templates/todo/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/assets/templates/todo/image2.png -------------------------------------------------------------------------------- /apps/backend/dist/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/backend/dist/.gitkeep -------------------------------------------------------------------------------- /apps/backend/drizzle/mysql/meta/_journal.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "7", 3 | "dialect": "mysql", 4 | "entries": [ 5 | { 6 | "idx": 0, 7 | "version": "5", 8 | "when": 1737522284940, 9 | "tag": "0000_numerous_stepford_cuckoos", 10 | "breakpoints": true 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /apps/backend/drizzle/postgres/meta/_journal.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "7", 3 | "dialect": "postgresql", 4 | "entries": [ 5 | { 6 | "idx": 0, 7 | "version": "7", 8 | "when": 1736487832119, 9 | "tag": "0000_low_jimmy_woo", 10 | "breakpoints": true 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0002_fixed_lockjaw.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS `undb_invitation_email_unique`;--> statement-breakpoint 2 | CREATE UNIQUE INDEX `invitation_unique_idx` ON `undb_invitation` (`email`,`space_id`); -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0003_dry_starhawk.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_base` ADD `allow_template` integer DEFAULT false NOT NULL; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0004_tricky_phil_sheldon.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS `undb_api_token_user_id_unique`; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0005_narrow_khan.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_base` DROP COLUMN `allow_template`; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0006_mature_madame_web.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_outbox` ADD `user_id` text;--> statement-breakpoint 2 | ALTER TABLE `undb_outbox` DROP COLUMN `operator_id`; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0007_steep_dragon_lord.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_table` ADD `widgets` text; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0009_workable_scorpion.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_dashboard` ADD `widgets` text;--> statement-breakpoint 2 | ALTER TABLE `undb_dashboard` ADD `layout` text; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0010_nostalgic_nehzno.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `undb_dashboard_table_id_mapping` ( 2 | `dashboard_id` text NOT NULL, 3 | `table_id` text NOT NULL, 4 | PRIMARY KEY(`dashboard_id`, `table_id`), 5 | FOREIGN KEY (`dashboard_id`) REFERENCES `undb_dashboard`(`id`) ON UPDATE no action ON DELETE no action, 6 | FOREIGN KEY (`table_id`) REFERENCES `undb_table`(`id`) ON UPDATE no action ON DELETE no action 7 | ); 8 | -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0012_lying_tomorrow_man.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_dashboard` ADD `description` text; -------------------------------------------------------------------------------- /apps/backend/drizzle/sqlite/0014_messy_sasquatch.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `undb_user` ADD `otp_secret` text; -------------------------------------------------------------------------------- /apps/backend/src/index.ts: -------------------------------------------------------------------------------- 1 | import { serve } from "./serve" 2 | 3 | await serve() 4 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/auth.service.ts: -------------------------------------------------------------------------------- 1 | import { singleton } from "@undb/di" 2 | 3 | @singleton() 4 | export class AuthService { 5 | public authWithPassword() { 6 | return "Hello World" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/backend/src/modules/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./auth" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/file/storage/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./local-object-storage" 2 | export * from "./storage.registry" 3 | -------------------------------------------------------------------------------- /apps/backend/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./auth" 2 | export * from "./openapi" 3 | export * from "./realtime" 4 | export * from "./space" 5 | export * from "./table" 6 | export * from "./web" 7 | export * from "./webhook" 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/mail/mail.register.ts: -------------------------------------------------------------------------------- 1 | import { container } from "@undb/di" 2 | import { MAIL_SERVICE } from "@undb/mail" 3 | import { NodemailerService } from "./mail" 4 | 5 | export const registerMail = () => { 6 | container.register(MAIL_SERVICE, NodemailerService) 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/modules/openapi/auth/auth.openapi.ts: -------------------------------------------------------------------------------- 1 | import { singleton } from "@undb/di" 2 | import Elysia from "elysia" 3 | 4 | @singleton() 5 | export class AuthOpenAPI { 6 | constructor() {} 7 | 8 | public route(app: Elysia) { 9 | return app.get("/auth-with-password", () => { 10 | return "Hello World" 11 | }) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/backend/src/modules/openapi/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./openapi" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/realtime/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./realtime" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/space/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./space.module" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./table.module" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/web/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./web" 2 | -------------------------------------------------------------------------------- /apps/backend/src/modules/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./webhook.in-memory.http.service" 2 | export * from "./webhook.registry" 3 | -------------------------------------------------------------------------------- /apps/backend/src/plugins/logging.ts: -------------------------------------------------------------------------------- 1 | import { createLogger } from "@undb/logger" 2 | import Elysia from "elysia" 3 | import pkg from "../../package.json" 4 | 5 | export const loggerPlugin = () => new Elysia().decorate("logger", createLogger(pkg.name)) 6 | -------------------------------------------------------------------------------- /apps/backend/src/registry/context.registry.ts: -------------------------------------------------------------------------------- 1 | import { CONTEXT_TOKEN } from "@undb/context" 2 | import { executionContext } from "@undb/context/server" 3 | import { container } from "@undb/di" 4 | 5 | export const registerContext = () => { 6 | container.register(CONTEXT_TOKEN, { useValue: executionContext }) 7 | } 8 | -------------------------------------------------------------------------------- /apps/backend/src/serve.ts: -------------------------------------------------------------------------------- 1 | import pkg from "../../../package.json" 2 | import { app } from "./app" 3 | 4 | export const serve = async () => { 5 | app.listen(Bun.env.PORT ?? 4728, () => { 6 | app.decorator.logger.info( 7 | { version: pkg.version }, 8 | `App is running at ${app.server?.hostname}:${app.server?.port}`, ) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /apps/desktop/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | public 13 | dist-ssr 14 | *.local 15 | 16 | # Editor directories and files 17 | .vscode/* 18 | !.vscode/extensions.json 19 | .idea 20 | .DS_Store 21 | *.suo 22 | *.ntvs* 23 | *.njsproj 24 | *.sln 25 | *.sw? 26 | -------------------------------------------------------------------------------- /apps/desktop/README.md: -------------------------------------------------------------------------------- 1 | # Tauri + Vanilla TS 2 | 3 | This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript. 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 8 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | 9 | /binaries/* 10 | !binaries/.gitkeep 11 | 12 | dist 13 | /drizzle 14 | /.undb -------------------------------------------------------------------------------- /apps/desktop/src-tauri/binaries/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/binaries/.gitkeep -------------------------------------------------------------------------------- /apps/desktop/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/desktop/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /apps/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | .vercel 10 | .output 11 | vite.config.js.timestamp-* 12 | vite.config.ts.timestamp-* 13 | /dist 14 | $houdini 15 | -------------------------------------------------------------------------------- /apps/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /apps/frontend/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-svelte.com/schema.json", 3 | "style": "new-york", 4 | "tailwind": { 5 | "config": "tailwind.config.js", 6 | "css": "src/app.pcss", 7 | "baseColor": "slate" 8 | }, 9 | "aliases": { 10 | "components": "$lib/components", 11 | "utils": "$lib/utils" 12 | }, 13 | "typescript": true 14 | } -------------------------------------------------------------------------------- /apps/frontend/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /apps/frontend/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/audit/audit.gql: -------------------------------------------------------------------------------- 1 | query GetRecordAudits($recordId: ID!) { 2 | recordAudits(recordId: $recordId) { 3 | id 4 | timestamp 5 | operatorId 6 | operator { 7 | username 8 | email 9 | } 10 | tableId 11 | recordId 12 | op 13 | detail 14 | meta 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/audit/variants/rating-audit.svelte: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/auth/auth.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/chart/chart.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/command/command.store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from "svelte/store" 2 | 3 | export const commandOpen = writable(false) 4 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/date/date-macro.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if value} 8 | {value} 9 | {/if} 10 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-control/id-control.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-icon/number-icon.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-icon/string-icon.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/checkbox-field.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/duration-field.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {value ? millisecondsToDuration(value) : ""} 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/id-field.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 13 | {value} 14 | 15 |
16 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/json-field.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if value} 8 | {JSON.stringify(value)} 9 | {/if} 10 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/number-field.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#if isNumber(value)} 9 | {value} 10 | {/if} 11 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/percentage-field.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if value} 8 | 9 | {value} 10 | 11 | {/if} 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/field-value/string-field.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#if v} 11 |
12 | {v} 13 |
14 | {/if} 15 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/filters-editor/variants/get-user-filter-value.gql: -------------------------------------------------------------------------------- 1 | query GetUserFilterValue($ids: [ID!]!) { 2 | membersByIds(ids: $ids) { 3 | role 4 | user { 5 | email 6 | id 7 | username 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/grid-view/grid-view-checkbox.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/invitations/invitations.gql: -------------------------------------------------------------------------------- 1 | query GetInvitations($status: InvitationStatus) { 2 | invitations(status: $status) { 3 | id 4 | email 5 | role 6 | status 7 | invitedAt 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/share/share-form-button.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/table-picker/tables.gql: -------------------------------------------------------------------------------- 1 | query GetTables($baseId: ID) { 2 | tables(baseId: $baseId) { 3 | id 4 | name 5 | 6 | base { 7 | id 8 | name 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/user/get-member.gql: -------------------------------------------------------------------------------- 1 | query GetMember($id: ID!) { 2 | memberById(id: $id) { 3 | role 4 | user { 5 | id 6 | username 7 | email 8 | avatar 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/blocks/user/get-users.gql: -------------------------------------------------------------------------------- 1 | query GetUsers($q: String) { 2 | members(q: $q) { 3 | role 4 | user { 5 | id 6 | email 7 | username 8 | avatar 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/formula/style.ts: -------------------------------------------------------------------------------- 1 | import { tv } from "tailwind-variants" 2 | 3 | export const variable = tv({ 4 | base: "bg-blue-50 hover:bg-blue-100 rounded px-1 border border-blue-200 mx-[1px] transition-all duration-200 ease-in-out hover:shadow-sm hover:border-blue-300 cursor-pointer", 5 | }) 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/aspect-ratio/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./aspect-ratio.svelte" 2 | 3 | export { Root, Root as AspectRatio } 4 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/avatar/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./avatar.svelte" 2 | import Image from "./avatar-image.svelte" 3 | import Fallback from "./avatar-fallback.svelte" 4 | 5 | export { 6 | Root, 7 | Image, 8 | Fallback, 9 | // 10 | Root as Avatar, 11 | Image as AvatarImage, 12 | Fallback as AvatarFallback, 13 | } 14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/card/card-content.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/carousel/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Root } from "./carousel.svelte" 2 | export { default as Content } from "./carousel-content.svelte" 3 | export { default as Item } from "./carousel-item.svelte" 4 | export { default as Previous } from "./carousel-previous.svelte" 5 | export { default as Next } from "./carousel-next.svelte" 6 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./checkbox.svelte" 2 | export { 3 | Root, 4 | // 5 | Root as Checkbox, 6 | } 7 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/context-menu/context-menu-radio-group.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/dialog/dialog-portal.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/form/form-button.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/hover-card/index.ts: -------------------------------------------------------------------------------- 1 | import { LinkPreview as HoverCardPrimitive } from "bits-ui" 2 | 3 | import Content from "./hover-card-content.svelte" 4 | const Root = HoverCardPrimitive.Root 5 | const Trigger = HoverCardPrimitive.Trigger 6 | 7 | export { Root, Content, Trigger, Root as HoverCard, Content as HoverCardContent, Trigger as HoverCardTrigger } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/label/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./label.svelte" 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Label, 7 | } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/pagination/pagination-item.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
  • 12 | 13 |
  • 14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/progress/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./progress.svelte" 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Progress, 7 | } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/radio-group/index.ts: -------------------------------------------------------------------------------- 1 | import { RadioGroup as RadioGroupPrimitive } from "bits-ui" 2 | 3 | import Root from "./radio-group.svelte" 4 | import Item from "./radio-group-item.svelte" 5 | const Input = RadioGroupPrimitive.Input 6 | 7 | export { 8 | Root, 9 | Input, 10 | Item, 11 | // 12 | Root as RadioGroup, 13 | Input as RadioGroupInput, 14 | Item as RadioGroupItem, 15 | } 16 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/resizable/index.ts: -------------------------------------------------------------------------------- 1 | import { Pane } from "paneforge" 2 | import Handle from "./resizable-handle.svelte" 3 | import PaneGroup from "./resizable-pane-group.svelte" 4 | 5 | export { 6 | PaneGroup, 7 | Pane, 8 | Handle, 9 | // 10 | PaneGroup as ResizablePaneGroup, 11 | Pane as ResizablePane, 12 | Handle as ResizableHandle, 13 | } 14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/scroll-area/index.ts: -------------------------------------------------------------------------------- 1 | import Scrollbar from "./scroll-area-scrollbar.svelte" 2 | import Root from "./scroll-area.svelte" 3 | 4 | export { 5 | Root, 6 | Scrollbar, 7 | //, 8 | Root as ScrollArea, 9 | Scrollbar as ScrollAreaScrollbar, 10 | } 11 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/separator/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./separator.svelte" 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Separator, 7 | } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./skeleton.svelte" 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Skeleton, 7 | } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/slider/index.ts: -------------------------------------------------------------------------------- 1 | import Root from "./slider.svelte" 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Slider, 7 | } 8 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/sonner/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Toaster } from "./sonner.svelte" 2 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/table/table-body.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/components/ui/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | import { Tooltip as TooltipPrimitive } from "bits-ui" 2 | import Content from "./tooltip-content.svelte" 3 | 4 | const Root = TooltipPrimitive.Root 5 | const Trigger = TooltipPrimitive.Trigger 6 | 7 | export { 8 | Root, 9 | Trigger, 10 | Content, 11 | // 12 | Root as Tooltip, 13 | Content as TooltipContent, 14 | Trigger as TooltipTrigger, 15 | } 16 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/graphql/fragments/table.fragment.gql: -------------------------------------------------------------------------------- 1 | fragment TableDTO on Table { 2 | id 3 | name 4 | schema { 5 | id 6 | name 7 | type 8 | } 9 | views { 10 | id 11 | name 12 | type 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/graphql/get-spaces.gql: -------------------------------------------------------------------------------- 1 | query GetSpaces { 2 | spaces { 3 | id 4 | name 5 | isPersonal 6 | member { 7 | role 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/images/svelte-welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/frontend/src/lib/images/svelte-welcome.png -------------------------------------------------------------------------------- /apps/frontend/src/lib/images/svelte-welcome.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/frontend/src/lib/images/svelte-welcome.webp -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/attachment.store.ts: -------------------------------------------------------------------------------- 1 | import type { IAttachmentFieldValueItem } from "@undb/table" 2 | import { writable } from "svelte/store" 3 | 4 | export const selectedAttachment = writable(null) 5 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/field.store.ts: -------------------------------------------------------------------------------- 1 | import { queryParam, ssp } from "sveltekit-search-params" 2 | 3 | export const fieldId = queryParam("fieldId", ssp.string()) 4 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/form.store.ts: -------------------------------------------------------------------------------- 1 | import { queryParam, ssp } from "sveltekit-search-params" 2 | 3 | export const form = queryParam("form", ssp.string()) 4 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/playground.svelte.ts: -------------------------------------------------------------------------------- 1 | import { getContext, setContext } from "svelte" 2 | 3 | const IS_PLAYGROUND = "IS_PLAYGROUND" 4 | 5 | export function setIsPlayground(isPlayground: boolean) { 6 | setContext(IS_PLAYGROUND, isPlayground) 7 | } 8 | 9 | export function getIsPlayground() { 10 | return getContext(IS_PLAYGROUND) ?? false 11 | } 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/space.store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from "svelte/store" 2 | 3 | export const currentSpaceId = writable(undefined) 4 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/store/table.store.ts: -------------------------------------------------------------------------------- 1 | import type { TableDo } from "@undb/table" 2 | import { getContext, setContext } from "svelte" 3 | import { type Writable } from "svelte/store" 4 | 5 | export function setTable(table: Writable) { 6 | setContext("table", table) 7 | } 8 | 9 | export function getTable() { 10 | return getContext>("table") 11 | } 12 | -------------------------------------------------------------------------------- /apps/frontend/src/lib/trpc/client.ts: -------------------------------------------------------------------------------- 1 | import { createTRPCProxyClient, httpLink } from "@trpc/client" 2 | import type { AppRouter } from "@undb/trpc" 3 | 4 | export const trpc = createTRPCProxyClient({ 5 | links: [ 6 | httpLink({ 7 | url: "/trpc", 8 | }), 9 | ], 10 | }) 11 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/+layout.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 |
    11 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/login-with-otp/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetLoginWithOtpSettings { 2 | settings { 3 | auth { 4 | otp { 5 | enabled 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/login/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetLoginSettings { 2 | settings { 3 | registration { 4 | enabled 5 | } 6 | auth { 7 | otp { 8 | enabled 9 | } 10 | } 11 | oauth { 12 | google { 13 | enabled 14 | } 15 | github { 16 | enabled 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/reset-password/[token]/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = "auto" 2 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/signup/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetSignupSettings { 2 | settings { 3 | registration { 4 | enabled 5 | } 6 | oauth { 7 | google { 8 | enabled 9 | } 10 | github { 11 | enabled 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(auth)/verify-otp/+page.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#if email} 9 | 10 | {/if} 11 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(share)/create-from-share/[shareId]/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetCreateFromShareData($shareId: ID!) { 2 | space { 3 | id 4 | name 5 | } 6 | 7 | template(shareId: $shareId) { 8 | name 9 | } 10 | 11 | spaces { 12 | id 13 | name 14 | isPersonal 15 | member { 16 | role 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(share)/create-from-share/[shareId]/+layout.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(space)/bases/[baseId]/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetBaseQuery($baseId: ID!) { 2 | base(id: $baseId) { 3 | id 4 | name 5 | option 6 | 7 | share { 8 | enabled 9 | id 10 | } 11 | 12 | tables { 13 | id 14 | name 15 | } 16 | 17 | dashboards { 18 | id 19 | name 20 | baseId 21 | description 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(space)/bases/[baseId]/setting/+layout.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(space)/bases/[baseId]/setting/+page.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | {#if base} 12 | 13 | {/if} 14 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(space)/dashboards/[dashboardId]/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(authed)/(space)/settings/+layout.gql: -------------------------------------------------------------------------------- 1 | query GetMembers($q: String) { 2 | members(q: $q) { 3 | role 4 | 5 | user { 6 | id 7 | email 8 | username 9 | avatar 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(template)/templates/+layout.ts: -------------------------------------------------------------------------------- 1 | import type { LayoutLoad } from "./$types" 2 | 3 | export const load: LayoutLoad = async ({ fetch, depends }) => { 4 | depends("undb:template") 5 | 6 | const fetchMe = await fetch("/api/me") 7 | 8 | const me = fetchMe.redirected ? null : await fetchMe.json() 9 | 10 | return { 11 | me, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(template)/templates/[templateId]/+layout.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/(template)/templates/[templateId]/+layout.ts: -------------------------------------------------------------------------------- 1 | import { trpc } from "$lib/trpc/client" 2 | import type { LayoutLoad } from "./$types" 3 | 4 | export const prerender = "auto" 5 | 6 | export const load: LayoutLoad = async ({ params }: { params: { templateId: string } }) => { 7 | const template = await trpc.template.get.query({ id: params.templateId }) 8 | 9 | return { 10 | template, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/playground/+page.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/playground/bases/[baseId]/+page.svelte: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/playground/bases/[baseId]/d/[dashboardId]/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/frontend/src/routes/playground/bases/[baseId]/t/[tableId]/[[viewId]]/+layout.svelte: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/frontend/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/frontend/static/favicon.png -------------------------------------------------------------------------------- /apps/frontend/static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /apps/frontend/static/sql-wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/apps/frontend/static/sql-wasm.wasm -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/bun.lockb -------------------------------------------------------------------------------- /bunfig.toml: -------------------------------------------------------------------------------- 1 | [install] 2 | # set default registry as a string -------------------------------------------------------------------------------- /docs/images/calendar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/calendar.jpeg -------------------------------------------------------------------------------- /docs/images/form.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/form.jpeg -------------------------------------------------------------------------------- /docs/images/gallery.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/gallery.jpeg -------------------------------------------------------------------------------- /docs/images/intro.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/intro.jpeg -------------------------------------------------------------------------------- /docs/images/kanban.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/kanban.jpeg -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/logo.png -------------------------------------------------------------------------------- /docs/images/openapi.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/openapi.jpeg -------------------------------------------------------------------------------- /docs/images/pivot.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/docs/images/pivot.jpeg -------------------------------------------------------------------------------- /drizzle.mysql.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "drizzle-kit" 2 | 3 | export default defineConfig({ 4 | schema: "./packages/persistence/src/schema/mysql.ts", 5 | out: "./apps/backend/drizzle/mysql", 6 | dialect: "mysql", 7 | tablesFilter: ["undb_*"], 8 | }) 9 | -------------------------------------------------------------------------------- /drizzle.postgres.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "drizzle-kit" 2 | 3 | export default defineConfig({ 4 | schema: "./packages/persistence/src/schema/postgres.ts", 5 | out: "./apps/backend/drizzle/postgres", 6 | dialect: "postgresql", 7 | tablesFilter: ["undb_*"], 8 | }) 9 | -------------------------------------------------------------------------------- /drizzle.sqlite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "drizzle-kit" 2 | 3 | export default defineConfig({ 4 | schema: "./packages/persistence/src/schema/sqlite.ts", 5 | out: "./apps/backend/drizzle/sqlite", 6 | dialect: "sqlite", 7 | tablesFilter: ["undb_*"], 8 | dbCredentials: { 9 | url: "./apps/backend/undb.sqlite", 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /drizzle.turso.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "drizzle-kit" 2 | 3 | export default defineConfig({ 4 | schema: "./packages/persistence/src/schema/sqlite.ts", 5 | out: "./apps/backend/drizzle/sqlite", 6 | dialect: "turso", 7 | tablesFilter: ["undb_*"], 8 | dbCredentials: { 9 | url: process.env.UNDB_DB_TURSO_URL!, 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /packages/audit/README.md: -------------------------------------------------------------------------------- 1 | # @undb/audit 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.12. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/audit/src/dto/get-record-audit.dto.ts: -------------------------------------------------------------------------------- 1 | import { recordId } from "@undb/table" 2 | import { z } from "@undb/zod" 3 | 4 | export const getRecordAuditsDTO = z.object({ 5 | recordId: recordId, 6 | }) 7 | -------------------------------------------------------------------------------- /packages/audit/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./audit.dto" 2 | export * from "./get-record-audit.dto" 3 | -------------------------------------------------------------------------------- /packages/audit/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./audit-detail.vo.js" 2 | export * from "./audit-id.vo.js" 3 | export * from "./audit.factory.js" 4 | export * from "./audit.js" 5 | export * from "./audit.repository.js" 6 | export * from "./dto/index.js" 7 | export * from "./services/index.js" 8 | export * from "./specifications/index.js" 9 | -------------------------------------------------------------------------------- /packages/audit/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./audit.event-handler.js" 2 | export * from "./audit.service.js" 3 | -------------------------------------------------------------------------------- /packages/authz/README.md: -------------------------------------------------------------------------------- 1 | # @undb/authz 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.13. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/authz/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rbac" 2 | export * from "./space-member" 3 | -------------------------------------------------------------------------------- /packages/authz/src/member/member-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "mem" 5 | 6 | const size = 8 7 | 8 | export const memberId = z.string().startsWith(prefix) 9 | 10 | export const MemberIdVO = IdFactory(prefix, size) 11 | 12 | export type MemberId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/authz/src/rbac/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./permission" 2 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/dto/accept-invitation.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { invitationId } from "../invitation.do" 3 | 4 | export const acceptinvitationDTO = z.object({ 5 | id: invitationId, 6 | }) 7 | 8 | export type AcceptInvitationDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/dto/delete-invitation.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { invitationId } from "../invitation.do" 3 | 4 | export const deleteInvitationDTO = z.object({ 5 | id: invitationId, 6 | }) 7 | 8 | export type DeleteInvitationDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./accept-invitation.dto" 2 | export * from "./delete-invitation.dto" 3 | export * from "./invitation.dto" 4 | export * from "./invite.dto" 5 | export * from "./space-member.dto" 6 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/dto/invite.dto.ts: -------------------------------------------------------------------------------- 1 | import { spaceIdSchema } from "@undb/space" 2 | import { z } from "@undb/zod" 3 | import { spaceMemberWithoutOwner } from "../space-member" 4 | 5 | export const inviteDTO = z.object({ 6 | email: z.string().email(), 7 | role: spaceMemberWithoutOwner.optional(), 8 | inviterId: z.string(), 9 | spaceId: spaceIdSchema, 10 | }) 11 | 12 | export type InviteDTO = z.infer 13 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/space-member.composite-specification.ts: -------------------------------------------------------------------------------- 1 | import { CompositeSpecification } from "@undb/domain" 2 | import type { SpaceMember } from "./space-member" 3 | import type { ISpaceMemberVisitor } from "./space-member.visitor" 4 | 5 | export abstract class SpaceMemberComositeSpecification extends CompositeSpecification< 6 | SpaceMember, 7 | ISpaceMemberVisitor 8 | > {} 9 | -------------------------------------------------------------------------------- /packages/authz/src/space-member/specifications/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./space-member-email.specification" 2 | export * from "./space-member-id.specification" 3 | export * from "./space-member-q.specification" 4 | export * from "./space-member-space-id.specification" 5 | export * from "./space-member-user-id.specification" 6 | -------------------------------------------------------------------------------- /packages/base/README.md: -------------------------------------------------------------------------------- 1 | # @undb/base 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/base/src/base.outbox.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | import type { IOutboxService } from "@undb/domain" 3 | import type { Base } from "./base" 4 | 5 | export interface IBaseOutboxService extends IOutboxService {} 6 | 7 | export const BASE_OUTBOX_SERVICE = Symbol("BASE_OUTBOX_SERVICE") 8 | 9 | export const injectBaseOutboxService = () => inject(BASE_OUTBOX_SERVICE) 10 | -------------------------------------------------------------------------------- /packages/base/src/dto/base.dto.ts: -------------------------------------------------------------------------------- 1 | import { spaceIdSchema } from "@undb/space" 2 | import { z } from "@undb/zod" 3 | import { baseIdSchema, baseNameSchema, baseOptionSchema } from "../value-objects" 4 | 5 | export const baseDTO = z.object({ 6 | id: baseIdSchema, 7 | name: baseNameSchema, 8 | spaceId: spaceIdSchema, 9 | option: baseOptionSchema.optional().nullable(), 10 | }) 11 | 12 | export type IBaseDTO = z.infer 13 | -------------------------------------------------------------------------------- /packages/base/src/dto/create-base.dto.ts: -------------------------------------------------------------------------------- 1 | import { spaceIdSchema } from "@undb/space" 2 | import { z } from "@undb/zod" 3 | import { baseIdSchema, baseNameSchema } from "../value-objects" 4 | 5 | export const createBaseDTO = z.object({ 6 | id: baseIdSchema.optional(), 7 | name: baseNameSchema, 8 | spaceId: spaceIdSchema, 9 | }) 10 | 11 | export type ICreateBaseDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/base/src/dto/delete-base.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { baseIdSchema } from "../value-objects" 3 | 4 | export const deleteBaseDTO = z.object({ 5 | id: baseIdSchema, 6 | }) 7 | 8 | export type IDeleteBaseDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/base/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base.dto" 2 | export * from "./create-base.dto" 3 | export * from "./delete-base.dto" 4 | export * from "./duplicate-base.dto" 5 | export * from "./unique-base.dto" 6 | export * from "./update-base.dto" 7 | -------------------------------------------------------------------------------- /packages/base/src/dto/unique-base.dto.ts: -------------------------------------------------------------------------------- 1 | import { spaceIdSchema } from "@undb/space" 2 | import { z } from "@undb/zod" 3 | import { baseIdSchema, baseNameSchema } from "../value-objects" 4 | 5 | export const uniqueBaseDTO = z 6 | .object({ 7 | baseId: baseIdSchema, 8 | baseName: baseNameSchema, 9 | spaceId: spaceIdSchema, 10 | }) 11 | .partial() 12 | 13 | export type IUniqueBaseDTO = z.infer 14 | -------------------------------------------------------------------------------- /packages/base/src/dto/update-base.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { baseIdSchema, baseNameSchema } from "../value-objects" 3 | 4 | export const updateBaseDTO = z.object({ 5 | id: baseIdSchema, 6 | name: baseNameSchema.optional(), 7 | }) 8 | 9 | export type IUpdateBaseDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base.factory.js" 2 | export * from "./base.js" 3 | export * from "./base.outbox.js" 4 | export * from "./base.repository.js" 5 | export * from "./dto/index.js" 6 | export * from "./interface.js" 7 | export * from "./rules" 8 | export * from "./specifications/index.js" 9 | export * from "./value-objects/index.js" 10 | -------------------------------------------------------------------------------- /packages/base/src/rules/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base-name-should-be-unique.rule" 2 | -------------------------------------------------------------------------------- /packages/base/src/value-objects/base-option.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const baseOptionSchema = z.object({}) 5 | 6 | export type IBaseOption = z.infer 7 | 8 | export class BaseOption extends ValueObject { 9 | constructor(props: IBaseOption) { 10 | super(props) 11 | } 12 | 13 | toJSON() { 14 | return {} 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/base/src/value-objects/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base-id.vo.js" 2 | export * from "./base-name.vo.js" 3 | export * from "./base-option.js" 4 | -------------------------------------------------------------------------------- /packages/command-handlers/README.md: -------------------------------------------------------------------------------- 1 | # @undb/command-handlers 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/command-handlers/src/registry.ts: -------------------------------------------------------------------------------- 1 | import { CommandBus } from "@undb/cqrs" 2 | import { container } from "@undb/di" 3 | import { commandHandlers } from "./handlers" 4 | 5 | export const registerCommands = () => { 6 | const commandBus = container.resolve(CommandBus) 7 | commandBus.register(commandHandlers) 8 | } 9 | -------------------------------------------------------------------------------- /packages/commands/README.md: -------------------------------------------------------------------------------- 1 | # @undb/commands 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/commands/src/delete-space.command.ts: -------------------------------------------------------------------------------- 1 | import { Command } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const deleteSpaceCommand = z.object({}) 5 | 6 | export type IDeleteSpaceCommand = z.infer 7 | 8 | export class DeleteSpaceCommand extends Command implements IDeleteSpaceCommand {} 9 | -------------------------------------------------------------------------------- /packages/context/README.md: -------------------------------------------------------------------------------- 1 | # @undb/context 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/context/src/index.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | import type { ExecuteContext } from "./context.type" 3 | 4 | export * from "./context.type" 5 | 6 | export const CONTEXT_TOKEN = Symbol.for("context") 7 | 8 | export const injectContext = () => inject(CONTEXT_TOKEN) 9 | 10 | export interface IExecutionContext { 11 | getStore(): ExecuteContext | undefined 12 | } 13 | -------------------------------------------------------------------------------- /packages/cqrs/README.md: -------------------------------------------------------------------------------- 1 | # @undb/cqrs 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/cqrs/src/decorators/constants.ts: -------------------------------------------------------------------------------- 1 | export const COMMAND_METADATA = Symbol.for("COMMAND") 2 | export const COMMAND_HANDLER_METADATA = Symbol.for("COMMAND_HANDLER") 3 | 4 | export const QUERY_METADATA = Symbol.for("QUERY") 5 | export const QUERY_HANDLER_METADATA = Symbol.for("QUERY_HANDLER") 6 | 7 | export const EVENT_METADATA = Symbol.for("EVENT") 8 | export const EVENT_HANDLER_METADATA = Symbol.for("EVENT_HANDLER") 9 | -------------------------------------------------------------------------------- /packages/cqrs/src/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./command-handler.decorator" 2 | export * from "./event-handler.decorator" 3 | export * from "./query-handler.decorator" 4 | -------------------------------------------------------------------------------- /packages/cqrs/src/default-command-publisher.ts: -------------------------------------------------------------------------------- 1 | import type { Command, ICommandPublisher } from "@undb/domain" 2 | import { Subject } from "rxjs" 3 | 4 | export class DefaultCommandPubSub implements ICommandPublisher { 5 | constructor(public subject$: Subject) {} 6 | 7 | publish(command: T) { 8 | this.subject$.next(command) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/cqrs/src/default-query-publisher.ts: -------------------------------------------------------------------------------- 1 | import type { IQueryPublisher, Query } from "@undb/domain" 2 | import { Subject } from "rxjs" 3 | 4 | export class DefaultQueryPubSub implements IQueryPublisher { 5 | constructor(public subject$: Subject) {} 6 | 7 | publish(query: T) { 8 | this.subject$.next(query) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/command-handler-not-found.exception.ts: -------------------------------------------------------------------------------- 1 | export class CommandHandlerNotFoundException extends Error { 2 | constructor(commandName: string) { 3 | super(`The command handler for the "${commandName}" command was not found!`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/event-handler-not-found.exception.ts: -------------------------------------------------------------------------------- 1 | export class EventHandlerNotFoundException extends Error { 2 | constructor(eventId: string) { 3 | super(`The event handler for the "${eventId}" event was not found!`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/invalid-command-handler.exception.ts: -------------------------------------------------------------------------------- 1 | export class InvalidCommandHandlerException extends Error { 2 | constructor() { 3 | super(`Invalid command handler exception (missing @commandHandler() decorator?)`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/invalid-event-handler.exception.ts: -------------------------------------------------------------------------------- 1 | export class InvalidEventHandlerException extends Error { 2 | constructor() { 3 | super(`Invalid event handler exception (missing @eventHandler() decorator?)`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/invalid-query-handler.exception.ts: -------------------------------------------------------------------------------- 1 | export class InvalidQueryHandlerException extends Error { 2 | constructor() { 3 | super(`Invalid query handler exception (missing @queryHandler() decorator?)`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/exceptions/query-handler-not-found.exception.ts: -------------------------------------------------------------------------------- 1 | export class QueryHandlerNotFoundException extends Error { 2 | constructor(queryName: string) { 3 | super(`The query handler for the "${queryName}" query was not found!`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/cqrs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./command-bus" 2 | export * from "./decorators" 3 | export * from "./event-bus" 4 | export * from "./query-bus" 5 | -------------------------------------------------------------------------------- /packages/dashboard/README.md: -------------------------------------------------------------------------------- 1 | # @undb/dashboard 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.30. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/dashboard/src/dto/delete-dashboard-widget.dto.ts: -------------------------------------------------------------------------------- 1 | import { widgetId } from "@undb/table" 2 | import { z } from "@undb/zod" 3 | import { dashboardIdSchema } from "../value-objects" 4 | 5 | export const deleteDashboardWidgetDTO = z.object({ 6 | dashboardId: dashboardIdSchema, 7 | widgetId: widgetId, 8 | }) 9 | 10 | export type IDeleteDashboardWidgetDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/dashboard/src/dto/delete-dashboard.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { dashboardIdSchema } from "../value-objects" 3 | 4 | export const deleteDashboardDTO = z.object({ 5 | id: dashboardIdSchema, 6 | }) 7 | 8 | export type IDeleteDashboardDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/dashboard/src/dto/duplicate-dashboard.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { dashboardIdSchema } from "../value-objects" 3 | 4 | export const duplicateDashboardDTO = z.object({ 5 | id: dashboardIdSchema, 6 | }) 7 | 8 | export type IDuplicateDashboardDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/dashboard/src/dto/update-dashboard.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { dashboardNameSchema } from "../value-objects" 3 | 4 | export const updateDashboardDTO = z.object({ 5 | name: dashboardNameSchema.optional(), 6 | description: z.string().optional(), 7 | }) 8 | 9 | export type IUpdateDashboardDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/dashboard/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dashboard.do.js" 2 | export * from "./dashboard.factory.js" 3 | export * from "./dashboard.outbox.js" 4 | export * from "./dashboard.repository.js" 5 | export * from "./dto/index.js" 6 | export * from "./interface.js" 7 | export * from "./rules" 8 | export * from "./services/index.js" 9 | export * from "./specifications/index.js" 10 | export * from "./value-objects/index.js" 11 | -------------------------------------------------------------------------------- /packages/dashboard/src/rules/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dashboard-id-should-be-unique.rule" 2 | export * from "./dashboard-name-should-be-unique.rule" 3 | -------------------------------------------------------------------------------- /packages/dashboard/src/services/dashboard.query-service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { DashboardQueryService } from "./dashboard.query-service" 3 | 4 | export const DASHBOARD_QUERY_SERVICE = Symbol.for("DashboardQueryService") 5 | export const injectDashboardQueryService = () => inject(DASHBOARD_QUERY_SERVICE) 6 | container.register(DASHBOARD_QUERY_SERVICE, { useClass: DashboardQueryService }) 7 | -------------------------------------------------------------------------------- /packages/dashboard/src/services/dashboard.service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { DashboardService } from "./dashboard.service" 3 | 4 | export const DASHBOARD_SERVICE = Symbol.for("DashboardService") 5 | export const injectDashboardService = () => inject(DASHBOARD_SERVICE) 6 | container.register(DASHBOARD_SERVICE, { useClass: DashboardService }) 7 | -------------------------------------------------------------------------------- /packages/dashboard/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dashboard.query-service" 2 | export * from "./dashboard.query-service.provider" 3 | export * from "./dashboard.service" 4 | export * from "./dashboard.service.provider" 5 | -------------------------------------------------------------------------------- /packages/dashboard/src/services/methods/get-dashboard-by-id.method.ts: -------------------------------------------------------------------------------- 1 | import type { DashboardQueryService } from "../dashboard.query-service" 2 | 3 | export async function getDashboardByIdMethod(this: DashboardQueryService, id: string) { 4 | return this.repo.findOneById(id) 5 | } 6 | -------------------------------------------------------------------------------- /packages/dashboard/src/value-objects/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dashboard-id.vo.js" 2 | export * from "./dashboard-layout.vo.js" 3 | export * from "./dashboard-name.vo.js" 4 | export * from "./dashboard-widgets.vo.js" 5 | -------------------------------------------------------------------------------- /packages/data-service/README.md: -------------------------------------------------------------------------------- 1 | # @undb/data-service 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.37. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/data-service/src/index.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata" 2 | 3 | export * from "./data-service.impl" 4 | export * from "./data-service.provider" 5 | export * from "./data-service.registery" 6 | -------------------------------------------------------------------------------- /packages/di/README.md: -------------------------------------------------------------------------------- 1 | # @undb/di 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/di/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/di", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "devDependencies": { 7 | "@types/bun": "latest" 8 | }, 9 | "peerDependencies": { 10 | "typescript": "^5.0.0" 11 | }, 12 | "dependencies": { 13 | "reflect-metadata": "^0.2.2", 14 | "tsyringe": "^4.8.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/di/src/index.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata" 2 | 3 | export { Lifecycle, container, inject, injectable, instanceCachingFactory, registry, singleton } from "tsyringe" 4 | export type { ClassProvider, DependencyContainer, FactoryProvider, Provider, ValueProvider } from "tsyringe" 5 | -------------------------------------------------------------------------------- /packages/domain/README.md: -------------------------------------------------------------------------------- 1 | # @undb/domain 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/domain/src/cache.ts: -------------------------------------------------------------------------------- 1 | export interface IKVCache { 2 | set(key: string, value: V): Promise 3 | get(key: string): Promise 4 | remove(key: string): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/command-bus.ts: -------------------------------------------------------------------------------- 1 | import type { Command } from "./command.js" 2 | 3 | export interface ICommandBus { 4 | execute(command: TCommand): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/command-handler.ts: -------------------------------------------------------------------------------- 1 | import type { Command } from "./command.js" 2 | 3 | export interface ICommandHandler { 4 | execute(command: TCommand): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/command-metadata.ts: -------------------------------------------------------------------------------- 1 | export interface CommandMetadata { 2 | id: string 3 | } 4 | -------------------------------------------------------------------------------- /packages/domain/src/command-publisher.ts: -------------------------------------------------------------------------------- 1 | import type { Command } from "./command" 2 | 3 | export interface ICommandPublisher { 4 | publish(command: T): any 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/date.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "./value-object.js" 2 | 3 | export class DateVO extends ValueObject { 4 | constructor(value: Date | string | number) { 5 | const date = new Date(value) 6 | super({ value: date }) 7 | } 8 | 9 | public get value(): Date { 10 | return this.props.value 11 | } 12 | 13 | public static now(): DateVO { 14 | return new DateVO(Date.now()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/domain/src/email.vo.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { ValueObject } from "./value-object.js" 3 | 4 | export const emailSchema = z.string().email() 5 | 6 | export class EmailVO extends ValueObject> { 7 | static fromString(email: string): EmailVO { 8 | return new this({ value: emailSchema.parse(email) }) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/domain/src/event-bus.ts: -------------------------------------------------------------------------------- 1 | import type { BaseEvent } from "./event.js" 2 | 3 | export interface IEventBus { 4 | publish(event: TEvent): Promise 5 | publishMany(events: TEvent[]): Promise 6 | } 7 | -------------------------------------------------------------------------------- /packages/domain/src/event-handler.ts: -------------------------------------------------------------------------------- 1 | import type { IEvent } from "./event.js" 2 | 3 | export interface IEventHandler { 4 | handle(event: TEvent): Promise | TResult 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/event-metadata.ts: -------------------------------------------------------------------------------- 1 | export interface EventMetadata { 2 | id: string 3 | } 4 | -------------------------------------------------------------------------------- /packages/domain/src/event-publisher.ts: -------------------------------------------------------------------------------- 1 | import type { BaseEvent } from "./event" 2 | 3 | export interface IEventPublisher { 4 | publish(event: TEvent): Promise 5 | publishMany(events: TEvent[]): Promise 6 | } 7 | -------------------------------------------------------------------------------- /packages/domain/src/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./not-implement.exception" 2 | export * from "./wont-implement.exception" 3 | -------------------------------------------------------------------------------- /packages/domain/src/exceptions/not-implement.exception.ts: -------------------------------------------------------------------------------- 1 | export class NotImplementException extends Error { 2 | constructor(name: string) { 3 | super(`${name} not implemented yet`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/exceptions/wont-implement.exception.ts: -------------------------------------------------------------------------------- 1 | export class WontImplementException extends Error { 2 | constructor(name: string) { 3 | super(`${name} will not be implemented`) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/mapper.ts: -------------------------------------------------------------------------------- 1 | export interface Mapper { 2 | toDo(entity: Entity): Do 3 | toEntity(domain: Do): Entity 4 | toDTO(entity: Entity): DTO 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/outbox.ts: -------------------------------------------------------------------------------- 1 | import type { AggregateRoot } from "./aggregate-root" 2 | 3 | export interface IOutboxService> { 4 | save(d: DO): Promise 5 | saveMany(d: DO[]): Promise 6 | } 7 | -------------------------------------------------------------------------------- /packages/domain/src/query-bus.ts: -------------------------------------------------------------------------------- 1 | import type { Query } from "./query.js" 2 | 3 | export interface IQueryBus { 4 | execute(command: TQuery): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/query-handler.ts: -------------------------------------------------------------------------------- 1 | import type { Query } from "./query.js" 2 | 3 | export interface IQueryHandler { 4 | execute(query: TQuery): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/query-metadata.ts: -------------------------------------------------------------------------------- 1 | export interface QueryMetadata { 2 | id: string 3 | } 4 | -------------------------------------------------------------------------------- /packages/domain/src/query-publisher.ts: -------------------------------------------------------------------------------- 1 | import type { Query } from "./query" 2 | 3 | export interface IQueryPublisher { 4 | publish(command: T): any 5 | } 6 | -------------------------------------------------------------------------------- /packages/domain/src/query.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "bun:test" 2 | 3 | test("test", () => { 4 | expect(1).toBe(1) 5 | }) 6 | -------------------------------------------------------------------------------- /packages/domain/src/query.ts: -------------------------------------------------------------------------------- 1 | export type QueryProps = Omit & Partial 2 | 3 | export abstract class Query {} 4 | -------------------------------------------------------------------------------- /packages/domain/src/rule.ts: -------------------------------------------------------------------------------- 1 | import type { ExceptionBase } from "./exception.base" 2 | 3 | export abstract class DomainRules { 4 | abstract err: Err 5 | abstract isBroken(): boolean 6 | } 7 | 8 | export function applyRules(...rules: DomainRules[]) { 9 | for (const rule of rules) { 10 | if (rule.isBroken()) { 11 | throw rule.err 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/env/README.md: -------------------------------------------------------------------------------- 1 | # @undb/env 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/env/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/env", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "devDependencies": { 7 | "@types/bun": "latest" 8 | }, 9 | "peerDependencies": { 10 | "typescript": "^5.0.0" 11 | }, 12 | "dependencies": { 13 | "@t3-oss/env-core": "^0.11.1", 14 | "@undb/zod": "workspace:*" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/event-handlers/README.md: -------------------------------------------------------------------------------- 1 | # @undb/command-handlers 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/event-handlers/src/handlers/index.ts: -------------------------------------------------------------------------------- 1 | import { DashboardOnFieldDeletedEventHandle } from "./dashboard-on-field-deleted.event-handler" 2 | import { DashboardOnTableDeletedEventHandle } from "./dashboard-on-table-deleted.event-handler" 3 | 4 | export const eventHandlers = [DashboardOnFieldDeletedEventHandle, DashboardOnTableDeletedEventHandle] 5 | -------------------------------------------------------------------------------- /packages/event-handlers/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./registry" 2 | -------------------------------------------------------------------------------- /packages/event-handlers/src/registry.ts: -------------------------------------------------------------------------------- 1 | import { EventBus } from "@undb/cqrs" 2 | import { container } from "@undb/di" 3 | import { eventHandlers } from "./handlers" 4 | 5 | export const registerEvents = () => { 6 | const eventBus = container.resolve(EventBus) 7 | eventBus.register(eventHandlers) 8 | } 9 | -------------------------------------------------------------------------------- /packages/formula/README.md: -------------------------------------------------------------------------------- 1 | # @undb/formula 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.31. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/formula/scripts/generate-parser.ts: -------------------------------------------------------------------------------- 1 | import { $ } from "bun" 2 | 3 | await $`antlr -Dlanguage=TypeScript -visitor -no-listener src/grammar/*.g4` 4 | -------------------------------------------------------------------------------- /packages/graphql/README.md: -------------------------------------------------------------------------------- 1 | # @undb/graphql 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/i18n/.typesafe-i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "esmImports": true, 3 | "adapters": ["node", "svelte"], 4 | "$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json" 5 | } 6 | -------------------------------------------------------------------------------- /packages/i18n/README.md: -------------------------------------------------------------------------------- 1 | # @undb/i18n 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.17. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/i18n/src/client.ts: -------------------------------------------------------------------------------- 1 | export * from "./i18n/en" 2 | export * from "./i18n/es" 3 | export * from "./i18n/formatters" 4 | export * from "./i18n/i18n-detector" 5 | export * from "./i18n/i18n-svelte" 6 | export * from "./i18n/i18n-types" 7 | export * from "./i18n/i18n-util" 8 | export * from "./i18n/i18n-util.async" 9 | export * from "./i18n/ja" 10 | export * from "./i18n/ko" 11 | export * from "./i18n/zh" 12 | 13 | -------------------------------------------------------------------------------- /packages/i18n/src/i18n/custom-types.ts: -------------------------------------------------------------------------------- 1 | // use this file to export your custom types; these types will be imported by './i18n-types.ts' -------------------------------------------------------------------------------- /packages/i18n/src/i18n/formatters.ts: -------------------------------------------------------------------------------- 1 | import type { FormattersInitializer } from "typesafe-i18n" 2 | import type { Locales, Formatters } from "./i18n-types.js" 3 | 4 | export const initFormatters: FormattersInitializer = (locale: Locales) => { 5 | const formatters: Formatters = { 6 | // add your formatter functions here 7 | } 8 | 9 | return formatters 10 | } 11 | -------------------------------------------------------------------------------- /packages/i18n/src/i18n/i18n-detector.ts: -------------------------------------------------------------------------------- 1 | export { documentCookieDetector,localStorageDetector,queryStringDetector } from 'typesafe-i18n/detectors'; 2 | 3 | -------------------------------------------------------------------------------- /packages/i18n/src/server.ts: -------------------------------------------------------------------------------- 1 | export * from "./i18n/i18n-node" 2 | export * from "./i18n/i18n-types" 3 | export * from "./i18n/i18n-util" 4 | export * from "./i18n/i18n-util.async" 5 | -------------------------------------------------------------------------------- /packages/logger/README.md: -------------------------------------------------------------------------------- 1 | # @undb/logger 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/logger/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/logger", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "devDependencies": { 7 | "@types/bun": "latest" 8 | }, 9 | "peerDependencies": { 10 | "typescript": "^5.0.0" 11 | }, 12 | "dependencies": { 13 | "@undb/env": "workspace:*", 14 | "pino": "^9.6.0", 15 | "pino-pretty": "^13.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/logger/src/logger.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const LOGGER = Symbol.for("logger") 4 | export const injectLogger = () => inject(LOGGER) 5 | -------------------------------------------------------------------------------- /packages/mail/README.md: -------------------------------------------------------------------------------- 1 | # @undb/mail 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.20. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/mail/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/mail", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "devDependencies": { 7 | "@types/bun": "latest" 8 | }, 9 | "dependencies": { 10 | "@undb/di": "workspace:*", 11 | "@undb/zod": "workspace:*" 12 | }, 13 | "peerDependencies": { 14 | "typescript": "^5.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/mail/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./mail.dto" 2 | export * from "./mail.provider" 3 | export * from "./mail.service" 4 | export * from "./mail.template" 5 | -------------------------------------------------------------------------------- /packages/mail/src/mail.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const MAIL_SERVICE = Symbol("MAIL_SERVICE") 4 | 5 | export const injectMailService = () => inject(MAIL_SERVICE) 6 | -------------------------------------------------------------------------------- /packages/mail/src/mail.service.ts: -------------------------------------------------------------------------------- 1 | import type { ISendInput } from "./mail.dto" 2 | 3 | export interface IMailService { 4 | send(input: ISendInput): Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/mail/src/mail.template.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const template = z.enum(["invite", "reset-password", "verify-email", "otp"]) 4 | 5 | export type Template = z.infer 6 | -------------------------------------------------------------------------------- /packages/openapi/README.md: -------------------------------------------------------------------------------- 1 | # @undb/openapi 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/openapi/src/api-token/dto/create-api-token.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const createApiTokenDTO = z.object({ 4 | name: z.string(), 5 | userId: z.string(), 6 | spaceId: z.string(), 7 | }) 8 | 9 | export type ICreateApiTokenDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/openapi/src/api-token/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./api-token.dto" 2 | export * from "./create-api-token.dto" 3 | -------------------------------------------------------------------------------- /packages/openapi/src/api-token/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./api-token-id.vo" 2 | export * from "./api-token-token.vo" 3 | export * from "./api-token.do" 4 | export * from "./api-token.repository" 5 | export * from "./api-token.service" 6 | export * from "./dto" 7 | export * from "./interface" 8 | export * from "./specifications" 9 | -------------------------------------------------------------------------------- /packages/openapi/src/api-token/specifications/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./api-token-id.specification.js" 2 | export * from "./api-token-space-id.specification.js" 3 | export * from "./api-token-token.specification.js" 4 | export * from "./api-token-user-id.specification.js" 5 | -------------------------------------------------------------------------------- /packages/persistence/README.md: -------------------------------------------------------------------------------- 1 | # @undb/db 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/persistence/src/api-token/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./api-token.query-repository" 2 | export * from "./api-token.repository" 3 | -------------------------------------------------------------------------------- /packages/persistence/src/audit/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./audit.query-repository" 2 | export * from "./audit.repository" 3 | -------------------------------------------------------------------------------- /packages/persistence/src/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./base.outbox-service" 2 | export * from "./base.query-repository" 3 | export * from "./base.repository" 4 | -------------------------------------------------------------------------------- /packages/persistence/src/container.ts: -------------------------------------------------------------------------------- 1 | import { container } from "@undb/di" 2 | 3 | export const persistenceContainer = container.createChildContainer() 4 | -------------------------------------------------------------------------------- /packages/persistence/src/ctx.interface.ts: -------------------------------------------------------------------------------- 1 | import type { AnonymousTx, Tx } from "./qb.type" 2 | 3 | export interface ITxContext { 4 | withTransaction: (callback: () => Promise) => Promise 5 | startTransaction: (tx: any) => void 6 | getCurrentTransaction: () => Tx 7 | getAnonymousTransaction: () => AnonymousTx 8 | } 9 | -------------------------------------------------------------------------------- /packages/persistence/src/ctx.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const TX_CTX = Symbol("tx_ctx") 4 | export const injectTxCTX = () => inject(TX_CTX) 5 | -------------------------------------------------------------------------------- /packages/persistence/src/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dashboard.outbox-service" 2 | export * from "./dashboard.query-repository" 3 | export * from "./dashboard.repository" 4 | -------------------------------------------------------------------------------- /packages/persistence/src/db.logger.ts: -------------------------------------------------------------------------------- 1 | import { createLogger } from "@undb/logger" 2 | import type { Logger } from "drizzle-orm" 3 | 4 | const drizzleLogger = createLogger("db") 5 | 6 | export class DrizzleLogger implements Logger { 7 | logQuery(query: string, params: unknown[]): void { 8 | drizzleLogger.debug({ query, params }, "drizzle.query") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/persistence/src/member/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./invitation.query-repository" 2 | export * from "./invitation.repository" 3 | export * from "./space-member.query-repository" 4 | export * from "./space-member.repository" 5 | -------------------------------------------------------------------------------- /packages/persistence/src/qb.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const QUERY_BUILDER = Symbol("queryBuilder") 4 | 5 | export const injectQueryBuilder = () => inject(QUERY_BUILDER) 6 | -------------------------------------------------------------------------------- /packages/persistence/src/qb.type.ts: -------------------------------------------------------------------------------- 1 | import type { Kysely, Transaction } from "kysely" 2 | import type { Database } from "./db" 3 | import type { createQueryBuilderWithDialect } from "./qb.util" 4 | 5 | export type Tx = Transaction 6 | export type AnonymousTx = Transaction 7 | 8 | export type IQueryBuilder = ReturnType 9 | export type IRecordQueryBuilder = Kysely 10 | -------------------------------------------------------------------------------- /packages/persistence/src/record/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./record.outbox-service" 2 | export * from "./record.query-repository" 3 | export * from "./record.repository" 4 | -------------------------------------------------------------------------------- /packages/persistence/src/share/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./share.query-repository" 2 | export * from "./share.repository" 3 | -------------------------------------------------------------------------------- /packages/persistence/src/space/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./space.query-repository" 2 | export * from "./space.repository" 3 | -------------------------------------------------------------------------------- /packages/persistence/src/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./table.outbox-service" 2 | export * from "./table.query-repository" 3 | export * from "./table.repository" 4 | -------------------------------------------------------------------------------- /packages/persistence/src/template/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./template.query-repository" 2 | -------------------------------------------------------------------------------- /packages/persistence/src/type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/packages/persistence/src/type.ts -------------------------------------------------------------------------------- /packages/persistence/src/underlying/conversion/conversion.constant.ts: -------------------------------------------------------------------------------- 1 | export const TEMP_FIELD_PREFIX = "__temp__" 2 | -------------------------------------------------------------------------------- /packages/persistence/src/underlying/conversion/noop.strategy.ts: -------------------------------------------------------------------------------- 1 | import { UnderlyingConversionStrategy } from "./conversion.interface" 2 | 3 | export class NoopConversionStrategy extends UnderlyingConversionStrategy { 4 | convert(): void | Promise {} 5 | } 6 | -------------------------------------------------------------------------------- /packages/persistence/src/underlying/underlying-formula.visitor.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/undb-io/undb/1a32ce830059e763d6c1cf721ac031283633c9b0/packages/persistence/src/underlying/underlying-formula.visitor.test.ts -------------------------------------------------------------------------------- /packages/persistence/src/underlying/underlying-table.ts: -------------------------------------------------------------------------------- 1 | import type { TableDo } from "@undb/table" 2 | 3 | export class UnderlyingTable { 4 | constructor(public readonly table: TableDo) {} 5 | 6 | public get name() { 7 | return this.table.id.value 8 | } 9 | 10 | public getFieldName(fieldId: string) { 11 | return `${this.name}.${fieldId}` 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/persistence/src/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./user.query-repository" 2 | export * from "./user.repository" 3 | -------------------------------------------------------------------------------- /packages/persistence/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./webhook.query-repository" 2 | export * from "./webhook.repository" 3 | -------------------------------------------------------------------------------- /packages/queries/README.md: -------------------------------------------------------------------------------- 1 | # @undb/queries 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/queries/src/get-readable-records.query.ts: -------------------------------------------------------------------------------- 1 | import { GetRecordsQuery } from "./get-records.query" 2 | 3 | export class GetReadableRecordsQuery extends GetRecordsQuery {} 4 | -------------------------------------------------------------------------------- /packages/query-handlers/README.md: -------------------------------------------------------------------------------- 1 | # @undb/query-handlers 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/query-handlers/src/registry.ts: -------------------------------------------------------------------------------- 1 | import { QueryBus } from "@undb/cqrs" 2 | import { container } from "@undb/di" 3 | import { queryHandlers } from "./handlers" 4 | 5 | export const registerQueries = () => { 6 | const queryBus = container.resolve(QueryBus) 7 | queryBus.register(queryHandlers) 8 | } 9 | -------------------------------------------------------------------------------- /packages/realtime/README.md: -------------------------------------------------------------------------------- 1 | # @undb/realtime 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.10. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/realtime/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./pubsub" 2 | export * from "./reply" 3 | -------------------------------------------------------------------------------- /packages/realtime/src/pubsub/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./pubsub.context" 2 | export * from "./rxjs.pubsub" 3 | -------------------------------------------------------------------------------- /packages/realtime/src/reply/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./reply.service" 2 | -------------------------------------------------------------------------------- /packages/share/README.md: -------------------------------------------------------------------------------- 1 | # @undb/share 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/share/src/dto/disable-share.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { shareTargetSchema } from "../share-target.vo" 3 | 4 | export const disableShareDTO = z.object({ 5 | target: shareTargetSchema, 6 | }) 7 | 8 | export type IDisableShareDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/share/src/dto/enable-share.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { shareTargetSchema } from "../share-target.vo" 3 | 4 | export const enableShareDTO = z.object({ 5 | target: shareTargetSchema, 6 | }) 7 | 8 | export type IEnableShareDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/share/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./disable-share.dto" 2 | export * from "./enable-share.dto" 3 | export * from "./share.dto" 4 | -------------------------------------------------------------------------------- /packages/share/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./services/index.js" 3 | export * from "./share-id.vo.js" 4 | export * from "./share-target.vo.js" 5 | export * from "./share.factory.js" 6 | export * from "./share.js" 7 | export * from "./share.repository.js" 8 | export * from "./share.util.js" 9 | export * from "./specifications/index.js" 10 | -------------------------------------------------------------------------------- /packages/share/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./share-guard.service.js" 2 | export * from "./share.service.js" 3 | -------------------------------------------------------------------------------- /packages/share/src/share.errors.ts: -------------------------------------------------------------------------------- 1 | import { ExceptionBase } from "@undb/domain" 2 | 3 | export class NotFoundShare extends ExceptionBase { 4 | code = "SHARE.NOT_FOUND" 5 | 6 | constructor() { 7 | super("Share not found") 8 | } 9 | } 10 | 11 | export class ShareNotEnabled extends ExceptionBase { 12 | code = "SHARE.NOT_ENABLED" 13 | 14 | constructor() { 15 | super("Share not enabled") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/space/README.md: -------------------------------------------------------------------------------- 1 | # @undb/space 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.21. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/space/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/space", 3 | "module": "src/index.ts", 4 | "type": "module", 5 | "types": "src/index.d.ts", 6 | "dependencies": { 7 | "@undb/context": "workspace:*", 8 | "@undb/logger": "workspace:*", 9 | "ts-pattern": "^5.6.2" 10 | }, 11 | "devDependencies": { 12 | "@types/bun": "latest" 13 | }, 14 | "peerDependencies": { 15 | "typescript": "^5.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/space/src/dto/create-space.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { spaceAvatarSchema, spaceIdSchema, spaceNameSchema } from "../value-objects" 3 | 4 | export const createSpaceDTO = z.object({ 5 | id: spaceIdSchema.optional(), 6 | avatar: spaceAvatarSchema.optional(), 7 | name: spaceNameSchema, 8 | isPersonal: z.boolean().optional(), 9 | }) 10 | 11 | export type ICreateSpaceDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/space/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-space.dto" 2 | export * from "./space.dto" 3 | export * from "./update-space.dto" 4 | -------------------------------------------------------------------------------- /packages/space/src/dto/space.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { spaceAvatarSchema, spaceIdSchema, spaceNameSchema } from "../value-objects" 3 | 4 | export const spaceDTO = z.object({ 5 | id: spaceIdSchema, 6 | name: spaceNameSchema, 7 | avatar: spaceAvatarSchema.nullable(), 8 | isPersonal: z.boolean(), 9 | }) 10 | 11 | export type ISpaceDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/space/src/dto/update-space.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { spaceAvatarSchema, spaceNameSchema } from "../value-objects" 3 | 4 | export const updateSpaceDTO = z.object({ 5 | name: spaceNameSchema, 6 | avatar: spaceAvatarSchema.optional(), 7 | }) 8 | 9 | export type IUpdateSpaceDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/space/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./interface" 3 | export * from "./space.constant" 4 | export * from "./space.do" 5 | export * from "./space.factory" 6 | export * from "./space.outbox" 7 | export * from "./space.repository" 8 | export * from "./space.service" 9 | export * from "./specifications" 10 | export * from "./value-objects" 11 | -------------------------------------------------------------------------------- /packages/space/src/space.constant.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_TEMP_SPACE_ID = "spa_temp" 2 | -------------------------------------------------------------------------------- /packages/space/src/space.outbox.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | import type { IOutboxService } from "@undb/domain" 3 | import type { Space } from "./space.do" 4 | 5 | export interface ISpaceOutboxService extends IOutboxService {} 6 | 7 | export const SPACE_OUTBOX_SERVICE = Symbol("SPACE_OUTBOX_SERVICE") 8 | 9 | export const injectSpaceOutboxService = () => inject(SPACE_OUTBOX_SERVICE) 10 | -------------------------------------------------------------------------------- /packages/space/src/value-objects/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./space-avatar.vo" 2 | export * from "./space-id.vo" 3 | export * from "./space-name.vo" 4 | -------------------------------------------------------------------------------- /packages/space/src/value-objects/space-avatar.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import * as z from "@undb/zod" 3 | 4 | export const spaceAvatarSchema = z.string().url().nullable() 5 | 6 | export class SpaceAvatar extends ValueObject> { 7 | static from(name: string | undefined): SpaceAvatar { 8 | return new SpaceAvatar({ value: name ?? null }) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/space/src/value-objects/space-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import * as z from "@undb/zod" 3 | 4 | export const spaceNameSchema = z.string().min(1) 5 | 6 | export class SpaceName extends ValueObject> { 7 | static from(name: string): SpaceName { 8 | return new SpaceName({ value: name }) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/table/README.md: -------------------------------------------------------------------------------- 1 | # @undb/table 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/table/src/dto/create-table-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { createFieldDTO } from "../modules/schema/fields/dto/create-field.dto" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const createTableFieldDTO = z.object({ 6 | tableId: tableId, 7 | field: createFieldDTO, 8 | }) 9 | 10 | export type ICreateTableFieldDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/dto/delete-table-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { deleteFieldDTO } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const deleteTableFieldDTO = deleteFieldDTO.merge( 6 | z.object({ 7 | tableId, 8 | }), 9 | ) 10 | 11 | export type IDeleteTableFieldDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/dto/delete-table.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { tableId } from "../table-id.vo" 3 | 4 | export const deleteTableDTO = z.object({ 5 | tableId, 6 | }) 7 | 8 | export type IDeleteTableDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/dto/delete-view.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewId } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const deleteViewDTO = z.object({ 6 | tableId, 7 | viewId: viewId.optional(), 8 | }) 9 | 10 | export type IDeleteViewDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/dto/duplicate-table-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { duplicateFieldDTO } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const duplicateTableFieldDTO = duplicateFieldDTO.merge( 6 | z.object({ 7 | tableId, 8 | }), 9 | ) 10 | 11 | export type IDuplicateTableFieldDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/dto/duplicate-view.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewId, viewName } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const duplicateViewDTO = z.object({ 6 | tableId, 7 | viewId: viewId.optional(), 8 | name: viewName, 9 | }) 10 | 11 | export type IDuplicateViewDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-default-view.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewId } from "../modules/views/view/view-id.vo" 3 | 4 | export const setDefaultViewDTO = z.object({ 5 | viewId: viewId, 6 | }) 7 | 8 | export type ISetDefaultViewDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-table-form.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewId } from "../modules" 3 | import { viewSort } from "../modules/views/view/view-sort" 4 | import { tableId } from "../table-id.vo" 5 | 6 | export const setViewSortDTO = z.object({ 7 | tableId: tableId, 8 | viewId: viewId.optional(), 9 | sort: viewSort, 10 | }) 11 | 12 | export type ISetViewSortDTO = z.infer 13 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-table-rls.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { rlsDTO } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const setTableRLSDTO = z.object({ 6 | tableId: tableId, 7 | rls: rlsDTO.nullable(), 8 | }) 9 | 10 | export type ISetTableRLSDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-view-aggregate.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewAggregate, viewId } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const setViewAggregateDTO = z.object({ 6 | tableId: tableId, 7 | viewId: viewId.optional(), 8 | aggregate: viewAggregate, 9 | }) 10 | 11 | export type ISetViewAggregateDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-view-filter.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewFilterGroup, viewId } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const setViewFilterDTO = z.object({ 6 | tableId: tableId, 7 | viewId: viewId.optional(), 8 | filter: viewFilterGroup, 9 | }) 10 | 11 | export type ISetViewFilterDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/dto/set-view-sort.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { formDTO } from "../modules" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const setTableFormDTO = z.object({ 6 | tableId: tableId, 7 | form: formDTO, 8 | }) 9 | 10 | export type ISetTableFormDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/dto/update-table-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { updateFieldDTO } from "../modules/schema/fields/dto/update-field.dto" 3 | import { tableId } from "../table-id.vo" 4 | 5 | export const updateTableFieldDTO = z.object({ 6 | tableId: tableId, 7 | field: updateFieldDTO, 8 | }) 9 | 10 | export type IUpdateTableFieldDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/dto/update-table.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { tableId } from "../table-id.vo" 3 | import { tableName } from "../table-name.vo" 4 | 5 | export const updateTableDTO = z.object({ 6 | id: tableId, 7 | name: tableName, 8 | }) 9 | 10 | export type IUpdateTableDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/methods/delete-table.method.ts: -------------------------------------------------------------------------------- 1 | import { TableDeletedEvent } from "../events/table-deleted.event" 2 | import type { TableDo } from "../table.do" 3 | 4 | export function deleteTable(this: TableDo): void { 5 | this.addDomainEvent(new TableDeletedEvent({ table: this.toJSON() }, this.spaceId)) 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/aggregate/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./aggregate.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/chart/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./chart.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/colors/colors.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { series } from "radash" 3 | import { COLORS, type IColors } from "./colors" 4 | 5 | export class ColorsVO extends ValueObject>> { 6 | constructor() { 7 | super(series(COLORS)) 8 | } 9 | 10 | next(color: IColors = "red") { 11 | return this.value.next(color) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/table/src/modules/colors/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./colors" 2 | export * from "./colors.vo" 3 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/dto/forms.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from "@undb/zod" 2 | import { formDTO } from "../form/form.vo" 3 | 4 | export const formsDTO = formDTO.array() 5 | 6 | export type IFormsDTO = z.infer 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-form.dto" 2 | export * from "./delete-form.dto" 3 | export * from "./duplicate-form.dto" 4 | export * from "./forms.dto" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/form/form-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "frm" 5 | 6 | const size = 5 7 | 8 | export const formId = z.string().startsWith(prefix) 9 | 10 | export const FormIdVO = IdFactory(prefix, size) 11 | 12 | export type FormId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/form/form-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const formName = z.string().min(2, { message: "form name contains at least 2 chars" }) 5 | 6 | export type IFormName = z.infer 7 | 8 | export class FormNameVo extends ValueObject { 9 | constructor(value: string) { 10 | super({ value }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./form-field.vo" 2 | export * from "./form-fields.vo" 3 | export * from "./form-id.vo" 4 | export * from "./form-name.vo" 5 | export * from "./form-option.vo" 6 | export * from "./form.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/forms/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./form" 2 | export * from "./dto" 3 | export * from "./forms.vo" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./aggregate" 2 | export * from "./chart" 3 | export * from "./colors" 4 | export * from "./forms" 5 | export * from "./records" 6 | export * from "./rls" 7 | export * from "./schema" 8 | export * from "./schema/fields/condition" 9 | export * from "./storage" 10 | export * from "./views" 11 | export * from "./widgets" 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/dto/count-records.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { tableId } from "../../../table-id.vo" 3 | import { viewFilterGroup } from "../../views" 4 | 5 | export const countRecordsDTO = z.object({ 6 | tableId: tableId, 7 | q: z.string().optional(), 8 | filters: viewFilterGroup.optional(), 9 | }) 10 | 11 | export type ICountRecordsDTO = z.infer 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./count-records.dto" 2 | export * from "./get-pivot-data.dto" 3 | export * from "./get-record-by-id.dto" 4 | export * from "./get-records.dto" 5 | export * from "./record-aggregate.dto" 6 | export * from "./records.dto" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/dto/records.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from "@undb/zod" 2 | import { recordDTO } from "../record/dto" 3 | 4 | export const recordsDTO = recordDTO.array() 5 | 6 | export type IRecordsDTO = z.infer 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./events" 3 | export * from "./record" 4 | export * from "./record.util" 5 | export * from "./records.vo" 6 | export * from "./services" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/bulk-delete-records.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewFilterGroup } from "../../../views" 3 | 4 | export const bulkDeleteRecordsDTO = z.object({ 5 | filter: viewFilterGroup, 6 | isOpenapi: z.boolean().optional(), 7 | }) 8 | 9 | export type IBulkDeleteRecordsDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/bulk-duplicate-records.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewFilterGroup } from "../../../views" 3 | 4 | export const bulkDuplicateRecordsDTO = z.object({ 5 | filter: viewFilterGroup, 6 | isOpenapi: z.boolean().optional(), 7 | }) 8 | 9 | export type IBulkDuplicateRecordsDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/delete-record.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { recordId } from "../record-id.vo" 3 | 4 | export const deleteRecordDTO = z.object({ 5 | id: recordId, 6 | }) 7 | 8 | export type IDeleteRecordDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/duplicate-record.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { recordId } from "../record-id.vo" 3 | 4 | export const duplicateRecordDTO = z.object({ 5 | id: recordId, 6 | }) 7 | 8 | export type IDuplicateRecordDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./bulk-delete-records.dto" 2 | export * from "./bulk-duplicate-records.dto" 3 | export * from "./bulk-update-records.dto" 4 | export * from "./create-record.dto" 5 | export * from "./delete-record.dto" 6 | export * from "./duplicate-record.dto" 7 | export * from "./record.dto" 8 | export * from "./submit-form.dto" 9 | export * from "./update-record.dto" 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/dto/update-record.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { recordId } from "../record-id.vo" 3 | import { recordValues } from "../record-values.vo" 4 | 5 | export const updateRecordDTO = z.object({ 6 | id: recordId, 7 | values: recordValues, 8 | }) 9 | 10 | export type IUpdateRecordDTO = z.infer 11 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/record-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "rec" 5 | 6 | const size = 8 7 | 8 | export const recordId = z.string().startsWith(prefix).or(z.string()) 9 | 10 | export const RecordIdVO = IdFactory(prefix, size) 11 | 12 | export type RecordId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/record.outbox-service.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const RECORD_OUTBOX_SERVICE = Symbol.for("RECORD_OUTBOX_SERVICE") 4 | export const injectRecordOutboxService = () => inject(RECORD_OUTBOX_SERVICE) 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/record.outbox-service.ts: -------------------------------------------------------------------------------- 1 | import type { IOutboxService } from "@undb/domain" 2 | import type { RecordDO } from "." 3 | 4 | export type IRecordOutboxService = IOutboxService 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/record/record.repository.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const RECORD_QUERY_REPOSITORY = Symbol("RECORD_QUERY_REPOSITORY") 4 | export const injectRecordQueryRepository = () => inject(RECORD_QUERY_REPOSITORY) 5 | 6 | export const RECORD_REPOSITORY = Symbol("RECORD_REPOSITORY") 7 | export const injectRecordRepository = () => inject(RECORD_REPOSITORY) 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./records.query-service" 2 | export * from "./records.query-service.provider" 3 | export * from "./records.service" 4 | export * from "./records.service.provider" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/services/records.query-service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { RecordsQueryService } from "./records.query-service" 3 | 4 | export const RECORDS_QUERY_SERVICE = Symbol.for("RECORDS_QUERY_SERVICE") 5 | export const injectRecordsQueryService = () => inject(RECORDS_QUERY_SERVICE) 6 | container.register(RECORDS_QUERY_SERVICE, { useClass: RecordsQueryService }) 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/records/services/records.service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { RecordsService } from "./records.service" 3 | 4 | export const RECORDS_SERVICE = Symbol.for("RECORDS_SERVICE") 5 | export const injectRecordsService = () => inject(RECORDS_SERVICE) 6 | container.register(RECORDS_SERVICE, { useClass: RecordsService }) 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/rls/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rls.dto" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/rls/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./table-rls-group.vo" 3 | export * from "./table-rls-id.vo" 4 | export * from "./table-rls.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/rls/table-rls-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "rls" 5 | 6 | const size = 5 7 | 8 | export const rlsId = z.string().startsWith(prefix) 9 | 10 | export const RLSIdVO = IdFactory(prefix, size) 11 | 12 | export type RLSId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-schema.dto" 2 | export * from "./schema.dto" 3 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/dto/schema.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from "@undb/zod" 2 | import { fieldDTO } from "../fields/dto/field.dto" 3 | 4 | export const schemaDTO = fieldDTO.array() 5 | 6 | export type ISchemaDTO = z.infer 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/condition/base.condition.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { fieldId } from "../field-id.vo" 3 | 4 | export function createBaseConditionSchema(optionType: OptionType) { 5 | return z.object({ 6 | field: fieldId, 7 | disabled: z.boolean().optional(), 8 | option: optionType, 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/condition/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./abstract-condition.vo" 2 | export * from "./base.condition" 3 | export * from "./condition.type" 4 | export * from "./condition.util" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/dto/delete-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { fieldId } from "../field-id.vo" 3 | 4 | export const deleteFieldDTO = z.object({ 5 | id: fieldId, 6 | }) 7 | 8 | export type IDeleteFieldDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/dto/duplicate-field.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { fieldId } from "../field-id.vo" 3 | 4 | export const duplicateFieldDTO = z.object({ 5 | id: fieldId, 6 | includeData: z.boolean(), 7 | }) 8 | 9 | export type IDuplicateFieldDTO = z.infer 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-field.dto" 2 | export * from "./default-create-field-dto" 3 | export * from "./delete-field.dto" 4 | export * from "./duplicate-field.dto" 5 | export * from "./field.dto" 6 | export * from "./update-field.dto" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/field-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "fld" 5 | const size = 6 6 | 7 | export const fieldId = z.string() 8 | export type IFieldId = z.infer 9 | 10 | export const FieldIdVo = IdFactory(prefix, size, fieldId) 11 | 12 | export type FieldId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/field-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const fieldName = z.string().min(1, { message: "field name contains at least 1 chars" }) 5 | 6 | export type IFieldName = z.infer 7 | 8 | export class FieldNameVo extends ValueObject { 9 | constructor(value: string) { 10 | super({ value }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/field-value.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | 3 | export abstract class FieldValueObject extends ValueObject { 4 | abstract isEmpty(): boolean 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/field.macro.ts: -------------------------------------------------------------------------------- 1 | export type FieldMacroPattern = `@${string}` 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/option/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./option-id.vo" 2 | export * from "./option.vo" 3 | export * from "./options.vo" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/abstractions/abstract-date.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const abstractDateAggregate = z.enum([ 4 | // 5 | "min", 6 | "max", 7 | "count", 8 | "count_empty", 9 | "count_not_empty", 10 | "count_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/abstractions/abstract-number.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const abstractNumberAggregate = z.enum([ 4 | // 5 | "sum", 6 | "avg", 7 | "min", 8 | "max", 9 | "count_empty", 10 | "count_not_empty", 11 | "count_uniq", 12 | "percent_empty", 13 | "percent_not_empty", 14 | "percent_uniq", 15 | ]) 16 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/abstractions/abstract-user-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { UserEmpty, UserEqual } from "./abstract-user-value.specification" 2 | 3 | export interface IAbstractUserFieldValueVisitor { 4 | userEqual(spec: UserEqual): void 5 | userEmpty(spec: UserEmpty): void 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/abstractions/abstract-user.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const abstractUserAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_not_empty", 7 | "count_uniq", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/attachment-field/attachment-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { AttachmentEmpty, AttachmentEqual } from "./attachment-field.specification" 2 | 3 | export interface IAttachmentFieldValueVisitor { 4 | attachmentEqual(s: AttachmentEqual): void 5 | attachmentEmpty(s: AttachmentEmpty): void 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/attachment-field/attachment-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const attachmentFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/attachment-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./attachment-field-constraint.vo" 2 | export * from "./attachment-field-value.visitor" 3 | export * from "./attachment-field-value.vo" 4 | export * from "./attachment-field.condition" 5 | export * from "./attachment-field.specification" 6 | export * from "./attachment-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/autoincrement-field/autoincrement-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractNumberFieldValueVisitor } from "../.." 2 | 3 | export interface IAutoIncrementFieldValueVisitor extends IAbstractNumberFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/autoincrement-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./autoincrement-field-value.visitor" 2 | export * from "./autoincrement-field-value.vo" 3 | export * from "./autoincrement-field.condition" 4 | export * from "./autoincrement-field.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/button-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./button-field-value.vo" 2 | export * from "./button-field.vo" 3 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/checkbox-field/checkbox-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { CheckboxEqual } from "./checkbox-field.specification" 2 | 3 | export interface ICheckboxFieldValueVisitor { 4 | checkboxEqual(spec: CheckboxEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/checkbox-field/checkbox-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const checkboxFieldAggregate = z.enum([ 4 | // 5 | "count_true", 6 | "count_false", 7 | "percent_true", 8 | "percent_false", 9 | ]) 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/checkbox-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./checkbox-field-constraint.vo" 2 | export * from "./checkbox-field-value.visitor" 3 | export * from "./checkbox-field-value.vo" 4 | export * from "./checkbox-field.condition" 5 | export * from "./checkbox-field.specification" 6 | export * from "./checkbox-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/created-at-field/created-at-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractDateFieldValueVisitor } from "../abstractions/abstract-date-value.visitor" 2 | 3 | export interface ICreatedAtFieldValueVisitor extends IAbstractDateFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/created-at-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./created-at-field-value.visitor" 2 | export * from "./created-at-field-value.vo" 3 | export * from "./created-at-field.condition" 4 | export * from "./created-at-field.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/created-by-field/created-by-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractUserFieldValueVisitor } from "../abstractions/abstract-user-value.visitor" 2 | 3 | export interface ICreatedByFieldValueVisitor extends IAbstractUserFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/created-by-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./created-by-field-value.visitor" 2 | export * from "./created-by-field-value.vo" 3 | export * from "./created-by-field.condition" 4 | export * from "./created-by-field.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/currency-field/currency-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const currencyFieldAggregate = z.enum([ 4 | // 5 | "sum", 6 | "avg", 7 | "min", 8 | "max", 9 | "count_empty", 10 | "count_uniq", 11 | "count_not_empty", 12 | "percent_empty", 13 | "percent_not_empty", 14 | "percent_uniq", 15 | ]) 16 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/currency-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./currency-field-constraint.vo" 2 | export * from "./currency-field-value.visitor" 3 | export * from "./currency-field-value.vo" 4 | export * from "./currency-field.condition" 5 | export * from "./currency-field.specification" 6 | export * from "./currency-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/date-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./date-field-constraint.vo" 2 | export * from "./date-field-macro" 3 | export * from "./date-field-value.visitor" 4 | export * from "./date-field-value.vo" 5 | export * from "./date-field.condition" 6 | export * from "./date-field.specification" 7 | export * from "./date-field.vo" 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/date-range-field/date-range-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const dateRangeFieldAggregate = z.enum([ 4 | // 5 | "count", 6 | "count_empty", 7 | "count_not_empty", 8 | "start_max", 9 | "end_max", 10 | "start_min", 11 | "end_min", 12 | ]) 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/date-range-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./date-range-field-constraint.vo" 2 | export * from "./date-range-field-value.visitor" 3 | export * from "./date-range-field-value.vo" 4 | export * from "./date-range-field.condition" 5 | export * from "./date-range-field.specification" 6 | export * from "./date-range-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/duration-field/duration-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { DurationEqual } from "./duration-field.specification" 2 | 3 | export interface IDurationFieldValueVisitor { 4 | durationEqual(s: DurationEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/duration-field/duration-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const durationFieldAggregate = z.enum([ 4 | // 5 | "count", 6 | "sum", 7 | "avg", 8 | "max", 9 | "min", 10 | "count_empty", 11 | "count_uniq", 12 | "count_not_empty", 13 | "percent_empty", 14 | "percent_not_empty", 15 | "percent_uniq", 16 | ]) 17 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/duration-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./duration-field-constraint.vo" 2 | export * from "./duration-field-value.visitor" 3 | export * from "./duration-field-value.vo" 4 | export * from "./duration-field.condition" 5 | export * from "./duration-field.specification" 6 | export * from "./duration-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/email-field/email-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { EmailEqual } from "./email-field.specification" 2 | 3 | export interface IEmailFieldValueVisitor { 4 | emailEqual(s: EmailEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/email-field/email-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const emailFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/email-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./email-field-constraint.vo" 2 | export * from "./email-field-value.visitor" 3 | export * from "./email-field-value.vo" 4 | export * from "./email-field.condition" 5 | export * from "./email-field.specification" 6 | export * from "./email-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/formula-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./formula-field-value.visitor" 2 | export * from "./formula-field-value.vo" 3 | export * from "./formula-field.condition" 4 | export * from "./formula-field.specification" 5 | export * from "./formula-field.vo" 6 | export * from "./formula.util" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/id-field/id-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IdEqual, IdIn } from "./id-field-value.specification" 2 | 3 | export interface IIdFieldValueVisitor { 4 | idEqual(spec: IdEqual): void 5 | idIn(spec: IdIn): void 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/id-field/id-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const idFieldAggregate = z.enum(["count"]) 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/id-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./id-field-value.specification" 2 | export * from "./id-field-value.visitor" 3 | export * from "./id-field-value.vo" 4 | export * from "./id-field.condition" 5 | export * from "./id-field.vo" 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/json-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./json-field-constraint.vo" 2 | export * from "./json-field-value.visitor" 3 | export * from "./json-field-value.vo" 4 | export * from "./json-field.condition" 5 | export * from "./json-field.specification" 6 | export * from "./json-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/json-field/json-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { JsonContains, JsonEmpty, JsonEqual } from "./json-field.specification" 2 | 3 | export interface IJsonFieldValueVisitor { 4 | jsonEqual(spec: JsonEqual): void 5 | jsonContains(spec: JsonContains): void 6 | jsonEmpty(spec: JsonEmpty): void 7 | } 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/json-field/json-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const jsonFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_not_empty", 7 | "percent_empty", 8 | "percent_not_empty", 9 | ]) 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/long-text-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./long-text-field-constraint.vo" 2 | export * from "./long-text-field-value.visitor" 3 | export * from "./long-text-field-value.vo" 4 | export * from "./long-text-field.condition" 5 | export * from "./long-text-field.specification" 6 | export * from "./long-text-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/long-text-field/long-text-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { LongTextEqual } from "./long-text-field.specification" 2 | 3 | export interface ILongTextFieldValueVisitor { 4 | longTextEqual(s: LongTextEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/long-text-field/long-text-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const longTextFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | // "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | // "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/number-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./number-field-constraint.vo" 2 | export * from "./number-field-value.visitor" 3 | export * from "./number-field-value.vo" 4 | export * from "./number-field.condition" 5 | export * from "./number-field.vo" 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/number-field/number-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractNumberFieldValueVisitor } from "../abstractions/abstract-number-value.visitor" 2 | 3 | export interface INumberFieldValueVisitor extends IAbstractNumberFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/percentage-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./percentage-field-constraint.vo" 2 | export * from "./percentage-field-value.visitor" 3 | export * from "./percentage-field-value.vo" 4 | export * from "./percentage-field.condition" 5 | export * from "./percentage-field.specification" 6 | export * from "./percentage-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/percentage-field/percentage-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { PercentageEqual } from "./percentage-field.specification" 2 | 3 | export interface IPercentageFieldValueVisitor { 4 | percentageEqual(s: PercentageEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/percentage-field/percentage-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const percentageFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rating-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rating-field-constraint.vo" 2 | export * from "./rating-field-value.visitor" 3 | export * from "./rating-field-value.vo" 4 | export * from "./rating-field.condition" 5 | export * from "./rating-field.specification" 6 | export * from "./rating-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rating-field/rating-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractNumberFieldValueVisitor } from "../abstractions/abstract-number-value.visitor" 2 | import type { RatingEqual } from "./rating-field.specification" 3 | 4 | export interface IRatingFieldValueVisitor extends IAbstractNumberFieldValueVisitor { 5 | ratingEqual(s: RatingEqual): void 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/reference-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./reference-field-constraint.vo" 2 | export * from "./reference-field-value.specification" 3 | export * from "./reference-field-value.visitor" 4 | export * from "./reference-field-value.vo" 5 | export * from "./reference-field.aggregate" 6 | export * from "./reference-field.condition" 7 | export * from "./reference-field.vo" 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/reference-field/reference-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { ReferenceEqual } from "./reference-field-value.specification" 2 | 3 | export interface IReferenceFieldValueVisitor { 4 | referenceEqual(spec: ReferenceEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/reference-field/reference-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const referenceFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_not_empty", 7 | ]) 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rollup-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rollup-field-value.visitor" 2 | export * from "./rollup-field-value.vo" 3 | export * from "./rollup-field.aggregate" 4 | export * from "./rollup-field.condition" 5 | export * from "./rollup-field.vo" 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rollup-field/rollup-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | export interface IRollupFieldValueVisitor {} 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rollup-field/rollup-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const rollupFieldAggregate = z.enum([ 4 | // 5 | "min", 6 | "max", 7 | "sum", 8 | "avg", 9 | ]) 10 | 11 | export const lookupFieldAggregate = z.enum([ 12 | // 13 | "count_empty", 14 | "count_not_empty", 15 | ]) 16 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/rollup-field/rollup-field.condition.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { createAbstractNumberFieldCondition } from "../abstractions" 3 | 4 | export const createRollupFieldCondition = createAbstractNumberFieldCondition 5 | 6 | export type IRollupFieldConditionSchema = ReturnType 7 | export type IRollupFieldCondition = z.infer 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/select-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./select-field-constraint.vo" 2 | export * from "./select-field-specification" 3 | export * from "./select-field-value.visitor" 4 | export * from "./select-field-value.vo" 5 | export * from "./select-field.condition" 6 | export * from "./select-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/select-field/select-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { SelectContainsAnyOf, SelectEmpty, SelectEqual } from "./select-field-specification" 2 | 3 | export interface ISelectFieldValueVisitor { 4 | selectEqual(spec: SelectEqual): void 5 | selectContainsAnyOf(spec: SelectContainsAnyOf): void 6 | selectEmpty(spec: SelectEmpty): void 7 | } 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/select-field/select-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const selectFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/string-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./string-field-constraint.vo" 2 | export * from "./string-field-value.specification" 3 | export * from "./string-field-value.visitor" 4 | export * from "./string-field-value.vo" 5 | export * from "./string-field.condition" 6 | export * from "./string-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/string-field/string-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const stringFieldAggregate = z.enum([ 4 | // 5 | "count", 6 | "count_empty", 7 | "count_uniq", 8 | "count_not_empty", 9 | "percent_empty", 10 | "percent_not_empty", 11 | "percent_uniq", 12 | ]) 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/updated-at-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./updated-at-field-value.visitor" 2 | export * from "./updated-at-field-value.vo" 3 | export * from "./updated-at-field.condition" 4 | export * from "./updated-at-field.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/updated-at-field/updated-at-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractDateFieldValueVisitor } from "../abstractions/abstract-date-value.visitor" 2 | 3 | export interface IUpdatedAtFieldValueVisitor extends IAbstractDateFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/updated-by-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./updated-by-field-value.visitor" 2 | export * from "./updated-by-field-value.vo" 3 | export * from "./updated-by-field.condition" 4 | export * from "./updated-by-field.vo" 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/updated-by-field/updated-by-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { IAbstractUserFieldValueVisitor } from "../abstractions/abstract-user-value.visitor" 2 | 3 | export interface IUpdatedByFieldValueVisitor extends IAbstractUserFieldValueVisitor {} 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/url-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./url-field-constraint.vo" 2 | export * from "./url-field-value.visitor" 3 | export * from "./url-field-value.vo" 4 | export * from "./url-field.condition" 5 | export * from "./url-field.specification" 6 | export * from "./url-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/url-field/url-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { UrlEqual } from "./url-field.specification" 2 | 3 | export interface IUrlFieldValueVisitor { 4 | urlEqual(s: UrlEqual): void 5 | } 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/url-field/url-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const urlFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_uniq", 7 | "count_not_empty", 8 | "percent_empty", 9 | "percent_not_empty", 10 | "percent_uniq", 11 | ]) 12 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/user-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./user-field-constraint.vo" 2 | export * from "./user-field-macro" 3 | export * from "./user-field-value.visitor" 4 | export * from "./user-field-value.vo" 5 | export * from "./user-field.condition" 6 | export * from "./user-field.vo" 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/user-field/user-field-value.visitor.ts: -------------------------------------------------------------------------------- 1 | import type { UserEmpty, UserEqual } from "../abstractions/abstract-user-value.specification" 2 | 3 | export interface IUserFieldValueVisitor { 4 | userEqual(spec: UserEqual): void 5 | userEmpty(spec: UserEmpty): void 6 | } 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/fields/variants/user-field/user-field.aggregate.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | 3 | export const userFieldAggregate = z.enum([ 4 | // 5 | "count_empty", 6 | "count_not_empty", 7 | "percent_empty", 8 | "percent_not_empty", 9 | ]) 10 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./fields" 3 | export * from "./schema.vo" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/rules/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./field-id-should-be-unique.rule" 2 | export * from "./field-name-should-be-unique.rule" 3 | -------------------------------------------------------------------------------- /packages/table/src/modules/schema/schema.type.ts: -------------------------------------------------------------------------------- 1 | import type { Field } from "./fields" 2 | 3 | export type SchemaIdMap = Map 4 | export type SchemaNameMap = Map 5 | -------------------------------------------------------------------------------- /packages/table/src/modules/storage/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./storage" 2 | export * from "./storage.provider" 3 | -------------------------------------------------------------------------------- /packages/table/src/modules/storage/storage.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const OBJECT_STORAGE = Symbol("OBJECT_STORAGE") 4 | 5 | export const injectObjectStorage = () => inject(OBJECT_STORAGE) 6 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/dto/export-view.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { viewId } from "../view/view-id.vo" 3 | 4 | export const exportViewDTO = z.object({ 5 | viewId: viewId, 6 | }) 7 | 8 | export type IExportViewDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-view.dto" 2 | export * from "./export-view.dto" 3 | export * from "./views.dto" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/dto/views.dto.ts: -------------------------------------------------------------------------------- 1 | import type { z } from "@undb/zod" 2 | import { viewDTO } from "../view/dto/view.dto" 3 | 4 | export const viewsDTO = viewDTO.array() 5 | 6 | export type IViewsDTO = z.infer 7 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./view" 3 | export * from "./views.vo" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view.dto" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./variants" 3 | export * from "./view-aggregate" 4 | export * from "./view-color" 5 | export * from "./view-fields" 6 | export * from "./view-filter" 7 | export * from "./view-id.vo" 8 | export * from "./view-name.vo" 9 | export * from "./view-option.vo" 10 | export * from "./view-sort" 11 | export * from "./view-widget" 12 | export * from "./view.type" 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/variants/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./calendar-view.vo" 2 | export * from "./gallery-view.vo" 3 | export * from "./grid-view.vo" 4 | export * from "./kanban-view.vo" 5 | export * from "./list-view.vo" 6 | export * from "./pivot-view.vo" 7 | 8 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-aggregate/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-aggregate.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-color/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-color.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-fields/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-fields.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-filter/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-filter.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "viw" 5 | const size = 6 6 | 7 | export const viewId = z.string().startsWith(prefix) 8 | export type IViewId = z.infer 9 | 10 | export const ViewIdVo = IdFactory(prefix, size, viewId) 11 | 12 | export type ViewId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const viewName = z.string().min(2, { message: "view name contains at least 2 chars" }) 5 | 6 | export type IViewName = z.infer 7 | 8 | export class ViewNameVo extends ValueObject { 9 | constructor(value: string) { 10 | super({ value }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-sort/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-sort.vo" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/views/view/view-widget/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./view-widget.dto" 2 | -------------------------------------------------------------------------------- /packages/table/src/modules/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./widget-id.vo" 2 | export * from "./widget-name.vo" 3 | export * from "./widget.vo" 4 | -------------------------------------------------------------------------------- /packages/table/src/modules/widgets/widget-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "wid" 5 | const size = 6 6 | 7 | export const widgetId = z.string().startsWith(prefix).or(z.string()) 8 | export type IWidgetId = z.infer 9 | 10 | export const WidgetIdVo = IdFactory(prefix, size, widgetId) 11 | 12 | export type WidgetId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/table/src/modules/widgets/widget-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const widgetName = z.string().min(2, { message: "widget name contains at least 2 chars" }) 5 | 6 | export type IWidgetName = z.infer 7 | 8 | export class WidgetNameVo extends ValueObject { 9 | constructor(value: string) { 10 | super({ value }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/table/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export type { ITableQueryService } from "./table.query-service" 2 | export * from "./table.query-service.provider" 3 | export * from "./table.service" 4 | export type { ITableService } from "./table.service" 5 | export * from "./table.service.provider" 6 | -------------------------------------------------------------------------------- /packages/table/src/services/methods/get-table.method.ts: -------------------------------------------------------------------------------- 1 | import { TableIdVo } from "../../table-id.vo" 2 | import type { TableQueryService } from "../table.query-service" 3 | 4 | export async function getTableMethod(this: TableQueryService, id: string) { 5 | const tableId = new TableIdVo(id) 6 | return (await this.repo.findOneById(tableId)).expect("not found table") 7 | } 8 | -------------------------------------------------------------------------------- /packages/table/src/services/table.query-service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { TableQueryService } from "./table.query-service" 3 | 4 | export const TABLE_QUERY_SERVICE = Symbol.for("TableQueryService") 5 | export const injectTableQueryService = () => inject(TABLE_QUERY_SERVICE) 6 | container.register(TABLE_QUERY_SERVICE, { useClass: TableQueryService }) 7 | -------------------------------------------------------------------------------- /packages/table/src/services/table.service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { TableService } from "./table.service" 3 | 4 | export const TABLE_SERVICE = Symbol.for("TableService") 5 | export const injectTableService = () => inject(TABLE_SERVICE) 6 | container.register(TABLE_SERVICE, { useClass: TableService }) 7 | -------------------------------------------------------------------------------- /packages/table/src/specifications/table-speficitaion.type.ts: -------------------------------------------------------------------------------- 1 | import { CompositeSpecification } from "@undb/domain" 2 | import type { TableDo } from "../table.do" 3 | import type { ITableSpecVisitor } from "./table-visitor.interface" 4 | 5 | export type ITableCompositeSpecification = CompositeSpecification 6 | -------------------------------------------------------------------------------- /packages/table/src/specifications/table.composite-specification.ts: -------------------------------------------------------------------------------- 1 | import { CompositeSpecification } from "@undb/domain" 2 | import type { TableDo } from "../table.do" 3 | import type { ITableSpecVisitor } from "./table-visitor.interface" 4 | 5 | export abstract class TableComositeSpecification extends CompositeSpecification {} 6 | -------------------------------------------------------------------------------- /packages/table/src/table-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "tbl" 5 | const size = 10 6 | 7 | export const tableId = z.string().startsWith(prefix) 8 | 9 | export const TableIdVo = IdFactory(prefix, size, tableId) 10 | 11 | export type TableId = InstanceType 12 | -------------------------------------------------------------------------------- /packages/table/src/table-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const tableName = z.string().min(2, { message: "table name contains at least 2 chars" }) 5 | 6 | export type ITableName = z.infer 7 | 8 | export class TableNameVo extends ValueObject { 9 | constructor(value: string) { 10 | super({ value: tableName.parse(value) }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/table/src/table.outbox-service.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const TABLE_OUTBOX_SERVICE = Symbol.for("TABLE_OUTBOX_SERVICE") 4 | export const injectTableOutboxService = () => inject(TABLE_OUTBOX_SERVICE) 5 | -------------------------------------------------------------------------------- /packages/table/src/table.outbox-service.ts: -------------------------------------------------------------------------------- 1 | import type { IOutboxService } from "@undb/domain" 2 | import type { TableDo } from "./table.do" 3 | 4 | export interface ITableOutboxService extends IOutboxService {} 5 | -------------------------------------------------------------------------------- /packages/table/src/table.query-repository.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const TABLE_QUERY_REPOSITORY = Symbol("TABLE_QUERY_REPOSITORY") 4 | export const injectTableQueryRepository = () => inject(TABLE_QUERY_REPOSITORY) 5 | -------------------------------------------------------------------------------- /packages/table/src/table.repository.provider.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | 3 | export const TABLE_REPOSITORY = Symbol("TABLE_REPOSITORY") 4 | export const injectTableRepository = () => inject(TABLE_REPOSITORY) 5 | -------------------------------------------------------------------------------- /packages/template/README.md: -------------------------------------------------------------------------------- 1 | # @undb/template 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.29. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/template/src/dto/get-template.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { templateId } from "../template/value-objects/template-id.vo" 3 | 4 | export const getTemplateDTO = z.object({ 5 | id: templateId, 6 | }) 7 | 8 | export type IGetTemplateDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/template/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-from-template.dto" 2 | export * from "./get-template.dto" 3 | export * from "./template-schema.dto" 4 | export * from "./template.dto" 5 | -------------------------------------------------------------------------------- /packages/template/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./dto" 2 | export * from "./schema" 3 | export * from "./service" 4 | export * from "./template" 5 | export * from "./template.factory" 6 | export * from "./templates" 7 | -------------------------------------------------------------------------------- /packages/template/src/schema/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./template-schema.schema" 2 | -------------------------------------------------------------------------------- /packages/template/src/service/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./template.service" 2 | export * from "./template.service.provider" 3 | -------------------------------------------------------------------------------- /packages/template/src/service/template.service.provider.ts: -------------------------------------------------------------------------------- 1 | import { container, inject } from "@undb/di" 2 | import { TemplateService } from "./template.service" 3 | 4 | export const TEMPLATE_SERVICE = Symbol.for("TemplateService") 5 | export const injectTemplateService = () => inject(TEMPLATE_SERVICE) 6 | container.register(TEMPLATE_SERVICE, { useClass: TemplateService }) 7 | -------------------------------------------------------------------------------- /packages/template/src/template/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./interface" 2 | export * from "./specifications" 3 | export * from "./template.do" 4 | export * from "./template.repository" 5 | -------------------------------------------------------------------------------- /packages/template/src/template/specifications/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./template-id.specification" 2 | -------------------------------------------------------------------------------- /packages/template/src/template/value-objects/template-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "tpl" 5 | const size = 8 6 | 7 | export const templateId = z.string().startsWith(prefix).or(z.string()) 8 | 9 | export const TemplateIdVo = IdFactory(prefix, size, templateId) 10 | 11 | export type TemplateId = InstanceType 12 | -------------------------------------------------------------------------------- /packages/template/src/template/value-objects/template-name.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | export const templateName = z.string() 5 | 6 | export type ITemplateName = z.infer 7 | 8 | export class TemplateNameVO extends ValueObject {} 9 | -------------------------------------------------------------------------------- /packages/trpc/README.md: -------------------------------------------------------------------------------- 1 | # @undb/trpc 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.6. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/trpc/src/index.ts: -------------------------------------------------------------------------------- 1 | export type { CreateTRPCProxyClient } from "@trpc/client" 2 | export * from "./router" 3 | -------------------------------------------------------------------------------- /packages/user/README.md: -------------------------------------------------------------------------------- 1 | # @undb/user 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/user/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/user", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "dependencies": { 7 | "lucia": "^3.2.2", 8 | "@undb/di": "workspace:*", 9 | "@undb/domain": "workspace:*" 10 | }, 11 | "devDependencies": { 12 | "@types/bun": "latest" 13 | }, 14 | "peerDependencies": { 15 | "typescript": "^5.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/user/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./user.repository" 2 | export * from "./user.service" 3 | export * from "./user.type" 4 | -------------------------------------------------------------------------------- /packages/user/src/user.type.ts: -------------------------------------------------------------------------------- 1 | export interface IUser { 2 | id: string 3 | email: string 4 | username: string 5 | password: string 6 | } 7 | -------------------------------------------------------------------------------- /packages/utils/README.md: -------------------------------------------------------------------------------- 1 | # @undb/utils 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.24. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@undb/utils", 3 | "module": "src/index.ts", 4 | "types": "src/index.d.ts", 5 | "type": "module", 6 | "devDependencies": { 7 | "@types/bun": "latest" 8 | }, 9 | "peerDependencies": { 10 | "typescript": "^5.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./get-next-name" 2 | -------------------------------------------------------------------------------- /packages/webhook/README.md: -------------------------------------------------------------------------------- 1 | # @undb/webhook 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.10. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/webhook/src/dto/delete-webhook.dto.ts: -------------------------------------------------------------------------------- 1 | import { z } from "@undb/zod" 2 | import { webhookId } from "../webhook-id.vo" 3 | 4 | export const deleteWebhookDTO = z.object({ 5 | id: webhookId, 6 | }) 7 | 8 | export type IDeleteWebhookDTO = z.infer 9 | -------------------------------------------------------------------------------- /packages/webhook/src/dto/get-webhooks.dto.ts: -------------------------------------------------------------------------------- 1 | import { tableId } from "@undb/table" 2 | import { z } from "@undb/zod" 3 | 4 | export const getWebhooksDTO = z.object({ 5 | tableId: tableId, 6 | }) 7 | -------------------------------------------------------------------------------- /packages/webhook/src/dto/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./create-webhook.dto" 2 | export * from "./delete-webhook.dto" 3 | export * from "./get-webhooks.dto" 4 | export * from "./update-webhook.dto" 5 | export * from "./webhook.dto" 6 | -------------------------------------------------------------------------------- /packages/webhook/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./webhook-sign.service.js" 2 | export * from "./webhook.http-service.js" 3 | export * from "./webhook-record.event-handler.js" 4 | -------------------------------------------------------------------------------- /packages/webhook/src/services/webhook-sign.service.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "@undb/di" 2 | import type { IWebhookMessageBody } from "../webhook.message.js" 3 | 4 | export interface IWebhookSignService { 5 | sign(body: IWebhookMessageBody): string 6 | } 7 | 8 | export const WEBHOOK_SIGN_SERVICE = Symbol("WEBHOOK_SIGN_SERVICE") 9 | 10 | export const injectWebhookSignService = () => inject(WEBHOOK_SIGN_SERVICE) 11 | -------------------------------------------------------------------------------- /packages/webhook/src/webhook-headers.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "zod" 3 | 4 | export const webhookHeadersSchema = z.record(z.string()) 5 | 6 | export type IWebhookHeaders = z.infer 7 | 8 | export class WebhookHeaders extends ValueObject { 9 | toJSON() { 10 | return this.props 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/webhook/src/webhook-id.vo.ts: -------------------------------------------------------------------------------- 1 | import { IdFactory } from "@undb/domain" 2 | import { z } from "@undb/zod" 3 | 4 | const prefix = "whk" 5 | 6 | const size = 8 7 | 8 | export const webhookId = z.string().startsWith(prefix) 9 | 10 | export const WebhookIdVO = IdFactory(prefix, size) 11 | 12 | export type WebhookId = InstanceType 13 | -------------------------------------------------------------------------------- /packages/webhook/src/webhook-method.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "zod" 3 | 4 | export const webhookMethodSchema = z.enum(["POST", "PATCH"]) 5 | 6 | export type IWebhookMethod = z.infer 7 | 8 | export class WebhookMethod extends ValueObject {} 9 | -------------------------------------------------------------------------------- /packages/webhook/src/webhook-url.vo.ts: -------------------------------------------------------------------------------- 1 | import { ValueObject } from "@undb/domain" 2 | import { z } from "zod" 3 | 4 | export const webhookURLSchema = z.string().url() 5 | 6 | export type IWebhookURL = z.infer 7 | 8 | export class WebhookURL extends ValueObject {} 9 | -------------------------------------------------------------------------------- /packages/webhook/src/webhook.constants.ts: -------------------------------------------------------------------------------- 1 | export const UNDB_SIGNATURE_HEADER_NAME = "x-undb-signature" 2 | -------------------------------------------------------------------------------- /packages/zod/README.md: -------------------------------------------------------------------------------- 1 | # @undb/zod 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run src/index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | --------------------------------------------------------------------------------