insforge 0.3.2 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +20 -0
- package/.cursor/rules/cursor-rules.mdc +94 -0
- package/.dockerignore +3 -0
- package/.env.example +33 -4
- package/.github/ISSUE_TEMPLATE/bug_report.yml +13 -60
- package/.github/ISSUE_TEMPLATE/config.yml +2 -2
- package/.github/ISSUE_TEMPLATE/feature_request.yml +10 -63
- package/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- package/.github/workflows/build-image.yml +2 -1
- package/.github/workflows/e2e.yml +63 -0
- package/CHANGELOG.md +41 -0
- package/CLAUDE_PLUGIN.md +104 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +1 -1
- package/Dockerfile +4 -1
- package/README.md +66 -18
- package/assets/mcpInstallv2.png +0 -0
- package/assets/sampleResponse.png +0 -0
- package/auth/index.html +13 -0
- package/auth/package.json +28 -0
- package/auth/public/favicon.ico +0 -0
- package/auth/src/App.tsx +33 -0
- package/auth/src/components/ErrorCard.tsx +37 -0
- package/auth/src/components/Layout.tsx +13 -0
- package/auth/src/index.css +19 -0
- package/auth/src/lib/broadcastService.ts +115 -0
- package/auth/src/lib/utils.ts +11 -0
- package/auth/src/main.tsx +22 -0
- package/auth/src/pages/ForgotPasswordPage.tsx +11 -0
- package/auth/src/pages/ResetPasswordPage.tsx +11 -0
- package/auth/src/pages/SignInPage.tsx +57 -0
- package/auth/src/pages/SignUpPage.tsx +57 -0
- package/auth/src/pages/VerifyEmailPage.tsx +20 -0
- package/auth/src/vite-env.d.ts +10 -0
- package/auth/tsconfig.json +32 -0
- package/auth/tsconfig.node.json +11 -0
- package/auth/vite.config.ts +25 -0
- package/backend/package.json +9 -9
- package/backend/src/api/{middleware → middlewares}/auth.ts +8 -9
- package/backend/src/api/middlewares/rate-limiters.ts +127 -0
- package/backend/src/api/routes/{ai.ts → ai/index.routes.ts} +20 -24
- package/backend/src/api/routes/auth/index.routes.ts +570 -0
- package/backend/src/api/routes/auth/oauth.routes.ts +448 -0
- package/backend/src/api/routes/{database.advance.ts → database/advance.routes.ts} +107 -65
- package/backend/src/api/routes/database/index.routes.ts +13 -0
- package/backend/src/api/routes/{database.records.ts → database/records.routes.ts} +22 -8
- package/backend/src/api/routes/{database.tables.ts → database/tables.routes.ts} +20 -23
- package/backend/src/api/routes/docs/index.routes.ts +76 -0
- package/backend/src/api/routes/functions/index.routes.ts +188 -0
- package/backend/src/api/routes/{logs.ts → logs/index.routes.ts} +25 -30
- package/backend/src/api/routes/{metadata.ts → metadata/index.routes.ts} +21 -31
- package/backend/src/api/routes/{secrets.ts → secrets/index.routes.ts} +27 -22
- package/backend/src/api/routes/{storage.ts → storage/index.routes.ts} +34 -53
- package/backend/src/api/routes/usage/index.routes.ts +89 -0
- package/backend/src/infra/config/app.config.ts +51 -0
- package/backend/src/{core/database/manager.ts → infra/database/database.manager.ts} +76 -85
- package/backend/src/infra/database/migrations/013_create-auth-schema-functions.sql +44 -0
- package/backend/src/infra/database/migrations/014_add-updated-at-trigger-user-table.sql +8 -0
- package/backend/src/infra/database/migrations/015_create-auth-config-and-email-otp-tables.sql +60 -0
- package/backend/src/infra/database/migrations/016_update-auth-config-and-email-otp.sql +24 -0
- package/backend/src/{core/secrets/encryption.ts → infra/security/encryption.manager.ts} +3 -2
- package/backend/src/infra/security/token.manager.ts +125 -0
- package/backend/src/{core/socket/socket.ts → infra/socket/socket.manager.ts} +15 -15
- package/backend/src/providers/ai/openrouter.provider.ts +377 -0
- package/backend/src/providers/email/base.provider.ts +41 -0
- package/backend/src/providers/email/cloud.provider.ts +187 -0
- package/backend/src/{core/logs/providers → providers/logs}/base.provider.ts +11 -11
- package/backend/src/{core/logs/providers → providers/logs}/cloudwatch.provider.ts +61 -38
- package/backend/src/providers/logs/local.provider.ts +185 -0
- package/backend/src/providers/oauth/base.provider.ts +29 -0
- package/backend/src/providers/oauth/discord.provider.ts +195 -0
- package/backend/src/providers/oauth/facebook.provider.ts +194 -0
- package/backend/src/providers/oauth/github.provider.ts +208 -0
- package/backend/src/providers/oauth/google.provider.ts +249 -0
- package/backend/src/providers/oauth/index.ts +7 -0
- package/backend/src/providers/oauth/linkedin.provider.ts +240 -0
- package/backend/src/providers/oauth/microsoft.provider.ts +169 -0
- package/backend/src/providers/oauth/x.provider.ts +202 -0
- package/backend/src/providers/storage/base.provider.ts +29 -0
- package/backend/src/providers/storage/local.provider.ts +103 -0
- package/backend/src/providers/storage/s3.provider.ts +313 -0
- package/backend/src/server.ts +70 -74
- package/backend/src/{core/ai/config.ts → services/ai/ai-config.service.ts} +19 -24
- package/backend/src/services/ai/ai-model.service.ts +60 -0
- package/backend/src/{core/ai/usage.ts → services/ai/ai-usage.service.ts} +28 -35
- package/backend/src/{core/ai/chat.ts → services/ai/chat-completion.service.ts} +37 -24
- package/backend/src/services/ai/helpers.ts +64 -0
- package/backend/src/{core/ai/image.ts → services/ai/image-generation.service.ts} +17 -19
- package/backend/src/services/ai/index.ts +13 -0
- package/backend/src/services/auth/auth-config.service.ts +250 -0
- package/backend/src/services/auth/auth-otp.service.ts +424 -0
- package/backend/src/services/auth/auth.service.ts +1136 -0
- package/backend/src/services/auth/index.ts +4 -0
- package/backend/src/{core/auth/oauth.ts → services/auth/oauth-config.service.ts} +106 -52
- package/backend/src/{core/database/advance.ts → services/database/database-advance.service.ts} +97 -131
- package/backend/src/services/database/database-table.service.ts +811 -0
- package/backend/src/services/email/email.service.ts +75 -0
- package/backend/src/{core/functions/functions.ts → services/functions/function.service.ts} +95 -88
- package/backend/src/{core/logs/audit.ts → services/logs/audit.service.ts} +92 -75
- package/backend/src/services/logs/log.service.ts +73 -0
- package/backend/src/{core/secrets/secrets.ts → services/secrets/secret.service.ts} +48 -66
- package/backend/src/services/storage/storage.service.ts +617 -0
- package/backend/src/services/usage/usage.service.ts +149 -0
- package/backend/src/types/auth.ts +66 -2
- package/backend/src/types/email.ts +8 -0
- package/backend/src/types/error-constants.ts +4 -0
- package/backend/src/types/logs.ts +0 -29
- package/backend/src/{core/socket/types.ts → types/socket.ts} +5 -6
- package/backend/src/utils/environment.ts +9 -3
- package/backend/src/utils/logger.ts +20 -2
- package/backend/src/utils/seed.ts +150 -57
- package/backend/src/utils/sql-parser.ts +1 -1
- package/backend/src/utils/utils.ts +114 -0
- package/backend/src/utils/validations.ts +40 -4
- package/backend/tests/local/test-ai-config.sh +129 -0
- package/backend/tests/local/test-ai-usage.sh +80 -0
- package/backend/tests/local/test-auth-router.sh +1 -1
- package/backend/tests/local/test-e2e.sh +1 -1
- package/backend/tests/local/test-functions.sh +123 -0
- package/backend/tests/local/test-logs.sh +132 -0
- package/backend/tests/local/test-public-bucket.sh +3 -3
- package/backend/tests/local/test-secrets.sh +14 -12
- package/backend/tests/local/test-traditional-rest.sh +2 -2
- package/backend/tests/manual/test-rawsql-modes.sh +244 -0
- package/backend/tests/test-config.sh +37 -1
- package/backend/tests/unit/cloud-token.test.ts +48 -0
- package/backend/tests/unit/constant.test.ts +8 -0
- package/backend/tests/unit/email.test.ts +372 -0
- package/backend/tests/unit/environment.test.ts +59 -0
- package/backend/tests/unit/helpers.test.ts +63 -0
- package/backend/tests/unit/logger.test.ts +22 -0
- package/backend/tests/unit/rate-limit.test.ts +154 -0
- package/backend/tests/unit/response.test.ts +58 -0
- package/backend/tests/unit/sql-parser.test.ts +74 -0
- package/backend/tests/unit/uuid.test.ts +21 -0
- package/backend/tests/unit/validations.test.ts +80 -0
- package/backend/tsconfig.json +1 -1
- package/backend/vitest.config.ts +11 -0
- package/claude-plugin/.claude-plugin/plugin.json +24 -0
- package/claude-plugin/README.md +133 -0
- package/claude-plugin/skills/insforge-schema-patterns/SKILL.md +270 -0
- package/docker-compose.prod.yml +60 -4
- package/docker-compose.yml +65 -4
- package/docker-init/db/db-init.sql +6 -34
- package/docker-init/logs/vector.yml +236 -0
- package/docs/README.md +44 -0
- package/docs/changelog.mdx +67 -0
- package/docs/core-concepts/ai/architecture.mdx +373 -0
- package/docs/core-concepts/ai/sdk.mdx +213 -0
- package/docs/core-concepts/authentication/architecture.mdx +278 -0
- package/docs/core-concepts/authentication/sdk.mdx +414 -0
- package/docs/core-concepts/authentication/ui-components/customization.mdx +529 -0
- package/docs/core-concepts/authentication/ui-components/nextjs.mdx +221 -0
- package/docs/core-concepts/authentication/ui-components/react-router.mdx +184 -0
- package/docs/core-concepts/authentication/ui-components/react.mdx +129 -0
- package/docs/core-concepts/database/architecture.mdx +256 -0
- package/docs/core-concepts/database/sdk.mdx +382 -0
- package/docs/core-concepts/functions/architecture.mdx +105 -0
- package/docs/core-concepts/functions/sdk.mdx +184 -0
- package/docs/core-concepts/storage/architecture.mdx +243 -0
- package/docs/core-concepts/storage/sdk.mdx +253 -0
- package/docs/deployment/README.md +94 -0
- package/docs/deployment/deploy-to-aws-ec2.md +565 -0
- package/docs/deployment/deploy-to-azure-virtual-machines.md +313 -0
- package/docs/deployment/deploy-to-google-cloud-compute-engine.md +613 -0
- package/docs/deployment/deploy-to-render.md +441 -0
- package/docs/docs.json +210 -0
- package/docs/examples/framework-guides/nextjs.mdx +131 -0
- package/docs/examples/framework-guides/nuxt.mdx +165 -0
- package/docs/examples/framework-guides/react.mdx +165 -0
- package/docs/examples/framework-guides/svelte.mdx +153 -0
- package/docs/examples/framework-guides/vue.mdx +159 -0
- package/docs/examples/overview.mdx +67 -0
- package/docs/favicon.svg +19 -0
- package/docs/images/changelog/nov-2025/auth-components.webp +0 -0
- package/docs/images/changelog/nov-2025/database-metadata.webp +0 -0
- package/docs/images/changelog/nov-2025/quickstart-prompts.webp +0 -0
- package/docs/images/changelog/nov-2025/sql-editor.webp +0 -0
- package/docs/images/changelog/nov-2025/usage-page.webp +0 -0
- package/docs/images/changelog/october-2025/csv-upload.webp +0 -0
- package/docs/images/changelog/october-2025/logs-feature.webp +0 -0
- package/docs/images/changelog/october-2025/oauth-providers.webp +0 -0
- package/docs/images/checks-passed.png +0 -0
- package/docs/images/dashboard-connect-expanded.png +0 -0
- package/docs/images/dashboard-connect.png +0 -0
- package/docs/images/hero-dark.png +0 -0
- package/docs/images/hero-light.png +0 -0
- package/docs/images/icons/ai.svg +4 -0
- package/docs/images/icons/auth.svg +1 -0
- package/docs/images/icons/database.svg +1 -0
- package/docs/images/icons/function.svg +1 -0
- package/docs/images/icons/storage.svg +1 -0
- package/docs/images/logos/nextjs.svg +4 -0
- package/docs/images/logos/nuxt.svg +4 -0
- package/docs/images/logos/react.svg +5 -0
- package/docs/images/logos/svelte.svg +4 -0
- package/docs/images/logos/vue.svg +5 -0
- package/docs/images/mcp-install.png +0 -0
- package/docs/images/onboarding-mcp.png +0 -0
- package/docs/insforge-instructions-sdk.md +55 -374
- package/docs/introduction.mdx +45 -0
- package/docs/logo/dark.svg +22 -0
- package/docs/logo/light.svg +20 -0
- package/docs/partnership.mdx +647 -0
- package/docs/quickstart.mdx +83 -0
- package/docs/showcase/2048-arena.png +0 -0
- package/docs/showcase/framegen-cloud.png +0 -0
- package/docs/showcase/line-connect-race.png +0 -0
- package/docs/showcase/moment-vibe.png +0 -0
- package/docs/showcase/national-flags.png +0 -0
- package/docs/showcase/pokemon-vibe.png +0 -0
- package/docs/showcase/pure-browse-buy.png +0 -0
- package/docs/showcase.mdx +52 -0
- package/docs/snippets/sdk-installation.mdx +22 -0
- package/docs/snippets/service-icons.mdx +27 -0
- package/eslint.config.js +10 -3
- package/frontend/package.json +10 -4
- package/frontend/src/App.tsx +13 -82
- package/frontend/src/assets/icons/connected.svg +3 -0
- package/frontend/src/assets/icons/loader.svg +9 -0
- package/frontend/src/assets/logos/apple.svg +4 -0
- package/frontend/src/assets/logos/discord.svg +1 -1
- package/frontend/src/assets/logos/facebook.svg +3 -0
- package/frontend/src/assets/logos/instagram.svg +2 -0
- package/frontend/src/assets/logos/linkedin.svg +3 -0
- package/frontend/src/assets/logos/microsoft.svg +1 -0
- package/frontend/src/assets/logos/spotify.svg +17 -0
- package/frontend/src/assets/logos/tiktok.svg +6 -0
- package/frontend/src/assets/logos/x.svg +3 -0
- package/frontend/src/components/Checkbox.tsx +27 -29
- package/frontend/src/components/CodeBlock.tsx +55 -2
- package/frontend/src/components/CodeEditor.tsx +92 -0
- package/frontend/src/components/ConfirmDialog.tsx +1 -1
- package/frontend/src/components/ConnectCTA.tsx +38 -0
- package/frontend/src/components/CopyButton.tsx +52 -15
- package/frontend/src/components/ErrorState.tsx +1 -2
- package/frontend/src/components/FeatureSidebar.tsx +6 -6
- package/frontend/src/components/FeatureSidebarItem.tsx +2 -2
- package/frontend/src/components/JsonHighlight.tsx +21 -9
- package/frontend/src/components/ProjectInfoModal.tsx +128 -0
- package/frontend/src/components/PromptDialog.tsx +1 -4
- package/frontend/src/components/SearchInput.tsx +1 -2
- package/frontend/src/components/Stepper.tsx +53 -0
- package/frontend/src/components/ThemeToggle.tsx +3 -3
- package/frontend/src/components/datagrid/DataGrid.tsx +25 -32
- package/frontend/src/components/datagrid/cell-editors/DateCellEditor.tsx +1 -2
- package/frontend/src/components/datagrid/cell-editors/JsonCellEditor.tsx +2 -4
- package/frontend/src/components/datagrid/index.ts +23 -0
- package/frontend/src/components/index.ts +23 -30
- package/frontend/src/components/layout/AppHeader.tsx +133 -92
- package/frontend/src/components/layout/AppSidebar.tsx +80 -170
- package/frontend/src/components/layout/Layout.tsx +12 -23
- package/frontend/src/components/layout/PrimaryMenu.tsx +187 -0
- package/frontend/src/components/layout/SecondaryMenu.tsx +70 -0
- package/frontend/src/components/layout/index.ts +5 -0
- package/frontend/src/components/radix/Tooltip.tsx +24 -13
- package/frontend/src/components/radix/index.ts +22 -0
- package/frontend/src/features/ai/components/AIConfigCard.tsx +129 -83
- package/frontend/src/features/ai/components/AIEmptyState.tsx +12 -7
- package/frontend/src/features/ai/components/ModalityFilterSidebar.tsx +101 -0
- package/frontend/src/features/ai/components/ModelSelectionDialog.tsx +135 -0
- package/frontend/src/features/ai/components/ModelSelectionGrid.tsx +51 -0
- package/frontend/src/features/ai/components/SystemPromptDialog.tsx +118 -0
- package/frontend/src/features/ai/components/index.ts +6 -0
- package/frontend/src/features/ai/helpers.ts +57 -71
- package/frontend/src/features/ai/hooks/useAIConfigs.ts +39 -113
- package/frontend/src/features/ai/hooks/useAIUsage.ts +0 -2
- package/frontend/src/features/ai/page/AIPage.tsx +67 -79
- package/frontend/src/features/ai/services/ai.service.ts +5 -5
- package/frontend/src/features/auth/components/AuthPreview.tsx +96 -0
- package/frontend/src/features/auth/components/OAuthConfigDialog.tsx +53 -30
- package/frontend/src/features/auth/components/UserFormDialog.tsx +13 -6
- package/frontend/src/features/auth/components/UsersDataGrid.tsx +44 -14
- package/frontend/src/features/auth/components/index.ts +5 -0
- package/frontend/src/features/auth/helpers.tsx +200 -0
- package/frontend/src/features/auth/hooks/useAnonToken.ts +30 -0
- package/frontend/src/features/auth/hooks/useAuthConfig.ts +48 -0
- package/frontend/src/features/auth/hooks/useOAuthConfig.ts +14 -10
- package/frontend/src/features/auth/hooks/useUsers.ts +43 -5
- package/frontend/src/features/auth/index.ts +3 -2
- package/frontend/src/features/auth/page/AuthMethodsPage.tsx +275 -0
- package/frontend/src/features/auth/page/ConfigurationPage.tsx +395 -0
- package/frontend/src/features/auth/page/UsersPage.tsx +285 -0
- package/frontend/src/features/auth/services/anonToken.service.ts +11 -0
- package/frontend/src/features/auth/services/config.service.ts +19 -0
- package/frontend/src/features/auth/services/{oauth.service.ts → oauth-config.service.ts} +4 -4
- package/frontend/src/features/auth/services/{auth.service.ts → user.service.ts} +7 -53
- package/frontend/src/features/dashboard/components/ConnectionSuccessBanner.tsx +35 -0
- package/frontend/src/features/dashboard/components/PromptCard.tsx +21 -0
- package/frontend/src/features/dashboard/components/PromptDialog.tsx +103 -0
- package/frontend/src/features/dashboard/components/StatsCard.tsx +50 -0
- package/frontend/src/features/dashboard/components/index.ts +4 -0
- package/frontend/src/features/dashboard/page/DashboardPage.tsx +187 -169
- package/frontend/src/features/dashboard/prompts/ai-chatbot.ts +13 -0
- package/frontend/src/features/dashboard/prompts/crm-system.ts +13 -0
- package/frontend/src/features/dashboard/prompts/ecommerce-platform.ts +12 -0
- package/frontend/src/features/dashboard/prompts/index.ts +31 -0
- package/frontend/src/features/dashboard/prompts/instagram-clone.ts +11 -0
- package/frontend/src/features/dashboard/prompts/notion-clone.ts +14 -0
- package/frontend/src/features/dashboard/prompts/reddit-clone.ts +12 -0
- package/frontend/src/features/database/components/DatabaseDataGrid.tsx +48 -17
- package/frontend/src/features/database/components/ForeignKeyCell.tsx +15 -34
- package/frontend/src/features/database/components/ForeignKeyPopover.tsx +19 -20
- package/frontend/src/features/database/components/LinkRecordModal.tsx +120 -125
- package/frontend/src/features/database/components/RecordFormDialog.tsx +22 -33
- package/frontend/src/features/database/components/RecordFormField.tsx +45 -47
- package/frontend/src/features/database/components/TableEmptyState.tsx +6 -5
- package/frontend/src/features/database/components/TableForm.tsx +28 -15
- package/frontend/src/features/database/components/TableFormColumn.tsx +2 -3
- package/frontend/src/features/database/components/TableSidebar.tsx +1 -1
- package/frontend/src/features/database/components/TablesEmptyState.tsx +48 -0
- package/frontend/src/features/database/components/TemplateCard.tsx +37 -0
- package/frontend/src/features/database/components/TemplatePreview.tsx +92 -0
- package/frontend/src/features/database/components/index.ts +19 -0
- package/frontend/src/features/database/constants.ts +28 -2
- package/frontend/src/features/database/contexts/SQLEditorContext.tsx +188 -0
- package/frontend/src/features/database/helpers.ts +2 -2
- package/frontend/src/features/database/hooks/useCSVImport.ts +29 -0
- package/frontend/src/features/database/hooks/useFullMetadata.ts +18 -0
- package/frontend/src/features/database/hooks/useRawSQL.ts +55 -0
- package/frontend/src/features/database/hooks/useRecords.ts +139 -0
- package/frontend/src/features/database/hooks/useTables.ts +131 -0
- package/frontend/src/features/database/index.ts +6 -1
- package/frontend/src/features/database/page/FunctionsPage.tsx +211 -0
- package/frontend/src/features/database/page/IndexesPage.tsx +240 -0
- package/frontend/src/features/database/page/PoliciesPage.tsx +248 -0
- package/frontend/src/features/database/page/SQLEditorPage.tsx +382 -0
- package/frontend/src/features/database/page/{DatabasePage.tsx → TablesPage.tsx} +186 -185
- package/frontend/src/features/database/page/TemplatesPage.tsx +39 -0
- package/frontend/src/features/database/page/TriggersPage.tsx +242 -0
- package/frontend/src/features/database/services/advance.service.ts +66 -0
- package/frontend/src/features/database/services/{database.service.ts → record.service.ts} +67 -64
- package/frontend/src/features/database/services/table.service.ts +64 -0
- package/frontend/src/features/database/templates/ai-chatbot.ts +402 -0
- package/frontend/src/features/database/templates/crm-system.ts +528 -0
- package/frontend/src/features/database/templates/ecommerce-platform.ts +553 -0
- package/frontend/src/features/database/templates/index.ts +34 -0
- package/frontend/src/features/database/templates/instagram-clone.ts +222 -0
- package/frontend/src/features/database/templates/notion-clone.ts +483 -0
- package/frontend/src/features/database/templates/reddit-clone.ts +526 -0
- package/frontend/src/features/functions/components/FunctionRow.tsx +2 -1
- package/frontend/src/features/functions/components/FunctionsSidebar.tsx +1 -1
- package/frontend/src/features/functions/components/SecretRow.tsx +1 -1
- package/frontend/src/features/functions/components/index.ts +5 -0
- package/frontend/src/features/functions/hooks/useFunctions.ts +4 -4
- package/frontend/src/features/{secrets → functions}/hooks/useSecrets.ts +5 -5
- package/frontend/src/features/functions/page/FunctionsPage.tsx +160 -17
- package/frontend/src/features/functions/{components/SecretsContent.tsx → page/SecretsPage.tsx} +8 -12
- package/frontend/src/features/functions/services/{functions.service.ts → function.service.ts} +2 -2
- package/frontend/src/features/{secrets/services/secrets.service.ts → functions/services/secret.service.ts} +2 -2
- package/frontend/src/features/login/hooks/usePartnerOrigin.ts +27 -0
- package/frontend/src/features/login/page/CloudLoginPage.tsx +79 -54
- package/frontend/src/features/login/page/LoginPage.tsx +16 -23
- package/frontend/src/features/login/services/partnership.service.ts +65 -0
- package/frontend/src/features/logs/components/LogsDataGrid.tsx +89 -0
- package/frontend/src/features/logs/components/SeverityBadge.tsx +18 -0
- package/frontend/src/features/logs/components/index.ts +2 -0
- package/frontend/src/features/logs/helpers.ts +24 -0
- package/frontend/src/features/logs/hooks/useAuditLogs.ts +4 -4
- package/frontend/src/features/logs/hooks/useLogSources.ts +137 -0
- package/frontend/src/features/logs/hooks/useLogs.ts +163 -0
- package/frontend/src/features/logs/hooks/useMcpUsage.ts +181 -0
- package/frontend/src/features/logs/index.ts +8 -2
- package/frontend/src/features/logs/page/AuditsPage.tsx +91 -38
- package/frontend/src/features/logs/page/LogsPage.tsx +152 -0
- package/frontend/src/features/logs/page/MCPLogsPage.tsx +84 -0
- package/frontend/src/features/logs/services/audit.service.ts +63 -0
- package/frontend/src/features/logs/services/log.service.ts +15 -110
- package/frontend/src/features/logs/services/usage.service.ts +31 -0
- package/frontend/src/features/onboard/components/McpConnectionStatus.tsx +68 -0
- package/frontend/src/features/onboard/components/OnboardingModal.tsx +267 -0
- package/frontend/src/features/onboard/components/VideoDemoModal.tsx +38 -0
- package/frontend/src/features/onboard/components/index.ts +4 -0
- package/frontend/src/features/onboard/components/mcp/CursorDeeplinkGenerator.tsx +2 -2
- package/frontend/src/features/onboard/components/mcp/{mcp-helper.tsx → helpers.tsx} +8 -8
- package/frontend/src/features/onboard/components/mcp/index.ts +2 -3
- package/frontend/src/features/onboard/index.ts +13 -3
- package/frontend/src/features/storage/components/BucketEmptyState.tsx +9 -6
- package/frontend/src/features/storage/components/BucketFormDialog.tsx +25 -41
- package/frontend/src/features/storage/components/FilePreviewDialog.tsx +20 -8
- package/frontend/src/features/storage/components/StorageDataGrid.tsx +4 -3
- package/frontend/src/features/storage/components/StorageManager.tsx +23 -34
- package/frontend/src/features/storage/components/index.ts +12 -0
- package/frontend/src/features/storage/hooks/useStorage.ts +208 -0
- package/frontend/src/features/storage/page/StoragePage.tsx +41 -115
- package/frontend/src/features/storage/services/storage.service.ts +22 -1
- package/frontend/src/features/visualizer/components/AuthNode.tsx +72 -56
- package/frontend/src/features/visualizer/components/BucketNode.tsx +4 -4
- package/frontend/src/features/visualizer/components/SchemaVisualizer.tsx +108 -80
- package/frontend/src/features/visualizer/components/TableNode.tsx +34 -41
- package/frontend/src/features/visualizer/components/VisualizerSkeleton.tsx +12 -4
- package/frontend/src/features/visualizer/page/VisualizerPage.tsx +33 -29
- package/frontend/src/index.css +1 -0
- package/frontend/src/lib/analytics/posthog.tsx +27 -0
- package/frontend/src/lib/contexts/AuthContext.tsx +38 -31
- package/frontend/src/lib/contexts/SocketContext.tsx +5 -6
- package/frontend/src/{features/metadata → lib}/hooks/useMetadata.ts +1 -1
- package/frontend/src/lib/hooks/useToast.tsx +6 -2
- package/frontend/src/lib/routing/AppRoutes.tsx +84 -0
- package/frontend/src/lib/routing/RequireAuth.tsx +27 -0
- package/frontend/src/lib/utils/cloudMessaging.ts +20 -0
- package/frontend/src/lib/utils/menuItems.ts +183 -0
- package/frontend/src/lib/utils/{validation-schemas.ts → schemaValidations.ts} +10 -5
- package/frontend/src/lib/utils/utils.ts +19 -1
- package/frontend/src/vite-env.d.ts +1 -0
- package/frontend/vite.config.ts +5 -3
- package/functions/server.ts +28 -3
- package/functions/worker-template.js +15 -4
- package/i18n/README.ar.md +130 -0
- package/i18n/README.de.md +130 -0
- package/i18n/README.es.md +154 -0
- package/i18n/README.fr.md +134 -0
- package/i18n/README.hi.md +129 -0
- package/i18n/README.ja.md +174 -0
- package/i18n/README.ko.md +137 -0
- package/i18n/README.pt-BR.md +131 -0
- package/i18n/README.ru.md +129 -0
- package/i18n/README.zh-CN.md +133 -0
- package/openapi/ai.yaml +31 -4
- package/openapi/auth.yaml +827 -146
- package/package.json +16 -7
- package/shared-schemas/package.json +1 -1
- package/shared-schemas/src/ai-api.schema.ts +34 -58
- package/shared-schemas/src/ai.schema.ts +5 -0
- package/shared-schemas/src/auth-api.schema.ts +154 -8
- package/shared-schemas/src/auth.schema.ts +42 -6
- package/shared-schemas/src/cloud-events.schema.ts +57 -0
- package/shared-schemas/src/database-api.schema.ts +3 -3
- package/shared-schemas/src/database.schema.ts +1 -1
- package/shared-schemas/src/index.ts +1 -0
- package/shared-schemas/src/logs-api.schema.ts +7 -1
- package/shared-schemas/src/logs.schema.ts +26 -0
- package/shared-schemas/src/metadata.schema.ts +9 -4
- package/test-gemini.sh +35 -0
- package/test-usage-admin.sh +57 -0
- package/test-usage.sh +50 -0
- package/zeabur/README.md +13 -0
- package/zeabur/template.yml +1032 -0
- package/.github/workflows/deploy-aws.yml +0 -130
- package/backend/src/api/routes/agent.ts +0 -29
- package/backend/src/api/routes/auth.oauth.ts +0 -482
- package/backend/src/api/routes/auth.ts +0 -386
- package/backend/src/api/routes/docs.ts +0 -66
- package/backend/src/api/routes/functions.ts +0 -183
- package/backend/src/api/routes/openapi.ts +0 -82
- package/backend/src/api/routes/usage.ts +0 -96
- package/backend/src/core/ai/client.ts +0 -242
- package/backend/src/core/ai/model.ts +0 -117
- package/backend/src/core/auth/auth.ts +0 -781
- package/backend/src/core/database/table.ts +0 -772
- package/backend/src/core/documentation/agent.ts +0 -689
- package/backend/src/core/documentation/openapi.ts +0 -856
- package/backend/src/core/logs/analytics.ts +0 -76
- package/backend/src/core/logs/providers/localdb.provider.ts +0 -246
- package/backend/src/core/storage/storage.ts +0 -923
- package/backend/src/utils/cloud-token.ts +0 -39
- package/backend/src/utils/helpers.ts +0 -49
- package/backend/src/utils/uuid.ts +0 -9
- package/backend/tests/manual/test-better-auth.sh +0 -303
- package/docker-init/db/logs.sql +0 -9
- package/frontend/README.md +0 -112
- package/frontend/src/components/datagrid/index.tsx +0 -20
- package/frontend/src/components/layout/CloudLayout.tsx +0 -95
- package/frontend/src/features/ai/components/AIConfigDialog.tsx +0 -76
- package/frontend/src/features/ai/components/AIConfigForm.tsx +0 -222
- package/frontend/src/features/ai/components/fields/ModalityField.tsx +0 -87
- package/frontend/src/features/ai/components/fields/ModelSelectionField.tsx +0 -134
- package/frontend/src/features/ai/components/fields/SystemPromptField.tsx +0 -33
- package/frontend/src/features/auth/components/AddOAuthDialog.tsx +0 -106
- package/frontend/src/features/auth/components/AuthMethodTab.tsx +0 -238
- package/frontend/src/features/auth/components/UsersTab.tsx +0 -114
- package/frontend/src/features/auth/page/AuthenticationPage.tsx +0 -169
- package/frontend/src/features/database/hooks/UseLinkModal.tsx +0 -78
- package/frontend/src/features/functions/components/FunctionViewer.tsx +0 -46
- package/frontend/src/features/functions/components/FunctionsContent.tsx +0 -88
- package/frontend/src/features/login/components/AuthErrorBoundary.tsx +0 -87
- package/frontend/src/features/login/components/PrivateRoute.tsx +0 -24
- package/frontend/src/features/logs/components/AnalyticsLogsTable.tsx +0 -313
- package/frontend/src/features/logs/components/LogsTable.tsx +0 -199
- package/frontend/src/features/logs/page/AnalyticsLogsPage.tsx +0 -530
- package/frontend/src/features/metadata/index.ts +0 -0
- package/frontend/src/features/metadata/page/MetadataPage.tsx +0 -136
- package/frontend/src/features/onboard/components/CompletionCard.tsx +0 -41
- package/frontend/src/features/onboard/components/OnboardButton.tsx +0 -84
- package/frontend/src/features/onboard/components/StepContent.tsx +0 -91
- package/frontend/src/features/onboard/components/TestConnectionStep.tsx +0 -53
- package/frontend/src/features/onboard/components/mcp/McpInstallation.tsx +0 -144
- package/frontend/src/features/onboard/page/OnBoardPage.tsx +0 -104
- package/frontend/src/features/onboard/types.ts +0 -8
- package/frontend/src/lib/contexts/OnboardStepContext.tsx +0 -68
- package/frontend/src/lib/hooks/useOnboardingCompletion.ts +0 -29
- /package/backend/src/api/{middleware → middlewares}/error.ts +0 -0
- /package/backend/src/api/{middleware → middlewares}/upload.ts +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/000_create-base-tables.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/001_create-helper-functions.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/002_rename-auth-tables.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/003_create-users-table.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/004_add-reload-postgrest-func.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/005_enable-project-admin-modify-users.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/006_modify-ai-usage-table.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/007_drop-metadata-table.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/008_add-system-tables.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/009_add-function-secrets.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/010_modify-ai-config-modalities.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/011_refactor-secrets-table.sql +0 -0
- /package/backend/{migrations → src/infra/database/migrations}/012_add-storage-uploaded-by.sql +0 -0
- /package/frontend/src/{features/metadata → lib}/services/metadata.service.ts +0 -0
|
@@ -1,407 +1,88 @@
|
|
|
1
|
-
# InsForge SDK Documentation
|
|
1
|
+
# InsForge SDK Documentation - Overview
|
|
2
2
|
|
|
3
|
-
## What
|
|
3
|
+
## What is InsForge?
|
|
4
4
|
|
|
5
|
-
Backend-as-a-service
|
|
5
|
+
Backend-as-a-service (BaaS) platform providing:
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
- **Database**: PostgreSQL with PostgREST API
|
|
8
|
+
- **Authentication**: Email/password + OAuth (Google, GitHub)
|
|
9
|
+
- **Storage**: File upload/download
|
|
10
|
+
- **AI**: Chat completions and image generation (OpenAI-compatible)
|
|
11
|
+
- **Functions**: Serverless function deployment
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## Installation
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
### 🚨 CRITICAL: Follow these steps in order
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Use SDK for:
|
|
16
|
-
- Authentication (register, login, logout)
|
|
17
|
-
- Database CRUD operations (select, insert, update, delete)
|
|
18
|
-
- User profile management
|
|
19
|
-
- AI operations (chat completions, image generation)
|
|
20
|
-
- Storage operations (upload, download, list files)
|
|
21
|
-
- Application logic
|
|
22
|
-
|
|
23
|
-
### Use MCP Tools for:
|
|
24
|
-
- Getting started & documentation (`get-instructions`)
|
|
25
|
-
- Database operations (`run-raw-sql` for CREATE/ALTER/DROP tables, `get-table-schema` for inspection)
|
|
26
|
-
- Backend metadata (`get-backend-metadata`)
|
|
27
|
-
- Storage bucket creation (`create-bucket`, `list-buckets`, `delete-bucket`)
|
|
28
|
-
- Edge Functions Creation and Upload (`create-function`, `get-function`, `update-function`, `delete-function`)
|
|
29
|
-
- **Important**: Edge functions should only be used for backend API services
|
|
30
|
-
- **CRITICAL**: Edge functions do NOT support subpaths - single endpoint only per function
|
|
31
|
-
- ❌ **Will NOT work**: `/functions/my-api/users`, `/functions/my-api/posts/123`, `/functions/my-api/admin/stats`
|
|
32
|
-
- ✅ **Will work**: `/functions/my-api` with `{ "action": "getUsers" }`, `/functions/my-api` with `{ "action": "getPost", "id": 123 }`
|
|
33
|
-
- Use request method + body to route: `GET /functions/task-api?action=list`, `POST /functions/task-api {"action": "create", "title": "New"}`
|
|
34
|
-
|
|
35
|
-
### Edge Functions Pattern
|
|
17
|
+
### Step 1: Download Template
|
|
36
18
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
```javascript
|
|
40
|
-
// No import needed - createClient is injected by the worker template
|
|
41
|
-
module.exports = async function(request) {
|
|
42
|
-
// CORS headers
|
|
43
|
-
const corsHeaders = {
|
|
44
|
-
'Access-Control-Allow-Origin': '*',
|
|
45
|
-
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
|
|
46
|
-
'Access-Control-Allow-Headers': 'Content-Type, Authorization'
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// Handle OPTIONS
|
|
50
|
-
if (request.method === 'OPTIONS') {
|
|
51
|
-
return new Response(null, { status: 204, headers: corsHeaders });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Extract token from request headers
|
|
55
|
-
const authHeader = request.headers.get('Authorization');
|
|
56
|
-
const userToken = authHeader ? authHeader.replace('Bearer ', '') : null;
|
|
57
|
-
|
|
58
|
-
// Create client with the edge function token
|
|
59
|
-
// Use BACKEND_INTERNAL_URL environment variable for internal Docker communication
|
|
60
|
-
const client = createClient({
|
|
61
|
-
baseUrl: Deno.env.get('BACKEND_INTERNAL_URL') || 'http://insforge:7130',
|
|
62
|
-
edgeFunctionToken: userToken
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// Example: Get authenticated user for database operations
|
|
66
|
-
const { data: userData } = await client.auth.getCurrentUser();
|
|
67
|
-
if (userData?.user?.id) {
|
|
68
|
-
// Use userData.user.id for foreign key constraints
|
|
69
|
-
await client.database.from('table').insert([{ user_id: userData.user.id }]);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
19
|
+
Use the `download-template` MCP tool to create a new project with your backend URL and anon key pre-configured.
|
|
73
20
|
|
|
74
|
-
|
|
21
|
+
### Step 2: Install SDK
|
|
75
22
|
|
|
76
23
|
```bash
|
|
77
|
-
npm install @insforge/sdk
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
import { createClient } from '@insforge/sdk';
|
|
82
|
-
const client = createClient({ baseUrl: 'http://localhost:7130' });
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Authentication
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
// Sign Up
|
|
89
|
-
const { data, error } = await client.auth.signUp({
|
|
90
|
-
email: 'user@example.com',
|
|
91
|
-
password: 'password123'
|
|
92
|
-
});
|
|
93
|
-
// Returns: { user: {...}, accessToken: 'jwt...' }
|
|
94
|
-
// Backend auto-creates user profile in 'users' table
|
|
95
|
-
|
|
96
|
-
// Sign In
|
|
97
|
-
const { data, error } = await client.auth.signInWithPassword({
|
|
98
|
-
email: 'user@example.com',
|
|
99
|
-
password: 'password123'
|
|
100
|
-
});
|
|
101
|
-
// Token stored automatically for all requests
|
|
102
|
-
|
|
103
|
-
// Sign In with OAuth
|
|
104
|
-
const { data, error } = await client.auth.signInWithOAuth({
|
|
105
|
-
provider: 'google'|'github',
|
|
106
|
-
redirectTo: window.location.origin,
|
|
107
|
-
skipBrowserRedirect: true
|
|
108
|
-
})
|
|
109
|
-
// Returns: { data: { url, provider }, error }
|
|
110
|
-
|
|
111
|
-
// Manual redirect required
|
|
112
|
-
if (data?.url) {
|
|
113
|
-
window.location.href = data.url
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ⚠️ IMPORTANT: No callback handling needed!
|
|
117
|
-
// After OAuth, user returns to redirectTo URL already authenticated
|
|
118
|
-
// The SDK automatically:
|
|
119
|
-
// - Handles the OAuth callback
|
|
120
|
-
// - Stores the JWT token
|
|
121
|
-
// - Makes user available via getCurrentUser()
|
|
122
|
-
|
|
123
|
-
// ❌ DON'T DO THIS (not needed):
|
|
124
|
-
// const accessToken = urlParams.get('access_token')
|
|
125
|
-
// const userId = urlParams.get('user_id')
|
|
126
|
-
|
|
127
|
-
// ✅ DO THIS INSTEAD (after redirect back):
|
|
128
|
-
const { data, error } = await client.auth.getCurrentUser()
|
|
129
|
-
|
|
130
|
-
// Get Current User (with profile)
|
|
131
|
-
const { data, error } = await client.auth.getCurrentUser();
|
|
132
|
-
// Returns: {
|
|
133
|
-
// user: {id, email, role}, // Auth data
|
|
134
|
-
// profile: {id, nickname, ...} // Users table data (object, not array!)
|
|
135
|
-
// }
|
|
136
|
-
|
|
137
|
-
// Update Profile
|
|
138
|
-
const { data, error } = await client.auth.setProfile({
|
|
139
|
-
nickname: 'John',
|
|
140
|
-
bio: 'Developer',
|
|
141
|
-
avatar_url: 'https://...'
|
|
142
|
-
});
|
|
143
|
-
// Returns: {id, nickname, bio, ...} // Single object, not array!
|
|
144
|
-
|
|
145
|
-
// Get Any User's Profile
|
|
146
|
-
const { data, error } = await client.auth.getProfile(userId);
|
|
147
|
-
// Returns: {id, nickname, bio, ...} // Single object, not array!
|
|
148
|
-
|
|
149
|
-
// Get Session (local storage only, no API call)
|
|
150
|
-
const { data } = await client.auth.getCurrentSession();
|
|
151
|
-
// Returns: { session: { accessToken: 'jwt...', user: {...} } }
|
|
152
|
-
|
|
153
|
-
// Sign Out
|
|
154
|
-
await client.auth.signOut();
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Database Operations
|
|
158
|
-
|
|
159
|
-
Before ANY operation, call `get-backend-metadata` to get the current backend state.
|
|
160
|
-
|
|
161
|
-
```javascript
|
|
162
|
-
// Select with filters
|
|
163
|
-
const { data, error } = await client.database
|
|
164
|
-
.from('posts')
|
|
165
|
-
.select('*, users!inner(*)')
|
|
166
|
-
.eq('user_id', userId)
|
|
167
|
-
.order('created_at', { ascending: false })
|
|
168
|
-
.limit(10);
|
|
169
|
-
|
|
170
|
-
// Insert (array required, but use .single() for one record)
|
|
171
|
-
const { data, error } = await client.database
|
|
172
|
-
.from('posts')
|
|
173
|
-
.insert([{
|
|
174
|
-
title: 'My Post',
|
|
175
|
-
user_id: userId,
|
|
176
|
-
image_url: 'https://...'
|
|
177
|
-
}])
|
|
178
|
-
.select()
|
|
179
|
-
.single(); // Returns single object!
|
|
180
|
-
|
|
181
|
-
// Update (returns single object with .single())
|
|
182
|
-
const { data, error } = await client.database
|
|
183
|
-
.from('users')
|
|
184
|
-
.update({ nickname: 'John', bio: 'Developer' })
|
|
185
|
-
.eq('id', userId)
|
|
186
|
-
.select()
|
|
187
|
-
.single(); // Returns single object!
|
|
188
|
-
|
|
189
|
-
// Delete
|
|
190
|
-
const { data, error } = await client.database
|
|
191
|
-
.from('posts')
|
|
192
|
-
.delete()
|
|
193
|
-
.eq('id', postId);
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Edge Functions Invocation
|
|
197
|
-
|
|
198
|
-
Invoke deployed edge functions from the SDK (similar to Supabase):
|
|
199
|
-
|
|
200
|
-
```javascript
|
|
201
|
-
// Basic invocation with JSON body (POST by default)
|
|
202
|
-
const { data, error } = await client.functions.invoke('hello-world', {
|
|
203
|
-
body: { name: 'World' }
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// GET request (no body)
|
|
207
|
-
const { data, error } = await client.functions.invoke('my-function', {
|
|
208
|
-
method: 'GET'
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
// With custom headers
|
|
212
|
-
const { data, error } = await client.functions.invoke('my-function', {
|
|
213
|
-
body: { action: 'create', item: 'task' },
|
|
214
|
-
headers: { 'x-custom-header': 'value' }
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
// Different HTTP methods
|
|
218
|
-
const { data, error } = await client.functions.invoke('api-endpoint', {
|
|
219
|
-
method: 'PUT',
|
|
220
|
-
body: { id: '123', status: 'active' }
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// Error handling
|
|
224
|
-
if (error) {
|
|
225
|
-
console.error('Function error:', error.message);
|
|
226
|
-
} else {
|
|
227
|
-
console.log('Success:', data);
|
|
228
|
-
}
|
|
24
|
+
npm install @insforge/sdk@latest
|
|
229
25
|
```
|
|
230
26
|
|
|
231
|
-
|
|
27
|
+
### Step 3: Create SDK Client
|
|
232
28
|
|
|
233
|
-
|
|
29
|
+
You must create a client instance using `createClient()` with your base URL and anon key:
|
|
234
30
|
|
|
235
31
|
```javascript
|
|
236
|
-
|
|
237
|
-
const { data, error } = await client.storage
|
|
238
|
-
.from('images')
|
|
239
|
-
.uploadAuto(fileObject);
|
|
240
|
-
|
|
241
|
-
// data.url = "http://localhost:7130/api/storage/buckets/images/objects/file-timestamp-random.jpg"
|
|
242
|
-
|
|
243
|
-
// Or upload with specific key
|
|
244
|
-
const { data, error } = await client.storage
|
|
245
|
-
.from('images')
|
|
246
|
-
.upload('custom-name.jpg', fileObject);
|
|
247
|
-
|
|
248
|
-
// Download file
|
|
249
|
-
const { data: blob, error } = await client.storage
|
|
250
|
-
.from('images')
|
|
251
|
-
.download('file.jpg');
|
|
252
|
-
|
|
253
|
-
// Get public URL (no API call)
|
|
254
|
-
const url = client.storage
|
|
255
|
-
.from('images')
|
|
256
|
-
.getPublicUrl('file.jpg');
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
## AI Operations
|
|
260
|
-
|
|
261
|
-
Before ANY operation, call `get-backend-metadata` to get the current backend state.
|
|
262
|
-
|
|
263
|
-
### Chat Completions (OpenAI-compatible response)
|
|
32
|
+
import { createClient } from '@insforge/sdk';
|
|
264
33
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
model: 'openai/gpt-4o',
|
|
269
|
-
messages: [
|
|
270
|
-
{
|
|
271
|
-
role: 'system',
|
|
272
|
-
content: 'You are a helpful assistant'
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
role: 'user',
|
|
276
|
-
content: 'What is the capital of France?',
|
|
277
|
-
images: [ // Optional: attach images for vision models
|
|
278
|
-
{ url: 'https://example.com/image.jpg' },
|
|
279
|
-
{ url: 'data:image/jpeg;base64,...' } // Base64 also supported
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
temperature: 0.7, // Optional: 0-2
|
|
284
|
-
maxTokens: 1000, // Optional: max completion tokens
|
|
285
|
-
topP: 0.9, // Optional: 0-1
|
|
286
|
-
stream: false // Optional: enable streaming
|
|
34
|
+
const client = createClient({
|
|
35
|
+
baseUrl: 'https://your-app.region.insforge.app', // Your InsForge backend URL
|
|
36
|
+
anonKey: 'your-anon-key-here' // Get this from backend metadata
|
|
287
37
|
});
|
|
288
38
|
|
|
289
|
-
// Access response - OpenAI format
|
|
290
|
-
console.log(completion.choices[0].message.content); // "The capital of France is Paris"
|
|
291
|
-
console.log(completion.usage.total_tokens); // Token usage
|
|
292
39
|
```
|
|
293
40
|
|
|
294
|
-
|
|
41
|
+
**API BASE URL**: Your API base URL is `https://your-app.region.insforge.app`.
|
|
295
42
|
|
|
296
|
-
|
|
297
|
-
// Image + chat completion generation request
|
|
298
|
-
// This model can generate images AND provide text responses
|
|
299
|
-
const response = await client.ai.images.generate({
|
|
300
|
-
model: 'google/gemini-2.5-flash-image-preview',
|
|
301
|
-
prompt: 'A serene landscape with mountains at sunset',
|
|
302
|
-
images: [ // Optional: input images for image-to-image models
|
|
303
|
-
{ url: 'https://example.com/reference.jpg' }
|
|
304
|
-
]
|
|
305
|
-
});
|
|
43
|
+
## Getting Detailed Documentation
|
|
306
44
|
|
|
307
|
-
|
|
308
|
-
console.log(response.data[0].b64_json); // Base64 encoded image string (OpenAI format)
|
|
309
|
-
console.log(response.data[0].content); // AI's text response about the image or prompt
|
|
310
|
-
```
|
|
45
|
+
### 🚨 CRITICAL: Always Fetch Documentation Before Writing Code
|
|
311
46
|
|
|
312
|
-
|
|
47
|
+
Before writing or editing any InsForge integration code, you **MUST** call the `fetch-docs` MCP tool to get the latest SDK documentation. This ensures you have accurate, up-to-date implementation patterns.
|
|
313
48
|
|
|
314
|
-
|
|
315
|
-
import { createClient } from '@insforge/sdk';
|
|
49
|
+
### Use the InsForge `fetch-docs` MCP tool to get specific SDK documentation:
|
|
316
50
|
|
|
317
|
-
|
|
51
|
+
Available documentation types:
|
|
318
52
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
53
|
+
- `"instructions"` - Essential backend setup (START HERE)
|
|
54
|
+
- `"db-sdk"` - Database operations with SDK
|
|
55
|
+
- **Authentication** - Choose based on implementation:
|
|
56
|
+
- `"auth-components-react"` - Frontend auth for React+Vite (singlepage App)
|
|
57
|
+
- `"auth-components-react-router"` - Frontend auth for React(Vite+React Router) (Multipage App)
|
|
58
|
+
- `"storage-sdk"` - File storage operations
|
|
59
|
+
- `"functions-sdk"` - Serverless functions invocation
|
|
60
|
+
- `"ai-integration-sdk"` - AI chat and image generation
|
|
324
61
|
|
|
325
|
-
|
|
326
|
-
const { data: profile } = await client.auth.setProfile({
|
|
327
|
-
nickname: 'JohnDoe',
|
|
328
|
-
bio: 'Full-stack developer'
|
|
329
|
-
});
|
|
330
|
-
console.log(profile.nickname); // 'JohnDoe' - direct access!
|
|
331
|
-
|
|
332
|
-
// 3. Get current user with profile
|
|
333
|
-
const { data: userData } = await client.auth.getCurrentUser();
|
|
334
|
-
console.log(userData.user.email); // 'user@example.com'
|
|
335
|
-
console.log(userData.profile.nickname); // 'JohnDoe'
|
|
336
|
-
|
|
337
|
-
// 4. Create a post
|
|
338
|
-
const { data: post } = await client.database
|
|
339
|
-
.from('posts')
|
|
340
|
-
.insert([{
|
|
341
|
-
user_id: userData.user.id,
|
|
342
|
-
caption: 'Hello World',
|
|
343
|
-
image_url: 'https://example.com/image.jpg'
|
|
344
|
-
}])
|
|
345
|
-
.select()
|
|
346
|
-
.single(); // Returns single object!
|
|
347
|
-
|
|
348
|
-
// 5. Get another user's profile (returns object!)
|
|
349
|
-
const { data: otherUser } = await client.auth.getProfile('other-user-id');
|
|
350
|
-
console.log(otherUser.nickname); // Direct access to properties
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
## Key Points
|
|
354
|
-
|
|
355
|
-
### Edge Functions
|
|
356
|
-
- **SDK Availability**: `createClient` is globally available - no import needed
|
|
357
|
-
- **Token Handling**: Extract from `Authorization` header, use as `anonKey` parameter
|
|
358
|
-
- **Flexible Auth**: Can use user token or anon token (from `ACCESS_API_KEY` env var)
|
|
359
|
-
- **Backend Validation**: Tokens are validated by backend on each SDK request
|
|
360
|
-
- **Internal Networking**: Use `BACKEND_INTERNAL_URL` environment variable (defaults to `http://insforge:7130` for Docker container communication)
|
|
62
|
+
## When to Use SDK vs MCP Tools
|
|
361
63
|
|
|
362
|
-
###
|
|
363
|
-
- **Simple API**: `client.functions.invoke(slug, options)
|
|
364
|
-
- **Auto-authentication**: SDK automatically includes auth token from logged-in user
|
|
365
|
-
- **Flexible body**: Accepts any JSON-serializable data
|
|
366
|
-
- **HTTP methods**: Supports GET, POST, PUT, PATCH, DELETE (default: POST)
|
|
367
|
-
- **Returns**: `{ data, error }` structure consistent with other SDK methods
|
|
64
|
+
### Always SDK for Application Logic:
|
|
368
65
|
|
|
369
|
-
|
|
370
|
-
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
- **Response Format**: AI module returns OpenAI-compatible response structures for Chat Completion
|
|
375
|
-
- **Multimodal Support**: Both endpoints accept image inputs via `images` array
|
|
376
|
-
- **Streaming**: Chat completions support streaming with `stream: true`
|
|
66
|
+
- Authentication (register, login, logout, profiles)
|
|
67
|
+
- Database CRUD (select, insert, update, delete)
|
|
68
|
+
- Storage operations (upload, download files)
|
|
69
|
+
- AI operations (chat, image generation)
|
|
70
|
+
- Serverless function invocation
|
|
377
71
|
|
|
378
|
-
###
|
|
379
|
-
- **Auto-creation**: When users sign up/sign in, backend automatically creates a record in `users` table
|
|
380
|
-
- **Profile methods return objects**: `setProfile()` and `getProfile()` return single objects, not arrays!
|
|
381
|
-
- **Two data sources**:
|
|
382
|
-
- `user` = auth data (id, email, role)
|
|
383
|
-
- `profile` = users table data (id, nickname, avatar_url, bio, etc.)
|
|
72
|
+
### Use MCP Tools for Infrastructure:
|
|
384
73
|
|
|
385
|
-
|
|
386
|
-
-
|
|
387
|
-
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
- Raw SQL is NOT available in SDK
|
|
74
|
+
- Project scaffolding (`download-template`) - Download starter templates with InsForge integration
|
|
75
|
+
- Backend setup and metadata (`get-backend-metadata`)
|
|
76
|
+
- Database schema management (`run-raw-sql`, `get-table-schema`)
|
|
77
|
+
- Storage bucket creation (`create-bucket`, `list-buckets`, `delete-bucket`)
|
|
78
|
+
- Serverless function deployment (`create-function`, `update-function`, `delete-function`)
|
|
391
79
|
|
|
392
|
-
|
|
393
|
-
- **SDK**: Authentication, database CRUD, profile management, AI operations, storage
|
|
394
|
-
- **MCP Tools**: Table creation/modification, schema management
|
|
80
|
+
## Important Notes
|
|
395
81
|
|
|
396
|
-
|
|
397
|
-
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
- **Store in Database**:
|
|
404
|
-
- Storage URLs only (not the actual data)
|
|
405
|
-
- Small text fields (<1KB)
|
|
406
|
-
- Metadata and references
|
|
407
|
-
- **Example**: For chat with images, store image in storage bucket, save only the URL in database
|
|
82
|
+
- Use the right framework-specific component package for production-ready auth
|
|
83
|
+
- SDK returns `{data, error}` structure for all operations
|
|
84
|
+
- Database inserts require array format: `[{...}]`
|
|
85
|
+
- Serverless functions have single endpoint (no subpaths)
|
|
86
|
+
- Storage: Upload files to buckets, store URLs in database
|
|
87
|
+
- AI operations are OpenAI-compatible
|
|
88
|
+
- **EXTRA IMPORTANT**: Use Tailwind CSS 3.4 (do not upgrade to v4). Lock these dependencies in `package.json`
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
InsForge is an AI-optimized Backend-as-a-Service platform for modern applications. It provides a comprehensive backend out of the box with PostgreSQL, JWT-based authentication, and S3-compatible storage. Every endpoint, from initial configuration to database operations to file uploads, is designed to be agent-friendly with consistent patterns and predictable responses.
|
|
6
|
+
|
|
7
|
+
Connect your AI assistant to InsForge using our MCP server, and it can read documentation, set up your backend, and write complete applications, all from simple prompts. No backend knowledge required.
|
|
8
|
+
|
|
9
|
+
## Why InsForge?
|
|
10
|
+
|
|
11
|
+
Backend development with AI agents has long been a half-solved problem. AI can generate frontend code effortlessly but struggles with backend complexity—database setup, authentication flows, API design all require deep expertise. Rather than forcing developers to piece together multiple services or become DevOps experts, we believe we can do better as a community—hence, InsForge.
|
|
12
|
+
|
|
13
|
+
## Next Steps
|
|
14
|
+
|
|
15
|
+
Ready to start building? Check out our [framework examples](/examples/overview) to see how to build complete applications with InsForge and AI assistance.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
Everything you need to build real applications, designed for AI agents:
|
|
20
|
+
|
|
21
|
+
<CardGroup cols={2}>
|
|
22
|
+
<Card title="PostgreSQL Database" icon="database">
|
|
23
|
+
Tables become APIs instantly. No code. Just schema.
|
|
24
|
+
</Card>
|
|
25
|
+
|
|
26
|
+
<Card title="Authentication" icon="shield">
|
|
27
|
+
User signup, login, sessions, OAuth. Zero configuration.
|
|
28
|
+
</Card>
|
|
29
|
+
|
|
30
|
+
<Card title="File Storage" icon="folder">
|
|
31
|
+
Upload, download, serve files. Works like any other API.
|
|
32
|
+
</Card>
|
|
33
|
+
|
|
34
|
+
<Card title="Edge Functions" icon="bolt">
|
|
35
|
+
Deploy serverless functions that run on the edge. Zero infrastructure.
|
|
36
|
+
</Card>
|
|
37
|
+
|
|
38
|
+
<Card title="AI Integration" icon="sparkles">
|
|
39
|
+
Built-in AI capabilities with streaming support. Ready to use.
|
|
40
|
+
</Card>
|
|
41
|
+
|
|
42
|
+
<Card title="No Backend Knowledge Needed" icon="brain">
|
|
43
|
+
AI agents handle the backend. You don't need to understand infrastructure.
|
|
44
|
+
</Card>
|
|
45
|
+
</CardGroup>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg width="440" height="99" viewBox="0 0 440 99" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M1.56277 37.3316C0.28995 36.064 0.289949 34.0088 1.56277 32.7412L33.8278 0.608401L79.9207 0.608398L24.6092 55.6932C23.3364 56.9608 21.2727 56.9608 19.9999 55.6932L1.56277 37.3316Z" fill="url(#paint0_linear_33_490)"/>
|
|
3
|
+
<path d="M59.755 26.4294L79.9207 46.5124V92.4164L36.7086 49.3814L59.755 26.4294Z" fill="url(#paint1_linear_33_490)"/>
|
|
4
|
+
<path d="M419.357 78.9157C414.903 78.9157 410.992 77.9555 407.624 76.035C404.256 74.1145 401.622 71.4501 399.72 68.042C397.846 64.6338 396.909 60.7116 396.909 56.2756C396.909 51.4878 397.833 47.3358 399.68 43.8194C401.526 40.276 404.093 37.5305 407.38 35.5829C410.666 33.6354 414.468 32.6616 418.787 32.6616C423.35 32.6616 427.22 33.7301 430.398 35.8669C433.603 37.9768 435.98 40.9657 437.528 44.8338C439.076 48.7018 439.66 53.2596 439.28 58.5071H429.543V54.9366C429.515 50.176 428.673 46.7001 427.017 44.5092C425.36 42.3182 422.752 41.2227 419.194 41.2227C415.175 41.2227 412.187 42.467 410.231 44.9555C408.276 47.417 407.298 51.028 407.298 55.7887C407.298 60.2247 408.276 63.66 410.231 66.0944C412.187 68.5288 415.039 69.746 418.787 69.746C421.204 69.746 423.282 69.2186 425.02 68.1637C426.786 67.0817 428.144 65.5264 429.094 63.4977L438.791 66.419C437.107 70.3682 434.499 73.4383 430.968 75.6292C427.465 77.8202 423.594 78.9157 419.357 78.9157ZM404.202 58.5071V51.1227H434.472V58.5071H404.202Z" fill="white"/>
|
|
5
|
+
<path d="M367.64 98.3911C365.196 98.3911 362.846 98.0125 360.592 97.2551C358.365 96.4977 356.355 95.4022 354.562 93.9686C352.77 92.562 351.303 90.8579 350.162 88.8563L359.207 84.3932C360.049 85.9891 361.23 87.1657 362.751 87.9231C364.299 88.7075 365.943 89.0997 367.681 89.0997C369.718 89.0997 371.538 88.7346 373.14 88.0042C374.743 87.301 375.978 86.2461 376.848 84.8395C377.744 83.46 378.165 81.7288 378.111 79.6461V67.1899H379.333V33.8788H387.929V79.8083C387.929 80.9174 387.875 81.9723 387.766 82.9731C387.685 84.001 387.535 85.0018 387.318 85.9756C386.666 88.8157 385.417 91.142 383.57 92.9543C381.723 94.7936 379.428 96.1596 376.685 97.0522C373.969 97.9448 370.954 98.3911 367.64 98.3911ZM366.785 78.9157C362.738 78.9157 359.207 77.9014 356.192 75.8727C353.177 73.844 350.841 71.085 349.185 67.5956C347.528 64.1063 346.699 60.1706 346.699 55.7887C346.699 51.3526 347.528 47.4034 349.185 43.9411C350.869 40.4518 353.245 37.7063 356.314 35.7047C359.383 33.676 362.996 32.6616 367.151 32.6616C371.334 32.6616 374.838 33.676 377.662 35.7047C380.514 37.7063 382.674 40.4518 384.14 43.9411C385.607 47.4305 386.34 51.3797 386.34 55.7887C386.34 60.1436 385.607 64.0793 384.14 67.5956C382.674 71.085 380.487 73.844 377.581 75.8727C374.675 77.9014 371.076 78.9157 366.785 78.9157ZM368.292 70.1518C370.927 70.1518 373.045 69.5567 374.648 68.3665C376.277 67.1493 377.459 65.4588 378.192 63.2948C378.953 61.1309 379.333 58.6288 379.333 55.7887C379.333 52.9215 378.953 50.4194 378.192 48.2825C377.459 46.1186 376.304 44.4415 374.729 43.2514C373.154 42.0342 371.117 41.4256 368.618 41.4256C365.983 41.4256 363.811 42.0747 362.099 43.3731C360.388 44.6444 359.125 46.3756 358.311 48.5665C357.496 50.7305 357.088 53.1379 357.088 55.7887C357.088 58.4665 357.482 60.901 358.27 63.092C359.085 65.2559 360.32 66.9735 361.977 68.2448C363.634 69.5161 365.739 70.1518 368.292 70.1518Z" fill="white"/>
|
|
6
|
+
<path d="M318.19 77.6987V33.879H326.868V44.5499L325.809 43.1704C326.352 41.7097 327.072 40.3843 327.968 39.1942C328.892 37.9769 329.992 36.9761 331.268 36.1917C332.355 35.4614 333.55 34.8933 334.853 34.4876C336.184 34.0548 337.542 33.7978 338.927 33.7167C340.313 33.6085 341.657 33.6626 342.961 33.879V43.0081C341.657 42.6294 340.15 42.5077 338.439 42.6429C336.755 42.7782 335.234 43.2515 333.876 44.063C332.518 44.7933 331.404 45.7265 330.535 46.8626C329.693 47.9987 329.068 49.297 328.661 50.7577C328.253 52.1913 328.05 53.7466 328.05 55.4237V77.6987H318.19Z" fill="white"/>
|
|
7
|
+
<path d="M287.255 78.9157C282.855 78.9157 279.012 77.9284 275.725 75.9538C272.439 73.9792 269.886 71.2608 268.066 67.7985C266.273 64.3092 265.377 60.3059 265.377 55.7887C265.377 51.1903 266.301 47.16 268.148 43.6977C269.994 40.2354 272.561 37.5305 275.848 35.5829C279.134 33.6354 282.936 32.6616 287.255 32.6616C291.682 32.6616 295.539 33.6489 298.825 35.6235C302.112 37.5981 304.665 40.3301 306.485 43.8194C308.304 47.2817 309.214 51.2715 309.214 55.7887C309.214 60.3329 308.291 64.3497 306.444 67.8391C304.624 71.3014 302.071 74.0198 298.785 75.9944C295.498 77.942 291.655 78.9157 287.255 78.9157ZM287.255 69.746C291.166 69.746 294.072 68.4477 295.973 65.851C297.875 63.2542 298.825 59.9001 298.825 55.7887C298.825 51.542 297.861 48.1608 295.933 45.6452C294.004 43.1026 291.112 41.8313 287.255 41.8313C284.62 41.8313 282.448 42.4264 280.736 43.6165C279.053 44.7797 277.803 46.4161 276.988 48.526C276.173 50.6087 275.766 53.0297 275.766 55.7887C275.766 60.0354 276.73 63.4301 278.659 65.9727C280.614 68.4883 283.48 69.746 287.255 69.746Z" fill="white"/>
|
|
8
|
+
<path d="M226.365 77.6987V19.2725H261.687V29.0507H236.183V43.6167H256.798V53.3544H236.183V77.6987H226.365Z" fill="white"/>
|
|
9
|
+
<path d="M199.271 78.9157C193.839 78.9157 189.425 77.6985 186.03 75.2641C182.635 72.8297 180.571 69.4079 179.837 64.9989L189.86 63.4571C190.376 65.621 191.516 67.3251 193.282 68.5694C195.047 69.8137 197.274 70.4358 199.963 70.4358C202.326 70.4358 204.146 69.976 205.423 69.0563C206.726 68.1096 207.378 66.8247 207.378 65.2018C207.378 64.201 207.134 63.403 206.645 62.8079C206.183 62.1858 205.151 61.5907 203.549 61.0227C201.946 60.4547 199.488 59.7378 196.174 58.8723C192.481 57.8985 189.547 56.8571 187.374 55.7481C185.202 54.612 183.64 53.2731 182.689 51.7313C181.739 50.1895 181.263 48.3231 181.263 46.1321C181.263 43.4001 181.983 41.0198 183.423 38.9911C184.862 36.9624 186.872 35.4071 189.452 34.3251C192.032 33.2161 195.074 32.6616 198.578 32.6616C202 32.6616 205.029 33.1891 207.663 34.244C210.325 35.2989 212.471 36.8001 214.1 38.7477C215.73 40.6952 216.735 42.9809 217.115 45.6047L207.093 47.3899C206.849 45.5235 205.993 44.0493 204.526 42.9674C203.087 41.8854 201.158 41.2768 198.741 41.1415C196.432 41.0063 194.572 41.3579 193.16 42.1965C191.747 43.0079 191.041 44.1575 191.041 45.6452C191.041 46.4838 191.326 47.2006 191.897 47.7956C192.467 48.3907 193.608 48.9858 195.319 49.5809C197.057 50.176 199.637 50.9063 203.06 51.7719C206.563 52.6645 209.361 53.6924 211.452 54.8555C213.571 55.9915 215.092 57.3575 216.015 58.9534C216.966 60.5493 217.441 62.4833 217.441 64.7555C217.441 69.1645 215.825 72.6268 212.593 75.1424C209.388 77.6579 204.947 78.9157 199.271 78.9157Z" fill="white"/>
|
|
10
|
+
<path d="M161.71 77.6986V56.6002C161.71 55.2207 161.615 53.6924 161.425 52.0154C161.235 50.3383 160.786 48.7289 160.08 47.1871C159.401 45.6182 158.369 44.3334 156.984 43.3326C155.626 42.3317 153.779 41.8313 151.443 41.8313C150.194 41.8313 148.958 42.0342 147.736 42.4399C146.514 42.8457 145.4 43.549 144.395 44.5498C143.417 45.5236 142.63 46.876 142.032 48.6072C141.435 50.3113 141.136 52.5022 141.136 55.1801L135.31 52.7051C135.31 48.9723 136.03 45.5912 137.469 42.5617C138.936 39.5322 141.081 37.1248 143.906 35.3395C146.731 33.5272 150.207 32.6211 154.336 32.6211C157.595 32.6211 160.284 33.1621 162.402 34.244C164.521 35.326 166.205 36.7055 167.454 38.3826C168.704 40.0596 169.627 41.8449 170.225 43.7383C170.822 45.6318 171.202 47.4305 171.365 49.1346C171.556 50.8117 171.651 52.1777 171.651 53.2326V77.6986H161.71ZM131.195 77.6986V33.8789H139.954V47.4711H141.136V77.6986H131.195Z" fill="white"/>
|
|
11
|
+
<path d="M109.254 77.6987V19.2725H119.073V77.6987H109.254Z" fill="white"/>
|
|
12
|
+
<defs>
|
|
13
|
+
<linearGradient id="paint0_linear_33_490" x1="-0.114919" y1="1.99245" x2="121.628" y2="44.0617" gradientUnits="userSpaceOnUse">
|
|
14
|
+
<stop stop-color="white"/>
|
|
15
|
+
<stop offset="1" stop-color="white" stop-opacity="0.4"/>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
<linearGradient id="paint1_linear_33_490" x1="129.043" y1="38.3399" x2="48.3766" y2="38.3399" gradientUnits="userSpaceOnUse">
|
|
18
|
+
<stop stop-color="white"/>
|
|
19
|
+
<stop offset="1" stop-color="white" stop-opacity="0.4"/>
|
|
20
|
+
</linearGradient>
|
|
21
|
+
</defs>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg width="118" height="24" viewBox="0 0 118 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_705_5572)">
|
|
3
|
+
<path d="M0.222977 8.61997C-0.0743255 8.32243 -0.0743256 7.84001 0.222977 7.54247L7.75937 5.1379e-07L18.5256 0L5.60611 12.93C5.30881 13.2275 4.82679 13.2275 4.52948 12.93L0.222977 8.61997Z" fill="url(#paint0_linear_705_5572)"/>
|
|
4
|
+
<path d="M13.8154 6.06092L18.5256 10.775V21.5499L8.43226 11.4484L13.8154 6.06092Z" fill="url(#paint1_linear_705_5572)"/>
|
|
5
|
+
<path d="M98.4609 6.87207C99.1328 6.87211 99.7352 6.96532 100.27 7.14648H104.604V8.97559L102.64 9.14453C102.943 9.72615 103.097 10.37 103.097 11.0781C103.097 11.8553 102.914 12.5641 102.549 13.2041C102.183 13.8287 101.65 14.331 100.95 14.7119C100.265 15.0776 99.4352 15.2607 98.4609 15.2607C97.9399 15.2607 97.4573 15.2046 97.0127 15.0967L96.1846 15.9121C96.2046 15.924 96.2253 15.9344 96.2451 15.9463C96.4126 16.0225 96.6187 16.0986 96.8623 16.1748C97.1059 16.2357 97.4256 16.2975 97.8213 16.3584C98.2171 16.4193 98.7193 16.4729 99.3281 16.5186C100.333 16.61 101.155 16.8003 101.795 17.0898C102.449 17.3793 102.929 17.7675 103.233 18.2549C103.538 18.7273 103.69 19.3147 103.69 20.0156C103.69 20.7012 103.501 21.3414 103.12 21.9355C102.755 22.5451 102.183 23.0327 101.406 23.3984C100.63 23.7792 99.6481 23.9697 98.4609 23.9697C97.3647 23.9697 96.4052 23.8319 95.583 23.5576C94.7608 23.2986 94.1208 22.8953 93.6641 22.3467C93.2227 21.8134 93.002 21.1506 93.002 20.3584C93.002 19.8251 93.1391 19.322 93.4131 18.8496C93.6585 18.4266 94.0016 18.0401 94.4424 17.6904C94.2322 17.5932 94.0411 17.4927 93.8701 17.3867C93.5656 17.1886 93.3141 16.9901 93.1162 16.792V16.2666L95.1221 14.1074C94.8282 13.8414 94.5774 13.5411 94.3721 13.2041C94.0067 12.5641 93.8242 11.8553 93.8242 11.0781C93.8242 10.3012 94.0068 9.60025 94.3721 8.97559C94.7527 8.33563 95.2856 7.8243 95.9707 7.44336C96.6711 7.06241 97.5017 6.87207 98.4609 6.87207ZM96.9482 18.4004C96.6455 18.5559 96.4036 18.7283 96.2227 18.918C95.9181 19.2684 95.7656 19.6419 95.7656 20.0381C95.7656 20.3886 95.88 20.6859 96.1084 20.9297C96.352 21.1734 96.6716 21.3484 97.0674 21.4551C97.4784 21.577 97.9351 21.6377 98.4375 21.6377C98.9246 21.6377 99.3432 21.5769 99.6934 21.4551C100.059 21.3332 100.341 21.1501 100.539 20.9062C100.752 20.6778 100.858 20.4038 100.858 20.084C100.858 19.6726 100.714 19.3372 100.425 19.0781C100.136 18.8191 99.5564 18.6586 98.6885 18.5977C98.0521 18.5477 97.4721 18.4811 96.9482 18.4004ZM50.6514 6.87207C52.0369 6.87207 53.1335 7.18481 53.9404 7.80957C54.7473 8.43432 55.2267 9.2955 55.3789 10.3926H52.4785C52.3872 10.0422 52.1819 9.76742 51.8623 9.56934C51.5578 9.35604 51.1464 9.25004 50.6289 9.25C50.0808 9.25 49.6614 9.34878 49.3721 9.54688C49.083 9.74494 48.9385 10.0044 48.9385 10.3242C48.9386 10.5374 49.0303 10.728 49.2129 10.8955C49.4108 11.063 49.6851 11.2073 50.0352 11.3291C50.3852 11.4357 50.8113 11.5428 51.3135 11.6494C52.1966 11.8323 52.9736 12.0453 53.6436 12.2891C54.3133 12.5176 54.8381 12.8532 55.2188 13.2949C55.5994 13.7216 55.79 14.3471 55.79 15.1699C55.79 15.9011 55.592 16.5559 55.1963 17.1348C54.8004 17.6986 54.2367 18.1409 53.5059 18.4609C52.7903 18.7808 51.9378 18.9414 50.9482 18.9414C49.8979 18.9414 48.9844 18.7736 48.208 18.4385C47.4316 18.1033 46.8224 17.6381 46.3809 17.0439C45.9393 16.4497 45.6879 15.7789 45.627 15.0322H48.6875C48.7636 15.3216 48.8926 15.5883 49.0752 15.832C49.2579 16.0606 49.5021 16.2437 49.8066 16.3809C50.111 16.5179 50.4762 16.5869 50.9023 16.5869C51.3133 16.5869 51.6484 16.5333 51.9072 16.4268C52.1661 16.3049 52.3567 16.1444 52.4785 15.9463C52.6154 15.7483 52.6846 15.5423 52.6846 15.3291C52.6845 15.0093 52.5928 14.7652 52.4102 14.5977C52.2275 14.4149 51.9604 14.2707 51.6104 14.1641C51.2603 14.0574 50.8342 13.9504 50.332 13.8438C49.7839 13.7371 49.2429 13.6075 48.71 13.4551C48.1925 13.2875 47.7284 13.0816 47.3174 12.8379C46.9064 12.5941 46.5786 12.2822 46.335 11.9014C46.0913 11.5204 45.9697 11.0472 45.9697 10.4834C45.9698 9.79787 46.1523 9.18849 46.5176 8.65527C46.883 8.10675 47.4159 7.67253 48.1162 7.35254C48.8166 7.03255 49.6617 6.87208 50.6514 6.87207ZM75.9463 6.87207C77.0576 6.87214 78.0473 7.13139 78.915 7.64941C79.7981 8.15227 80.4907 8.86113 80.9932 9.77539C81.5107 10.6743 81.7695 11.7179 81.7695 12.9062C81.7695 14.0947 81.5107 15.1463 80.9932 16.0605C80.4907 16.9595 79.798 17.6684 78.915 18.1865C78.0319 18.6894 77.0343 18.9414 75.9229 18.9414C74.8267 18.9414 73.8371 18.6893 72.9541 18.1865C72.0862 17.6684 71.3937 16.9596 70.876 16.0605C70.3736 15.1463 70.1221 14.1029 70.1221 12.9297C70.1221 11.7259 70.3735 10.6744 70.876 9.77539C71.3936 8.86117 72.0935 8.15226 72.9766 7.64941C73.8597 7.13132 74.85 6.87207 75.9463 6.87207ZM112.19 6.87207C113.332 6.87207 114.33 7.1241 115.183 7.62695C116.035 8.12979 116.697 8.80791 117.169 9.66113C117.641 10.5144 117.877 11.4817 117.877 12.5635V13.0898C117.877 13.2726 117.862 13.4632 117.832 13.6611H109.348C109.381 14.1548 109.49 14.5964 109.679 14.9863C109.922 15.4435 110.257 15.8015 110.684 16.0605C111.11 16.3043 111.605 16.4268 112.168 16.4268C112.731 16.4267 113.195 16.3043 113.561 16.0605C113.941 15.8167 114.224 15.505 114.406 15.124H117.558C117.344 15.84 116.987 16.4875 116.484 17.0664C115.982 17.6455 115.365 18.1032 114.634 18.4385C113.903 18.7736 113.089 18.9414 112.19 18.9414C111.033 18.9414 110.006 18.6975 109.107 18.21C108.224 17.7072 107.532 17.0135 107.029 16.1299C106.542 15.2308 106.298 14.1938 106.298 13.0205C106.298 11.8169 106.542 10.7579 107.029 9.84375C107.532 8.91435 108.224 8.19091 109.107 7.67285C109.99 7.13953 111.018 6.87208 112.19 6.87207ZM29.0771 18.667H25.9941V2.66699H29.0771V18.667ZM38.9082 6.87207C39.8674 6.87209 40.6744 7.07062 41.3291 7.4668C41.9837 7.86298 42.4785 8.44226 42.8135 9.2041C43.1636 9.96596 43.3389 10.9034 43.3389 12.0156V18.667H40.2783V12.3125C40.2783 11.3984 40.0803 10.6976 39.6846 10.21C39.3039 9.72237 38.7102 9.47855 37.9033 9.47852C37.3856 9.47852 36.9209 9.59994 36.5098 9.84375C36.114 10.0876 35.8016 10.4384 35.5732 10.8955C35.345 11.3373 35.2314 11.8787 35.2314 12.5186V18.667H32.1475V7.14648H34.8652L35.0938 9.02051C35.4439 8.38073 35.9389 7.86291 36.5781 7.4668C37.2328 7.07061 38.0099 6.87207 38.9082 6.87207ZM68.8818 5.1582H61.5508V9.43262H67.4199V11.8555H61.5508V18.667H58.4678V2.66699H68.8818V5.1582ZM91.7354 10.1406H90.6846C90.2281 10.1406 89.8019 10.1942 89.4062 10.3008C89.0256 10.4074 88.6907 10.5833 88.4014 10.8271C88.1121 11.0557 87.8905 11.3757 87.7383 11.7871C87.5862 12.1984 87.5108 12.7164 87.5107 13.3408V18.667H84.4268V7.14648H87.168L87.4648 9.27246C87.7389 8.76962 88.0811 8.34265 88.4922 7.99219C88.9185 7.64172 89.3987 7.36802 89.9316 7.16992C90.4797 6.9719 91.0808 6.87208 91.7354 6.87207V10.1406ZM75.9463 9.54688C75.4591 9.54688 75.0097 9.67652 74.5986 9.93555C74.1875 10.1794 73.8598 10.5528 73.6162 11.0557C73.388 11.5431 73.2735 12.16 73.2734 12.9062C73.2734 13.6529 73.3878 14.2784 73.6162 14.7812C73.8598 15.284 74.1794 15.6576 74.5752 15.9014C74.9862 16.1451 75.4357 16.2666 75.9229 16.2666C76.4403 16.2666 76.8972 16.145 77.293 15.9014C77.704 15.6576 78.0245 15.2841 78.2529 14.7812C78.4965 14.2784 78.6182 13.6529 78.6182 12.9062C78.6181 12.16 78.4963 11.5431 78.2529 11.0557C78.0245 10.5528 77.7041 10.1794 77.293 9.93555C76.8972 9.67662 76.4485 9.54695 75.9463 9.54688ZM98.4609 9.27246C97.8824 9.27246 97.4021 9.432 97.0215 9.75195C96.6561 10.0567 96.4737 10.5065 96.4736 11.1006C96.4736 11.6947 96.6562 12.1445 97.0215 12.4492C97.4021 12.754 97.8824 12.9062 98.4609 12.9062C99.0546 12.9062 99.5341 12.7539 99.8994 12.4492C100.265 12.1445 100.447 11.6948 100.447 11.1006C100.447 10.5065 100.265 10.0567 99.8994 9.75195C99.5341 9.43214 99.0545 9.27253 98.4609 9.27246ZM112.19 9.38672C111.673 9.38673 111.193 9.5083 110.752 9.75195C110.31 9.98052 109.96 10.3395 109.701 10.8271C109.562 11.1051 109.464 11.4251 109.404 11.7871H114.771C114.726 11.0404 114.459 10.453 113.972 10.0264C113.5 9.59988 112.906 9.38672 112.19 9.38672Z" fill="black"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="paint0_linear_705_5572" x1="-0.168894" y1="0.324875" x2="28.2972" y2="10.1134" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#16C9FF"/>
|
|
10
|
+
<stop offset="1" stop-color="#0862FF"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="paint1_linear_705_5572" x1="29.9996" y1="8.85666" x2="11.1576" y2="8.85666" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop stop-color="#16C9FF"/>
|
|
14
|
+
<stop offset="1" stop-color="#0862FF"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
<clipPath id="clip0_705_5572">
|
|
17
|
+
<rect width="118" height="24" fill="white"/>
|
|
18
|
+
</clipPath>
|
|
19
|
+
</defs>
|
|
20
|
+
</svg>
|