├── .changeset ├── README.md └── config.json ├── .eslintrc.js ├── .github └── workflows │ ├── publish.yml │ ├── release-pr.yml │ ├── test-pr.yml │ └── test.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .syncpackrc ├── .tool-versions ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── apps └── www │ ├── .eslintrc.js │ ├── .source │ ├── index.d.ts │ ├── index.js │ └── source.config.mjs │ ├── CHANGELOG.md │ ├── README.md │ ├── moonlight-ii.json │ ├── next-env.d.ts │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── island_dark.svg │ ├── island_light.svg │ └── site.webmanifest │ ├── source.config.ts │ ├── src │ ├── app │ │ ├── api │ │ │ ├── docs-og │ │ │ │ └── [[...slug]] │ │ │ │ │ ├── FantasqueSansMono-Regular.ttf │ │ │ │ │ ├── made-okine-sans-medium.woff │ │ │ │ │ └── route.tsx │ │ │ └── search │ │ │ │ └── route.ts │ │ ├── docs │ │ │ ├── [[...slug]] │ │ │ │ └── page.tsx │ │ │ └── layout.tsx │ │ ├── favicon.ico │ │ ├── layout.config.tsx │ │ ├── layout.tsx │ │ ├── page.tsx │ │ └── providers.tsx │ ├── components │ │ ├── badge-logo.tsx │ │ ├── footer.tsx │ │ ├── logo-mark.tsx │ │ ├── mdx-components.tsx │ │ ├── mobile-nav.tsx │ │ └── mode-toggle.tsx │ ├── config │ │ ├── docs.ts │ │ └── site.ts │ ├── content │ │ └── docs │ │ │ ├── concepts.mdx │ │ │ ├── contributing.mdx │ │ │ ├── evalz │ │ │ ├── api.mdx │ │ │ ├── examples.mdx │ │ │ ├── getting-started.mdx │ │ │ └── index.mdx │ │ │ ├── index.mdx │ │ │ ├── instructor-js.mdx │ │ │ ├── llm-polyglot │ │ │ ├── anthropic.mdx │ │ │ ├── google.mdx │ │ │ └── index.mdx │ │ │ ├── schema-stream │ │ │ ├── api-reference.mdx │ │ │ ├── getting-started.mdx │ │ │ └── index.mdx │ │ │ ├── stream-hooks │ │ │ ├── api-reference.mdx │ │ │ ├── getting-started.mdx │ │ │ └── index.mdx │ │ │ └── zod-stream │ │ │ ├── examples.mdx │ │ │ ├── getting-started.mdx │ │ │ └── index.mdx │ ├── lib │ │ ├── metadata.ts │ │ ├── source.ts │ │ └── utils.ts │ ├── mdx-components.tsx │ └── styles │ │ ├── FantasqueSansMono-Bold.woff2 │ │ ├── FantasqueSansMono-Regular.woff2 │ │ ├── fonts.ts │ │ ├── globals.css │ │ ├── made-okine-sans-black-outline.woff2 │ │ ├── made-okine-sans-black.woff2 │ │ ├── made-okine-sans-bold-outline.woff2 │ │ ├── made-okine-sans-bold.woff2 │ │ ├── made-okine-sans-medium.woff │ │ ├── made-okine-sans-regular.woff │ │ ├── sp-blunt-outline.woff2 │ │ └── sp-blunt-regular.woff2 │ ├── tailwind.config.ts │ ├── tsconfig.json │ └── tsconfig.lint.json ├── bun.d.ts ├── bun.lockb ├── bunfig.toml ├── package.json ├── packages ├── eslint-config │ ├── README.md │ ├── library.js │ ├── next.js │ ├── package.json │ └── react-internal.js ├── tailwind-config │ ├── README.md │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.config.ts │ └── tsconfig.json ├── typescript-config │ ├── base.json │ ├── nextjs.json │ ├── package.json │ ├── pub.json │ └── react-library.json └── ui │ ├── .eslintrc.js │ ├── package.json │ ├── postcss.config.js │ ├── src │ ├── components │ │ ├── primitives │ │ │ └── popover.tsx │ │ ├── table │ │ │ ├── column-header.tsx │ │ │ ├── column-toggle.tsx │ │ │ ├── index.tsx │ │ │ └── pagination.tsx │ │ └── ui │ │ │ ├── accordion.tsx │ │ │ ├── alert-dialog.tsx │ │ │ ├── alert.tsx │ │ │ ├── aspect-ratio.tsx │ │ │ ├── avatar.tsx │ │ │ ├── badge.tsx │ │ │ ├── breadcrumb.tsx │ │ │ ├── button.tsx │ │ │ ├── calendar.tsx │ │ │ ├── card.tsx │ │ │ ├── carousel.tsx │ │ │ ├── chart.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── collapsible.tsx │ │ │ ├── command.tsx │ │ │ ├── context-menu.tsx │ │ │ ├── dialog.tsx │ │ │ ├── drawer.tsx │ │ │ ├── dropdown-menu.tsx │ │ │ ├── form.tsx │ │ │ ├── hover-card.tsx │ │ │ ├── input-otp.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ ├── menubar.tsx │ │ │ ├── navigation-menu.tsx │ │ │ ├── pagination.tsx │ │ │ ├── popover.tsx │ │ │ ├── progress.tsx │ │ │ ├── radio-group.tsx │ │ │ ├── resizable.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── select.tsx │ │ │ ├── separator.tsx │ │ │ ├── sheet.tsx │ │ │ ├── sidebar.tsx │ │ │ ├── skeleton.tsx │ │ │ ├── slider.tsx │ │ │ ├── sonner.tsx │ │ │ ├── switch.tsx │ │ │ ├── table.tsx │ │ │ ├── tabs.tsx │ │ │ ├── textarea.tsx │ │ │ ├── toast.tsx │ │ │ ├── toaster.tsx │ │ │ ├── toggle-group.tsx │ │ │ ├── toggle.tsx │ │ │ └── tooltip.tsx │ ├── hooks │ │ ├── use-local-storage.ts │ │ ├── use-mobile.tsx │ │ └── use-toast.ts │ └── lib │ │ └── utils.ts │ ├── tailwind.config.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── tsup.config.ts │ └── turbo.json ├── public-packages ├── evalz │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── src │ │ ├── constants │ │ │ └── prompts.ts │ │ ├── evaluators │ │ │ ├── accuracy.ts │ │ │ ├── context.ts │ │ │ ├── index.ts │ │ │ └── weighted.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── cosine.ts │ │ │ └── index.ts │ │ └── types │ │ │ └── index.ts │ ├── tests │ │ ├── data.ts │ │ └── standard.test.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── tsup.config.ts ├── hooks │ ├── .eslintrc.js │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── postcss.config.js │ ├── src │ │ ├── hooks │ │ │ ├── use-json-stream.tsx │ │ │ └── use-stream.tsx │ │ ├── index.ts │ │ ├── lib │ │ │ └── utils.ts │ │ └── types │ │ │ └── index.ts │ ├── tailwind.config.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── tsup.config.ts │ └── turbo.json ├── llm-client │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── README.md │ ├── examples │ │ ├── anthropic.function.ts │ │ └── google.function.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ └── index.ts │ │ ├── logger │ │ │ ├── index.ts │ │ │ └── transports │ │ │ │ └── console.ts │ │ ├── providers │ │ │ ├── anthropic │ │ │ │ └── index.ts │ │ │ ├── google │ │ │ │ └── index.ts │ │ │ └── openai │ │ │ │ └── index.ts │ │ └── types │ │ │ └── index.ts │ ├── tests │ │ ├── anthropic.test.ts │ │ └── google.test.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── tsup.config.ts ├── schemaStream │ ├── .eslintrc.js │ ├── .tool-versions │ ├── CHANGELOG.md │ ├── README.md │ ├── bun.d.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── utils │ │ │ ├── buffered-string.ts │ │ │ ├── json-parser.ts │ │ │ ├── streaming-json-parser.ts │ │ │ ├── token-parser.ts │ │ │ ├── token-type.ts │ │ │ ├── tokenizer.ts │ │ │ └── utf-8.ts │ ├── tests │ │ ├── jsonParser.test.ts │ │ └── zod-types.test.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── tsup.config.ts └── zod-stream │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── README.md │ ├── examples │ └── stream.ts │ ├── package.json │ ├── src │ ├── constants │ │ └── modes.ts │ ├── create-agent.ts │ ├── index.ts │ ├── lib │ │ ├── _utils.ts │ │ └── index.ts │ ├── oai │ │ ├── params.ts │ │ ├── parser.ts │ │ └── stream.ts │ ├── parsers │ │ ├── parser.test.ts │ │ └── thinking.ts │ ├── response-model.ts │ ├── structured-stream.client.ts │ └── types │ │ └── index.ts │ ├── tests │ ├── model.test.ts │ ├── parsers │ │ └── thinking.test.ts │ └── stream.test.ts │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── tsup.config.ts ├── tsconfig.json └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "hack-dance/island-ai" }], 4 | "commit": true, 5 | "fixed": [], 6 | "linked": [["zod-stream", "stream-hooks"]], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [], 11 | "bumpVersionsWithWorkspaceProtocolOnly": false, 12 | "privatePackages": { 13 | "version": false, 14 | "tag": false 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | ignorePatterns: ["apps/**", "packages/**", "public-packages/**"], 4 | extends: ["@repo/eslint-config/library.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - closed 7 | 8 | concurrency: ${{ github.workflow }}-${{ github.ref }} 9 | permissions: {} 10 | jobs: 11 | publish: 12 | if: github.repository == 'hack-dance/island-ai' && github.event.pull_request.merged == true && (startsWith(github.head_ref, 'changeset-release/main') || startsWith(github.head_ref, '_publish-trigger')) 13 | permissions: 14 | contents: write 15 | pull-requests: write 16 | 17 | name: Publish packages 18 | runs-on: ubuntu-latest 19 | environment: Publish 20 | env: 21 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 22 | TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 23 | TURBO_TEAM: ${{ secrets.TURBO_TEAM }} 24 | TURBO_REMOTE_ONLY: true 25 | 26 | 27 | steps: 28 | - name: Checkout Repo 29 | uses: actions/checkout@v3 30 | with: 31 | fetch-depth: 0 32 | 33 | - name: Setup bun 34 | uses: oven-sh/setup-bun@v1 35 | with: 36 | bun-version: latest 37 | 38 | - name: Setup Node.js 39 | uses: actions/setup-node@v3 40 | with: 41 | node-version: 20.9.0 42 | 43 | - name: Install Dependencies 44 | run: bun i 45 | 46 | - name: Creating .npmrc 47 | run: | 48 | cat << EOF > "$HOME/.npmrc" 49 | //registry.npmjs.org/:_authToken=$NPM_TOKEN 50 | EOF 51 | env: 52 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 53 | 54 | - name: Publish packages & create release 55 | id: changesets 56 | uses: changesets/action@v1 57 | with: 58 | publish: bun publish-packages 59 | createGithubReleases: true 60 | 61 | env: 62 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 63 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 64 | -------------------------------------------------------------------------------- /.github/workflows/release-pr.yml: -------------------------------------------------------------------------------- 1 | name: RC PR 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | concurrency: ${{ github.workflow }}-${{ github.ref }} 9 | permissions: {} #reset 10 | env: 11 | CI: true 12 | 13 | jobs: 14 | release: 15 | if: github.repository == 'hack-dance/island-ai' 16 | permissions: 17 | contents: write 18 | pull-requests: write 19 | 20 | name: Changeset Release 21 | runs-on: ubuntu-latest 22 | environment: Publish 23 | env: 24 | TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 25 | TURBO_TEAM: ${{ secrets.TURBO_TEAM }} 26 | TURBO_REMOTE_ONLY: true 27 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 28 | 29 | steps: 30 | - name: Checkout code 31 | uses: actions/checkout@v3 32 | with: 33 | fetch-depth: 0 34 | 35 | - name: Setup Node.js 36 | uses: actions/setup-node@v3 37 | with: 38 | node-version: 20.9.0 39 | 40 | - name: Setup bun 41 | uses: oven-sh/setup-bun@v1 42 | with: 43 | bun-version: latest 44 | 45 | - name: Install Dependencies 46 | run: bun i 47 | 48 | - name: Create version PR 49 | uses: changesets/action@v1 50 | with: 51 | version: bun run version-packages 52 | env: 53 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 54 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 55 | -------------------------------------------------------------------------------- /.github/workflows/test-pr.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Test PR 3 | on: 4 | pull_request_target: 5 | branches: 6 | - main 7 | jobs: 8 | approve: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Approval required. 13 | run: echo For security reasons, all pull requests need to be approved first before running any automated CI. 14 | 15 | test-branch: 16 | name: run-tests 17 | runs-on: ubuntu-latest 18 | needs: [approve] 19 | environment: OPENAI 20 | env: 21 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} 22 | ANYSCALE_API_KEY: ${{ secrets.ANYSCALE_API_KEY }} 23 | ANTHROPIC_API_KEY: ${{ secrets.ANTRHOPIC_API_KEY }} 24 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 25 | GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} 26 | AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} 27 | AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} 28 | 29 | steps: 30 | - uses: actions/checkout@v3 31 | with: 32 | ref: ${{ github.event.pull_request.head.sha }} 33 | fetch-depth: 2 34 | 35 | - name: Setup bun 36 | uses: oven-sh/setup-bun@v1 37 | with: 38 | bun-version: latest 39 | 40 | - name: Setup Node.js 41 | uses: actions/setup-node@v3 42 | with: 43 | node-version: 20.9.0 44 | 45 | - name: Install Dependencies 46 | run: bun install 47 | 48 | - run: bun run build 49 | - run: bun run type-check 50 | - run: bun run lint 51 | - run: bun test --timeout=25000 52 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test Main 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | test-main: 8 | if: github.repository == 'hack-dance/island-ai' && github.ref == 'refs/heads/main' 9 | name: run-tests 10 | runs-on: ubuntu-latest 11 | environment: OPENAI 12 | env: 13 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} 14 | ANYSCALE_API_KEY: ${{ secrets.ANYSCALE_API_KEY }} 15 | ANTHROPIC_API_KEY: ${{ secrets.ANTRHOPIC_API_KEY }} 16 | GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} 17 | GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} 18 | AZURE_OPENAI_API_KEY: ${{secrets.AZURE_OPENAI_API_KEY}} 19 | AZURE_OPENAI_ENDPOINT: ${{secrets.AZURE_OPENAI_ENDPOINT}} 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | with: 24 | fetch-depth: 0 25 | 26 | - name: Setup bun 27 | uses: oven-sh/setup-bun@v1 28 | with: 29 | bun-version: latest 30 | 31 | - name: Setup Node.js 32 | uses: actions/setup-node@v3 33 | with: 34 | node-version: 20.9.0 35 | 36 | - name: Install Dependencies 37 | run: bun i 38 | 39 | - run: bun run build 40 | - run: bun run type-check 41 | - run: bun run lint 42 | - run: bun test --timeout=25000 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # Local env files 9 | .env 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | 15 | # Testing 16 | coverage 17 | 18 | # Turbo 19 | .turbo 20 | 21 | # Vercel 22 | .vercel 23 | 24 | # Build Outputs 25 | .next/ 26 | out/ 27 | build 28 | dist 29 | 30 | 31 | # Debug 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | 36 | # Misc 37 | .DS_Store 38 | *.pem 39 | 40 | tsconfig.tsbuildinfo 41 | 42 | .cache/ 43 | 44 | .turbo 45 | 46 | .npmrc -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | build 4 | dist 5 | *.tsbuildinfo 6 | *.gitignore 7 | *.svg 8 | *.lock 9 | *.npmignore 10 | *.sql 11 | *.png 12 | *.jpg 13 | *.jpeg 14 | *.gif 15 | *.ico 16 | *.sh 17 | Dockerfile 18 | Dockerfile.* 19 | .env 20 | .env.* 21 | LICENSE 22 | *.log 23 | .DS_Store 24 | .dockerignore 25 | *.patch 26 | *.toml 27 | 28 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": false, 4 | "trailingComma": "none", 5 | "arrowParens": "avoid", 6 | "singleQuote": false, 7 | "tabWidth": 2, 8 | "importOrder": [ 9 | "^(react/(.*)$)|^(react$)", 10 | "^(next/(.*)$)|^(next$)", 11 | "", 12 | "", 13 | "^types$", 14 | "^@/types/(.*)$", 15 | "^@/config/(.*)$", 16 | "^@/constants/(.*)$", 17 | "^@/lib/(.*)$", 18 | "^@hackdance/(.*)$", 19 | "^@/ai/(.*)$", 20 | "^@/hooks/(.*)$", 21 | "^@/components/(.*)$", 22 | "^@/styles/(.*)$", 23 | "", 24 | "^[./]" 25 | ], 26 | "importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"], 27 | "plugins": [ 28 | "@ianvs/prettier-plugin-sort-imports" 29 | ], 30 | "printWidth": 100, 31 | "proseWrap": "never", 32 | "quoteProps": "consistent" 33 | } 34 | -------------------------------------------------------------------------------- /.syncpackrc: -------------------------------------------------------------------------------- 1 | { 2 | "specifierTypes": ["!workspace-protocol"], 3 | "versionGroups": [ 4 | { 5 | "label": "Use workspace protocol when developing local packages", 6 | "dependencies": ["$LOCAL"], 7 | "dependencyTypes": ["dev", "peer", "optional", "prod"], 8 | "pinVersion": "workspace:*" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | pnpm 8.13.1 2 | bun 1.1.34 3 | nodejs 21.2.0 4 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint", "bradlc.vscode-tailwindcss"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "bun", 9 | "internalConsoleOptions": "neverOpen", 10 | "request": "launch", 11 | "name": "Debug File", 12 | "program": "${file}", 13 | "cwd": "${workspaceFolder}", 14 | "stopOnEntry": false, 15 | "watchMode": false 16 | }, 17 | { 18 | "type": "bun", 19 | "internalConsoleOptions": "neverOpen", 20 | "request": "launch", 21 | "name": "Run File", 22 | "program": "${file}", 23 | "cwd": "${workspaceFolder}", 24 | "noDebug": true, 25 | "watchMode": false 26 | }, 27 | { 28 | "type": "bun", 29 | "internalConsoleOptions": "neverOpen", 30 | "request": "attach", 31 | "name": "Attach Bun", 32 | "url": "ws://localhost:6499/", 33 | "stopOnEntry": false 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "GitHub.copilot", 3 | "editor.tabSize": 2, 4 | "editor.formatOnType": false, 5 | "editor.formatOnPaste": false, 6 | "editor.trimAutoWhitespace": true, 7 | "editor.formatOnSave": false, 8 | "[javascript, javascriptreact, typescript, typescriptreact]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "editor.codeActionsOnSave": { 12 | "source.fixAll": "always", 13 | "source.fixAll.eslint": "always" 14 | }, 15 | "[html]": { 16 | "editor.defaultFormatter": "GitHub.copilot" 17 | }, 18 | "[javascript]": { 19 | "editor.defaultFormatter": "vscode.typescript-language-features" 20 | }, 21 | "[json]": { 22 | "editor.defaultFormatter": "vscode.json-language-features", 23 | "editor.autoIndent": "advanced" 24 | }, 25 | "[yaml]": { 26 | "editor.autoIndent": "advanced", 27 | "editor.tabSize": 2, 28 | "editor.formatOnSave": true, 29 | "editor.formatOnType": false, 30 | "editor.formatOnPaste": true 31 | }, 32 | "eslint.validate": [ 33 | "javascript", 34 | "typescript", 35 | "typescriptreact" 36 | ], 37 | "eslint.workingDirectories": [ 38 | { 39 | "pattern": "./apps/*" 40 | }, 41 | { 42 | "pattern": "./packages/*" 43 | }, 44 | { 45 | "pattern": "./public-packages/*" 46 | }, 47 | { 48 | "pattern": "./services/*" 49 | }, 50 | ], 51 | "eslint.debug": true, 52 | "github-actions.workflows.pinned.workflows": [ 53 | ".github/workflows/release.yml" 54 | ], 55 | "typescript.tsdk": "node_modules/typescript/lib", 56 | "typescript.enablePromptUseWorkspaceTsdk": true, 57 | "typescript.validate.enable": true, 58 | "editor.quickSuggestions": { 59 | "strings": true 60 | }, 61 | "css.validate": false, 62 | "editor.inlineSuggest.enabled": true, 63 | "[typescriptreact]": { 64 | "editor.defaultFormatter": "vscode.typescript-language-features" 65 | }, 66 | "[jsonc]": { 67 | "editor.defaultFormatter": "vscode.json-language-features" 68 | }, 69 | "[typescript]": { 70 | "editor.defaultFormatter": "vscode.typescript-language-features" 71 | } 72 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Dimitri Kennedy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /apps/www/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["@repo/eslint-config/next.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: true 8 | }, 9 | overrides: [ 10 | { 11 | extends: ["plugin:@typescript-eslint/disable-type-checked"], 12 | files: ["./**/*.mjs", "*.js"] 13 | } 14 | ], 15 | settings: { 16 | tailwindcss: { 17 | callees: ["cn"], 18 | config: "tailwind.config.ts" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/www/.source/index.d.ts: -------------------------------------------------------------------------------- 1 | import type { GetOutput } from "fumadocs-mdx/config" 2 | export declare const docs: GetOutput 3 | export declare const meta: GetOutput -------------------------------------------------------------------------------- /apps/www/.source/source.config.mjs: -------------------------------------------------------------------------------- 1 | // source.config.ts 2 | import { defineDocs } from "fumadocs-mdx/config"; 3 | var { docs, meta } = defineDocs({ 4 | dir: "./src/content/docs" 5 | }); 6 | export { 7 | docs, 8 | meta 9 | }; 10 | -------------------------------------------------------------------------------- /apps/www/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/CHANGELOG.md -------------------------------------------------------------------------------- /apps/www/README.md: -------------------------------------------------------------------------------- 1 | # demo 2 | -------------------------------------------------------------------------------- /apps/www/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /apps/www/next.config.mjs: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import { createMDX } from "fumadocs-mdx/next" 3 | import rehypePrettyCode from "rehype-pretty-code" 4 | import remarkGfm from "remark-gfm" 5 | 6 | /** @type {import('next').NextConfig} */ 7 | const nextConfig = { 8 | transpilePackages: ["@repo/ui"] 9 | } 10 | 11 | const options = { 12 | keepBackground: false, 13 | theme: JSON.parse(fs.readFileSync(new URL("./moonlight-ii.json", import.meta.url))) 14 | } 15 | 16 | const withMDX = createMDX({ 17 | options: { 18 | extension: /\.mdx?$/, 19 | remarkPlugins: [remarkGfm], 20 | rehypePlugins: [[rehypePrettyCode, options]] 21 | } 22 | }) 23 | 24 | export default withMDX(nextConfig) 25 | -------------------------------------------------------------------------------- /apps/www/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "eslint . --max-warnings 0", 10 | "postinstall": "fumadocs-mdx" 11 | }, 12 | "dependencies": { 13 | "@content-collections/core": "^0.7.3", 14 | "@content-collections/mdx": "^0.2.0", 15 | "@content-collections/next": "^0.2.4", 16 | "@fumadocs/content-collections": "^1.1.5", 17 | "@mynaui/icons-react": "latest", 18 | "@next/eslint-plugin-next": "^14.0.2", 19 | "@repo/eslint-config": "workspace:*", 20 | "@repo/tailwind-config": "workspace:*", 21 | "@repo/typescript-config": "workspace:*", 22 | "@repo/ui": "workspace:*", 23 | "@types/eslint": "^8.56.1", 24 | "@types/mdx": "^2.0.13", 25 | "@types/node": "^20.10.6", 26 | "@types/react": "^18.3.2", 27 | "@types/react-dom": "^18.3.0", 28 | "@vercel/analytics": "^1.1.1", 29 | "@vercel/speed-insights": "latest", 30 | "avvvatars-react": "^0.4.2", 31 | "class-variance-authority": "^0.7.0", 32 | "clsx": "^1.2.1", 33 | "cmdk": "^0.2.0", 34 | "cookies": "^0.8.0", 35 | "date-fns": "^2.30.0", 36 | "framer-motion": "^10.12.18", 37 | "fumadocs-core": "^14.5.4", 38 | "fumadocs-mdx": "^11.1.2", 39 | "fumadocs-typescript": "^3.0.2", 40 | "fumadocs-ui": "^14.5.4", 41 | "js-tiktoken": "^1.0.7", 42 | "jsonwebtoken": "^9.0.2", 43 | "lucide-react": "latest", 44 | "next": "15.0.3", 45 | "next-themes": "^0.2.1", 46 | "openai": "4.47.1", 47 | "ramda": "^0.29.0", 48 | "react": "19.0.0-rc-66855b96-20241106", 49 | "react-dom": "19.0.0-rc-66855b96-20241106", 50 | "react-markdown": "^8.0.7", 51 | "rehype-highlight": "^6.0.0", 52 | "rehype-pretty-code": "^0.10.1", 53 | "remark-gfm": "^3.0.1", 54 | "shiki": "^0.14.4", 55 | "sonner": "*", 56 | "svix": "^1.13.0", 57 | "tailwind-merge": "^1.13.2", 58 | "tailwindcss": "^3.3.5", 59 | "tailwindcss-animate": "^1.0.6", 60 | "tippy.js": "^6.3.7", 61 | "typescript": "^5.3.3", 62 | "use-debounce": "^9.0.4", 63 | "use-immer": "^0.9.0", 64 | "vaul": "^0.7.9", 65 | "zod": "^3.23.3" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /apps/www/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | "postcss-import": {}, 4 | "tailwindcss/nesting": {}, 5 | "tailwindcss": {}, 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/www/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/www/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/www/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/www/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/favicon-16x16.png -------------------------------------------------------------------------------- /apps/www/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/favicon-32x32.png -------------------------------------------------------------------------------- /apps/www/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/public/favicon.ico -------------------------------------------------------------------------------- /apps/www/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /apps/www/source.config.ts: -------------------------------------------------------------------------------- 1 | import { defineDocs } from "fumadocs-mdx/config" 2 | 3 | export const { docs, meta } = defineDocs({ 4 | dir: "./src/content/docs" 5 | }) 6 | -------------------------------------------------------------------------------- /apps/www/src/app/api/docs-og/[[...slug]]/FantasqueSansMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/src/app/api/docs-og/[[...slug]]/FantasqueSansMono-Regular.ttf -------------------------------------------------------------------------------- /apps/www/src/app/api/docs-og/[[...slug]]/made-okine-sans-medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/src/app/api/docs-og/[[...slug]]/made-okine-sans-medium.woff -------------------------------------------------------------------------------- /apps/www/src/app/api/search/route.ts: -------------------------------------------------------------------------------- 1 | import { createFromSource } from "fumadocs-core/search/server" 2 | 3 | import { source } from "@/lib/source" 4 | 5 | export const { GET } = createFromSource(source) 6 | -------------------------------------------------------------------------------- /apps/www/src/app/docs/[[...slug]]/page.tsx: -------------------------------------------------------------------------------- 1 | import { notFound } from "next/navigation" 2 | import { createTypeTable } from "fumadocs-typescript/ui" 3 | import defaultMdxComponents from "fumadocs-ui/mdx" 4 | import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page" 5 | 6 | import { metadataImage } from "@/lib/metadata" 7 | import { source } from "@/lib/source" 8 | 9 | const { AutoTypeTable } = createTypeTable() 10 | 11 | export default async function Page(props: { params: Promise<{ slug?: string[] }> }) { 12 | const params = await props.params 13 | const page = source.getPage(params.slug) 14 | 15 | console.log(page, params.slug) 16 | 17 | if (!page) notFound() 18 | 19 | const MDX = page.data.body 20 | 21 | return ( 22 | 23 | {page.data.title} 24 | {page.data.description} 25 | 26 | 27 | 28 | 29 | ) 30 | } 31 | 32 | export async function generateStaticParams() { 33 | return source.generateParams() 34 | } 35 | 36 | export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) { 37 | const params = await props.params 38 | const page = source.getPage(params.slug) 39 | 40 | if (!page) notFound() 41 | 42 | return metadataImage.withImage(page.slugs, { 43 | title: page.data.title, 44 | description: page.data.description 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /apps/www/src/app/docs/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react" 2 | import Link from "next/link" 3 | import { baseOptions } from "@/app/layout.config" 4 | import { DocsLayout } from "fumadocs-ui/layouts/docs" 5 | 6 | import { source } from "@/lib/source" 7 | 8 | export default function Layout({ children }: { children: ReactNode }) { 9 | return ( 10 | 16 | 21 | Built in Boston by 22 | HACK DANCE 23 | 24 | 25 | ) 26 | }} 27 | > 28 | {children} 29 | 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /apps/www/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hack-dance/island-ai/f5c87679a3be6cf8ba84490b073cc54df27ed998/apps/www/src/app/favicon.ico -------------------------------------------------------------------------------- /apps/www/src/app/layout.config.tsx: -------------------------------------------------------------------------------- 1 | import { BaseLayoutProps } from "fumadocs-ui/layouts/shared" 2 | 3 | import { LogoMark } from "@/components/logo-mark" 4 | 5 | export const baseOptions: BaseLayoutProps = { 6 | githubUrl: "https://github.com/hack-dance/island-ai", 7 | nav: { 8 | title: ( 9 | <> 10 | 11 |

Island AI

12 | 13 | ) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/www/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "@/styles/globals.css" 2 | 3 | import { ReactNode } from "react" 4 | import { Metadata } from "next" 5 | import { Analytics } from "@vercel/analytics/react" 6 | import { SpeedInsights } from "@vercel/speed-insights/next" 7 | 8 | import { siteConfig } from "@/config/site" 9 | import { cn } from "@/lib/utils" 10 | import { defaultFontMapper } from "@/styles/fonts" 11 | 12 | import Providers from "./providers" 13 | 14 | export const metadata: Metadata = { 15 | title: siteConfig.name, 16 | description: siteConfig.description, 17 | metadataBase: new URL(siteConfig.url), 18 | openGraph: { 19 | title: "Island AI", 20 | description: 21 | "Island AI is a collection of low-level utilities and high-level tools for handling structured data streams from LLMs.", 22 | url: "https://island.hack.dance", 23 | siteName: "Island AI", 24 | locale: "en_US", 25 | type: "website", 26 | images: [ 27 | { 28 | url: "/api/docs-og/home-page", 29 | width: 1200, 30 | height: 630, 31 | alt: "Island AI" 32 | } 33 | ] 34 | }, 35 | twitter: { 36 | title: "Island AI", 37 | card: "summary_large_image", 38 | creator: "@dimitrikennedy", 39 | description: 40 | "Island AI is a collection of low-level utilities and high-level tools for handling structured data streams from LLMs.", 41 | images: ["/api/docs-og/home-page"] 42 | }, 43 | alternates: { 44 | canonical: "https://island.hack.dance" 45 | }, 46 | keywords: ["open source", "ai", "llm", "production"], 47 | authors: [{ name: "Dimitri Kennedy" }], 48 | icons: { 49 | shortcut: "/favicon.ico" 50 | } 51 | } 52 | 53 | export const viewport = { 54 | width: "device-width", 55 | initialScale: 1, 56 | maximumScale: 1, 57 | interactiveWidget: "resizes-content" 58 | } 59 | 60 | export default function RootLayout({ children }: { children: ReactNode }) { 61 | return ( 62 | 67 | 68 | {children} 69 | 70 | 71 | 72 | 73 | ) 74 | } 75 | -------------------------------------------------------------------------------- /apps/www/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link" 2 | import { Button } from "@repo/ui/components/ui/button" 3 | import { ScrollArea } from "@repo/ui/components/ui/scroll-area" 4 | 5 | import { BadgeLogo } from "@/components/badge-logo" 6 | import { Footer } from "@/components/footer" 7 | 8 | export default async function Page() { 9 | return ( 10 | 11 |
12 |
13 | 14 | 15 |

16 | A TypeScript toolkit for building dynamic LLM generated UI with structured, streaming, 17 | immediately safe-to-parse JSON. 18 |

19 | 20 |
21 | 22 | 23 | 24 |
25 |
26 |
27 |