├── apps ├── email │ ├── .gitignore │ ├── tsconfig.json │ ├── emails │ │ └── contact.tsx │ └── package.json ├── app │ ├── vitest.config.ts │ ├── liveblocks.config.ts │ ├── postcss.config.mjs │ ├── tailwind.config.ts │ ├── app │ │ ├── icon.png │ │ ├── (organization) │ │ │ ├── minime │ │ │ │ ├── analytics │ │ │ │ │ └── index.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── components │ │ │ │ │ ├── layout │ │ │ │ │ │ ├── app-shell.tsx │ │ │ │ │ │ └── app-header.tsx │ │ │ │ │ ├── articles │ │ │ │ │ │ └── no-articles-placeholder.tsx │ │ │ │ │ ├── projects │ │ │ │ │ │ └── no-projects-placeholder.tsx │ │ │ │ │ ├── bookmarks │ │ │ │ │ │ └── no-bookmarks-placeholder.tsx │ │ │ │ │ └── domain │ │ │ │ │ │ └── use-domain-status.tsx │ │ │ │ └── settings │ │ │ │ │ └── layout.tsx │ │ │ ├── tube │ │ │ │ ├── studio │ │ │ │ │ ├── [videoId] │ │ │ │ │ │ ├── edit │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── final_view │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── test.tsx │ │ │ │ └── automation │ │ │ │ │ └── page.tsx │ │ │ ├── chat │ │ │ │ ├── settings │ │ │ │ │ ├── data │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── voice │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── common │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── memory │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── plugins │ │ │ │ │ │ └── page.tsx │ │ │ │ ├── assistants │ │ │ │ │ └── page.tsx │ │ │ │ ├── components │ │ │ │ │ ├── codeblock.module.css │ │ │ │ │ ├── welcome-message │ │ │ │ │ │ └── custom-assistant-copy.tsx │ │ │ │ │ ├── feedback │ │ │ │ │ │ └── use-feedback.tsx │ │ │ │ │ ├── settings │ │ │ │ │ │ ├── models │ │ │ │ │ │ │ └── api-key-info.tsx │ │ │ │ │ │ └── setting-card.tsx │ │ │ │ │ ├── messages │ │ │ │ │ │ ├── image-message.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── context-message.tsx │ │ │ │ │ ├── chat-input │ │ │ │ │ │ └── image-dropzone-root.tsx │ │ │ │ │ └── pricing-modal.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── terms │ │ │ │ │ └── page.tsx │ │ │ │ └── privacy │ │ │ │ │ └── page.tsx │ │ │ ├── voice │ │ │ │ └── layout.tsx │ │ │ ├── test │ │ │ │ ├── Test.tsx │ │ │ │ └── page.tsx │ │ │ ├── resume │ │ │ │ ├── jobs │ │ │ │ │ └── page.tsx │ │ │ │ ├── resumes │ │ │ │ │ └── [id] │ │ │ │ │ │ └── layout.tsx │ │ │ │ └── components │ │ │ │ │ └── resume │ │ │ │ │ └── editor │ │ │ │ │ └── shared │ │ │ │ │ └── LoadingFallback.tsx │ │ │ ├── settings │ │ │ │ └── integrations │ │ │ │ │ └── layout.tsx │ │ │ ├── artifacts │ │ │ │ ├── components │ │ │ │ │ └── v2 │ │ │ │ │ │ └── overview.tsx │ │ │ │ └── page.tsx │ │ │ └── (home) │ │ │ │ └── components │ │ │ │ └── greeting.tsx │ │ ├── apple-icon.png │ │ ├── opengraph-image.png │ │ ├── .well-known │ │ │ └── vercel │ │ │ │ └── flags │ │ │ │ └── route.ts │ │ ├── api │ │ │ ├── prompts │ │ │ │ └── route.ts │ │ │ ├── uploadthing │ │ │ │ └── route.ts │ │ │ ├── changelogs │ │ │ │ └── route.ts │ │ │ ├── assistants │ │ │ │ └── route.ts │ │ │ ├── trpc │ │ │ │ └── [trpc] │ │ │ │ │ └── route.ts │ │ │ ├── history │ │ │ │ └── route.ts │ │ │ ├── user │ │ │ │ └── route.ts │ │ │ ├── bookmarks │ │ │ │ ├── collections │ │ │ │ │ └── route.ts │ │ │ │ ├── export │ │ │ │ │ └── route.ts │ │ │ │ └── t │ │ │ │ │ └── [id] │ │ │ │ │ └── route.ts │ │ │ ├── feedback │ │ │ │ └── route.ts │ │ │ ├── search │ │ │ │ └── route.ts │ │ │ ├── subscribers │ │ │ │ ├── [id] │ │ │ │ │ └── route.ts │ │ │ │ └── export │ │ │ │ │ └── route.ts │ │ │ └── auth │ │ │ │ └── callback │ │ │ │ └── route.ts │ │ ├── (unsubscribe) │ │ │ └── unsubscribe │ │ │ │ └── action.ts │ │ ├── (user) │ │ │ └── user │ │ │ │ └── [domain] │ │ │ │ ├── components │ │ │ │ ├── nothing-placeholder.tsx │ │ │ │ ├── about.tsx │ │ │ │ ├── toggle.tsx │ │ │ │ └── watermark.tsx │ │ │ │ └── projects │ │ │ │ └── [slug] │ │ │ │ └── action.ts │ │ ├── manifest.ts │ │ └── not-found.tsx │ ├── types │ │ ├── attachment.ts │ │ ├── prompt.ts │ │ ├── export.ts │ │ ├── documents.ts │ │ ├── prompts.ts │ │ └── assistants.ts │ ├── vercel.json │ ├── public │ │ ├── icons │ │ │ ├── logo.png │ │ │ ├── deepseek-color.png │ │ │ ├── microsoft.svg │ │ │ ├── xai.svg │ │ │ ├── handdrawn_love.svg │ │ │ ├── wavy.svg │ │ │ ├── claude.svg │ │ │ ├── groq.svg │ │ │ ├── perplexity.svg │ │ │ └── meta.svg │ │ ├── images │ │ │ ├── resume1.png │ │ │ ├── resume2.png │ │ │ ├── resume3.png │ │ │ ├── resume4.png │ │ │ ├── vineeth.png │ │ │ ├── os-resume.png │ │ │ └── signature.png │ │ └── user-placeholder.svg │ ├── sentry.client.config.ts │ ├── services │ │ ├── premium │ │ │ └── index.ts │ │ ├── prompts │ │ │ └── index.ts │ │ ├── sessions │ │ │ └── index.ts │ │ ├── assistants │ │ │ └── index.ts │ │ └── preferences │ │ │ └── index.ts │ ├── modules │ │ └── tube │ │ │ ├── comments │ │ │ ├── ui │ │ │ │ ├── components │ │ │ │ │ ├── comment-list.tsx │ │ │ │ │ ├── plan-badge.tsx │ │ │ │ │ ├── load-more-comments-button.tsx │ │ │ │ │ ├── comment-date.tsx │ │ │ │ │ └── checkbox.tsx │ │ │ │ └── views │ │ │ │ │ └── comment-view.tsx │ │ │ └── types.ts │ │ │ ├── automation │ │ │ └── ui │ │ │ │ ├── components │ │ │ │ └── test-custom-comment-form.tsx │ │ │ │ └── views │ │ │ │ └── automation-view.tsx │ │ │ ├── videos │ │ │ ├── types.ts │ │ │ └── ui │ │ │ │ ├── components │ │ │ │ └── video-banner.tsx │ │ │ │ └── views │ │ │ │ └── video-view.tsx │ │ │ ├── home │ │ │ ├── categories │ │ │ │ └── server │ │ │ │ │ └── procedures.ts │ │ │ └── ui │ │ │ │ └── views │ │ │ │ └── tube-view.tsx │ │ │ ├── studio │ │ │ └── ui │ │ │ │ └── views │ │ │ │ ├── video-view.tsx │ │ │ │ └── studio-view.tsx │ │ │ └── search │ │ │ └── ui │ │ │ └── views │ │ │ └── search-view.tsx │ ├── instrumentation.ts │ ├── config │ │ ├── constants.ts │ │ ├── user-page.ts │ │ ├── prompts.ts │ │ └── index.ts │ ├── lib │ │ ├── mux.ts │ │ ├── validations │ │ │ ├── subscribe.ts │ │ │ ├── article.ts │ │ │ └── bookmark.ts │ │ ├── constants │ │ │ └── index.ts │ │ ├── editor │ │ │ └── react-renderer.tsx │ │ ├── uploadthing.ts │ │ ├── utils │ │ │ ├── hotjar.ts │ │ │ └── error.ts │ │ ├── sharp.ts │ │ ├── flags.ts │ │ └── ai │ │ │ └── tools │ │ │ └── get-weather.ts │ ├── context │ │ ├── index.ts │ │ └── react-query.tsx │ ├── .npmrc │ ├── artifacts │ │ └── actions.ts │ ├── actions │ │ ├── job │ │ │ └── schema.ts │ │ └── categories │ │ │ └── validation.ts │ ├── tools │ │ ├── index.ts │ │ └── get-weather.ts │ ├── hooks │ │ ├── use-modal.tsx │ │ ├── use-token-counter.tsx │ │ ├── index.ts │ │ ├── use-navigation.tsx │ │ ├── use-app-command.tsx │ │ ├── use-intersection-observer.ts │ │ ├── use-mobile.tsx │ │ ├── use-premium.tsx │ │ ├── use-copy-to-clipboard.tsx │ │ └── use-debounced-value.ts │ ├── components │ │ ├── client-only.tsx │ │ └── billing │ │ │ ├── check-and-redirect-for-upgrade.tsx │ │ │ └── premium-modal.tsx │ ├── helper │ │ ├── preset-prompt-values.ts │ │ └── tiptap-extensions.ts │ ├── tsconfig.json │ ├── store │ │ ├── sessions │ │ │ └── store.ts │ │ └── preferences │ │ │ └── store.ts │ ├── trpc │ │ ├── query-client.ts │ │ └── server.tsx │ ├── .gitignore │ └── middleware.ts ├── web │ ├── postcss.config.mjs │ ├── tailwind.config.ts │ ├── app │ │ ├── icon.png │ │ ├── apple-icon.png │ │ ├── opengraph-image.png │ │ ├── legal │ │ │ └── (documents) │ │ │ │ ├── privacy │ │ │ │ ├── content.tsx │ │ │ │ └── page.tsx │ │ │ │ ├── terms │ │ │ │ ├── content.tsx │ │ │ │ └── page.tsx │ │ │ │ ├── acceptable-use │ │ │ │ ├── content.tsx │ │ │ │ └── page.tsx │ │ │ │ └── layout.tsx │ │ ├── components │ │ │ ├── header │ │ │ │ └── logo.svg │ │ │ ├── feature-hero │ │ │ │ └── index.tsx │ │ │ ├── LegalPage.tsx │ │ │ └── footer │ │ │ │ └── footer-link.tsx │ │ ├── robots.ts │ │ ├── (home) │ │ │ └── components │ │ │ │ └── cta-button.tsx │ │ ├── styles │ │ │ └── web.css │ │ └── not-found.tsx │ ├── public │ │ └── home │ │ │ ├── hero.png │ │ │ ├── tube.webp │ │ │ ├── chathub.png │ │ │ └── watercolor-2.webp │ ├── vercel.json │ ├── .well-known │ │ └── vercel │ │ │ └── flags │ │ │ └── route.ts │ ├── instrumentation.ts │ ├── mdx-components.tsx │ ├── lib │ │ └── features.ts │ ├── tsconfig.json │ ├── .gitignore │ └── env.ts ├── storybook │ ├── tailwind.config.ts │ ├── public │ │ └── favicon.ico │ ├── next.config.ts │ ├── postcss.config.mjs │ ├── tsconfig.json │ ├── .storybook │ │ └── preview-head.html │ ├── .gitignore │ └── stories │ │ └── label.stories.tsx ├── api │ ├── app │ │ ├── icon.png │ │ ├── apple-icon.png │ │ ├── cron │ │ │ └── keep-alive │ │ │ │ └── route.ts │ │ ├── opengraph-image.png │ │ ├── health │ │ │ └── route.ts │ │ └── layout.tsx │ ├── sentry.client.config.ts │ ├── instrumentation.ts │ ├── vercel.json │ ├── next.config.ts │ ├── tsconfig.json │ └── .gitignore └── docs │ ├── api-reference │ └── endpoint │ │ ├── get.mdx │ │ ├── create.mdx │ │ └── delete.mdx │ ├── images │ └── checks-passed.png │ ├── package.json │ └── snippets │ └── snippet-intro.mdx ├── packages ├── cms │ ├── .env.example │ ├── typescript-config.json │ ├── components │ │ ├── feed.tsx │ │ ├── toolbar.tsx │ │ ├── body.tsx │ │ └── image.tsx │ ├── tsconfig.json │ ├── next-config.ts │ ├── keys.ts │ └── package.json ├── backend │ ├── .gitignore │ ├── migrations │ │ ├── 0016_mean_patriot.sql │ │ ├── 0008_powerful_warpath.sql │ │ ├── 0029_deep_the_executioner.sql │ │ ├── 0021_red_iron_man.sql │ │ ├── 0001_loving_sunset_bain.sql │ │ ├── 0009_nervous_giant_girl.sql │ │ ├── 0020_absurd_pretty_boy.sql │ │ ├── 0010_puzzling_tarantula.sql │ │ ├── 0012_flaky_micromacro.sql │ │ ├── 0011_brown_iron_fist.sql │ │ ├── 0015_light_jackpot.sql │ │ ├── 0022_massive_violations.sql │ │ ├── 0002_tense_darkstar.sql │ │ ├── 0006_eager_robbie_robertson.sql │ │ ├── 0007_slippery_jasper_sitwell.sql │ │ ├── 0014_next_marvel_boy.sql │ │ ├── 0027_jittery_purifiers.sql │ │ ├── 0005_mature_night_thrasher.sql │ │ ├── 0025_simple_cammi.sql │ │ └── 0026_slippery_secret_warriors.sql │ ├── auth │ │ ├── index.ts │ │ ├── session.ts │ │ ├── client.ts │ │ └── format.ts │ ├── tsconfig.json │ ├── drizzle.config.ts │ └── database.ts ├── ai │ ├── lib │ │ ├── react.ts │ │ └── provider.ts │ ├── index.ts │ ├── tsconfig.json │ └── components │ │ ├── thread.tsx │ │ └── message.tsx ├── storage │ ├── index.ts │ ├── client.ts │ ├── tsconfig.json │ ├── keys.ts │ └── package.json ├── design-system │ ├── lib │ │ ├── toast.ts │ │ ├── fonts.ts │ │ └── handle-error.ts │ ├── components │ │ ├── ui │ │ │ ├── flex-spacer.tsx │ │ │ ├── aspect-ratio.tsx │ │ │ ├── beta-tag.tsx │ │ │ ├── or-divider.tsx │ │ │ ├── coming-soon.tsx │ │ │ ├── skeleton.tsx │ │ │ ├── collapsible.tsx │ │ │ ├── placeholder-icon.tsx │ │ │ ├── full-page-loader.tsx │ │ │ ├── stagger-container.tsx │ │ │ ├── loading-dots.tsx │ │ │ ├── youtube-video.tsx │ │ │ ├── audio-wave.tsx │ │ │ └── bot-avatar.tsx │ │ ├── minime │ │ │ ├── client-only.tsx │ │ │ ├── badge.tsx │ │ │ └── input.tsx │ │ ├── prose.tsx │ │ ├── container.tsx │ │ ├── precomposed │ │ │ └── skeleton.tsx │ │ ├── loading.tsx │ │ ├── top-bar.tsx │ │ ├── logo.tsx │ │ └── toast.tsx │ ├── postcss.config.mjs │ ├── .npmrc │ ├── tsconfig.json │ ├── providers │ │ └── theme.tsx │ ├── components.json │ └── hooks │ │ └── use-mobile.tsx ├── tinybird │ ├── .gitignore │ ├── pipes │ │ ├── total_cost_pipe.pipe │ │ ├── cost_per_user_pipe.pipe │ │ ├── count_per_day_pipe.pipe │ │ ├── cost_per_model_pipe.pipe │ │ ├── count_per_hour_pipe.pipe │ │ ├── count_per_user_pipe.pipe │ │ ├── count_per_model_pipe.pipe │ │ ├── osav.pipe │ │ ├── get_youtube_comment_reply_latest_oldest_mv.pipe │ │ ├── get_youtube_comment_thread_latest_oldest_mv.pipe │ │ └── get_last_sync_metadata.pipe │ ├── tsconfig.json │ ├── src │ │ └── client.ts │ ├── datasources │ │ ├── youtube_comment_reply_latest_oldest.datasource │ │ ├── youtube_comment_thread_latest_oldest.datasource │ │ └── aiCall.datasource │ └── package.json ├── collaboration │ ├── hooks.ts │ ├── tsconfig.json │ ├── keys.ts │ └── package.json ├── analytics │ ├── google.ts │ ├── vercel.ts │ ├── tsconfig.json │ ├── posthog │ │ └── server.ts │ ├── index.tsx │ ├── keys.ts │ └── package.json ├── webhooks │ ├── index.ts │ ├── tsconfig.json │ ├── keys.ts │ └── package.json ├── feature-flags │ ├── index.ts │ ├── components │ │ └── toolbar.tsx │ ├── tsconfig.json │ ├── lib │ │ ├── toolbar.ts │ │ └── create-flag.ts │ ├── keys.ts │ ├── access.ts │ └── package.json ├── email │ ├── index.ts │ ├── tsconfig.json │ ├── keys.ts │ └── package.json ├── observability │ ├── log.ts │ ├── tsconfig.json │ ├── instrumentation.ts │ ├── package.json │ └── error.ts ├── tailwind-config │ ├── index.ts │ ├── tsconfig.json │ └── package.json ├── lib │ ├── postcss.config.js │ ├── tsconfig.json │ ├── src │ │ ├── fuse.ts │ │ ├── slugify.ts │ │ └── format.ts │ └── package.json ├── mux │ ├── tsconfig.json │ ├── keys.ts │ └── package.json ├── testing │ ├── tsconfig.json │ ├── package.json │ └── index.js ├── youtube │ ├── tsconfig.json │ └── package.json ├── payments │ ├── tsconfig.json │ ├── index.ts │ ├── keys.ts │ ├── ai.ts │ └── package.json ├── security │ ├── tsconfig.json │ ├── keys.ts │ ├── package.json │ └── middleware.ts ├── seo │ ├── tsconfig.json │ ├── json-ld.tsx │ └── package.json ├── typescript-config │ ├── react-library.json │ ├── package.json │ ├── nextjs.json │ └── base.json ├── jobs │ ├── index.ts │ ├── tsconfig.json │ └── trigger.config.ts ├── next-config │ ├── tsconfig.json │ └── package.json └── rate-limit │ ├── keys.ts │ └── package.json ├── .husky └── pre-commit ├── turbo └── generators │ ├── package.json │ └── templates │ ├── package.json.hbs │ └── tsconfig.json.hbs ├── pnpm-workspace.yaml ├── .github ├── FUNDING.yml ├── screenshots │ ├── oschathub.png │ ├── ostubehero.jpeg │ ├── oschathubhero.png │ ├── ostubethumbnail.webp │ └── oschathubthumbnail.png ├── dependabot.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── .vscode └── extensions.json ├── .npmrc ├── biome.json ├── turbo.json └── .gitignore /apps/email/.gitignore: -------------------------------------------------------------------------------- 1 | .react-email -------------------------------------------------------------------------------- /packages/cms/.env.example: -------------------------------------------------------------------------------- 1 | BASEHUB_TOKEN="" -------------------------------------------------------------------------------- /packages/cms/typescript-config.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | turbo run build -------------------------------------------------------------------------------- /packages/backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | -------------------------------------------------------------------------------- /packages/ai/lib/react.ts: -------------------------------------------------------------------------------- 1 | export * from 'ai/react'; 2 | -------------------------------------------------------------------------------- /packages/storage/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@vercel/blob'; 2 | -------------------------------------------------------------------------------- /packages/storage/client.ts: -------------------------------------------------------------------------------- 1 | export * from '@vercel/blob/client'; 2 | -------------------------------------------------------------------------------- /turbo/generators/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "commonjs" 3 | } 4 | -------------------------------------------------------------------------------- /apps/app/vitest.config.ts: -------------------------------------------------------------------------------- 1 | export { default } from '@repo/testing'; 2 | -------------------------------------------------------------------------------- /packages/design-system/lib/toast.ts: -------------------------------------------------------------------------------- 1 | export { toast } from 'sonner'; 2 | -------------------------------------------------------------------------------- /packages/tinybird/.gitignore: -------------------------------------------------------------------------------- 1 | # tinybird 2 | .tinyb 3 | .venv 4 | .env 5 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/*" 3 | - "packages/*" 4 | -------------------------------------------------------------------------------- /apps/app/liveblocks.config.ts: -------------------------------------------------------------------------------- 1 | export * from '@repo/collaboration/config'; 2 | -------------------------------------------------------------------------------- /packages/collaboration/hooks.ts: -------------------------------------------------------------------------------- 1 | export * from '@liveblocks/react/suspense'; 2 | -------------------------------------------------------------------------------- /packages/cms/components/feed.tsx: -------------------------------------------------------------------------------- 1 | export { Pump as Feed } from 'basehub/react-pump'; 2 | -------------------------------------------------------------------------------- /packages/cms/components/toolbar.tsx: -------------------------------------------------------------------------------- 1 | export { Toolbar } from 'basehub/next-toolbar'; 2 | -------------------------------------------------------------------------------- /apps/app/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@repo/design-system/postcss.config.mjs'; 2 | -------------------------------------------------------------------------------- /apps/app/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | export { config as default } from '@repo/tailwind-config/config'; 2 | -------------------------------------------------------------------------------- /apps/web/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@repo/design-system/postcss.config.mjs'; 2 | -------------------------------------------------------------------------------- /apps/web/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | export { config as default } from '@repo/tailwind-config/config'; 2 | -------------------------------------------------------------------------------- /packages/analytics/google.ts: -------------------------------------------------------------------------------- 1 | export { GoogleAnalytics } from '@next/third-parties/google'; 2 | -------------------------------------------------------------------------------- /packages/cms/components/body.tsx: -------------------------------------------------------------------------------- 1 | export { RichText as Body } from 'basehub/react-rich-text'; 2 | -------------------------------------------------------------------------------- /packages/cms/components/image.tsx: -------------------------------------------------------------------------------- 1 | export { BaseHubImage as Image } from 'basehub/next-image'; 2 | -------------------------------------------------------------------------------- /apps/storybook/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | export { config as default } from '@repo/tailwind-config/config'; 2 | -------------------------------------------------------------------------------- /packages/backend/migrations/0016_mean_patriot.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "public"."provider" ADD VALUE 'perplexity'; -------------------------------------------------------------------------------- /apps/api/app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/api/app/icon.png -------------------------------------------------------------------------------- /apps/app/app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/app/icon.png -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Get Plants' 3 | openapi: 'GET /plants' 4 | --- 5 | -------------------------------------------------------------------------------- /apps/web/app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/app/icon.png -------------------------------------------------------------------------------- /packages/analytics/vercel.ts: -------------------------------------------------------------------------------- 1 | export { Analytics as VercelAnalytics } from '@vercel/analytics/react'; 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: ['https://dub.sh/eqyg5Vn'] 4 | -------------------------------------------------------------------------------- /apps/app/types/attachment.ts: -------------------------------------------------------------------------------- 1 | export type TAttachment = { 2 | file?: File; 3 | base64?: string; 4 | }; 5 | -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/create.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Plant' 3 | openapi: 'POST /plants' 4 | --- 5 | -------------------------------------------------------------------------------- /packages/backend/migrations/0008_powerful_warpath.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_messages" ADD COLUMN "ai_responses" json; -------------------------------------------------------------------------------- /packages/backend/migrations/0029_deep_the_executioner.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "videos" ADD COLUMN "thumbnail_url" text; -------------------------------------------------------------------------------- /apps/app/app/(organization)/minime/analytics/index.tsx: -------------------------------------------------------------------------------- 1 | export type IndexProps = 'visitors' | 'views' | 'clicks'; 2 | -------------------------------------------------------------------------------- /packages/backend/migrations/0021_red_iron_man.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "public"."integration_state_platform" ADD VALUE 'TWITTER'; -------------------------------------------------------------------------------- /apps/api/app/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/api/app/apple-icon.png -------------------------------------------------------------------------------- /apps/app/app/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/app/apple-icon.png -------------------------------------------------------------------------------- /apps/app/types/prompt.ts: -------------------------------------------------------------------------------- 1 | export type TPrompt = { 2 | id: string; 3 | name: string; 4 | content: string; 5 | }; 6 | -------------------------------------------------------------------------------- /apps/app/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "deploymentEnabled": { 4 | "main": true 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/delete.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Plant' 3 | openapi: 'DELETE /plants/{id}' 4 | --- 5 | -------------------------------------------------------------------------------- /apps/web/app/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/app/apple-icon.png -------------------------------------------------------------------------------- /apps/web/public/home/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/public/home/hero.png -------------------------------------------------------------------------------- /packages/tinybird/pipes/total_cost_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE total_cost 2 | SQL > 3 | SELECT sum(cost) AS total_cost FROM aiCall -------------------------------------------------------------------------------- /apps/api/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import { initializeSentry } from '@repo/observability/client'; 2 | 3 | initializeSentry(); 4 | -------------------------------------------------------------------------------- /apps/app/public/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/icons/logo.png -------------------------------------------------------------------------------- /apps/app/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import { initializeSentry } from '@repo/observability/client'; 2 | 3 | initializeSentry(); 4 | -------------------------------------------------------------------------------- /apps/web/public/home/tube.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/public/home/tube.webp -------------------------------------------------------------------------------- /packages/backend/migrations/0001_loving_sunset_bain.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_sessions" ALTER COLUMN "user_id" SET DATA TYPE uuid; -------------------------------------------------------------------------------- /packages/backend/migrations/0009_nervous_giant_girl.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "preferences" ADD COLUMN "default_assistants" json NOT NULL; -------------------------------------------------------------------------------- /packages/backend/migrations/0020_absurd_pretty_boy.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "public"."integration_state_platform" ADD VALUE 'LINKEDIN'; -------------------------------------------------------------------------------- /.github/screenshots/oschathub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/.github/screenshots/oschathub.png -------------------------------------------------------------------------------- /apps/api/app/cron/keep-alive/route.ts: -------------------------------------------------------------------------------- 1 | export const POST = async () => { 2 | return new Response('OK', { status: 200 }); 3 | }; 4 | -------------------------------------------------------------------------------- /apps/api/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/api/app/opengraph-image.png -------------------------------------------------------------------------------- /apps/app/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/app/opengraph-image.png -------------------------------------------------------------------------------- /apps/app/public/images/resume1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/resume1.png -------------------------------------------------------------------------------- /apps/app/public/images/resume2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/resume2.png -------------------------------------------------------------------------------- /apps/app/public/images/resume3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/resume3.png -------------------------------------------------------------------------------- /apps/app/public/images/resume4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/resume4.png -------------------------------------------------------------------------------- /apps/app/public/images/vineeth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/vineeth.png -------------------------------------------------------------------------------- /apps/app/services/premium/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/services/premium/client'; 2 | export * from '@/services/premium/queries'; 3 | -------------------------------------------------------------------------------- /apps/app/services/prompts/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/services/prompts/client'; 2 | export * from '@/services/prompts/queries'; 3 | -------------------------------------------------------------------------------- /apps/app/services/sessions/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/services/sessions/client'; 2 | export * from '@/services/sessions/queries'; 3 | -------------------------------------------------------------------------------- /apps/docs/images/checks-passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/docs/images/checks-passed.png -------------------------------------------------------------------------------- /apps/storybook/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/storybook/public/favicon.ico -------------------------------------------------------------------------------- /apps/web/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/app/opengraph-image.png -------------------------------------------------------------------------------- /apps/web/public/home/chathub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/public/home/chathub.png -------------------------------------------------------------------------------- /packages/backend/migrations/0010_puzzling_tarantula.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "preferences" ALTER COLUMN "default_assistants" DROP NOT NULL; -------------------------------------------------------------------------------- /packages/design-system/components/ui/flex-spacer.tsx: -------------------------------------------------------------------------------- 1 | export const FlexSpacer = () => { 2 | return
; 3 | }; -------------------------------------------------------------------------------- /.github/screenshots/ostubehero.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/.github/screenshots/ostubehero.jpeg -------------------------------------------------------------------------------- /apps/app/public/images/os-resume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/os-resume.png -------------------------------------------------------------------------------- /apps/app/public/images/signature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/images/signature.png -------------------------------------------------------------------------------- /apps/app/services/assistants/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/services/assistants/queries'; 2 | export * from '@/services/assistants/client'; 3 | -------------------------------------------------------------------------------- /apps/web/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "crons": [], 3 | "git": { 4 | "deploymentEnabled": { 5 | "main": true 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.github/screenshots/oschathubhero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/.github/screenshots/oschathubhero.png -------------------------------------------------------------------------------- /apps/app/app/.well-known/vercel/flags/route.ts: -------------------------------------------------------------------------------- 1 | import { getFlags } from '@repo/feature-flags/access'; 2 | 3 | export const GET = getFlags; 4 | -------------------------------------------------------------------------------- /apps/app/services/preferences/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/services/preferences/client'; 2 | export * from '@/services/preferences/queries'; 3 | -------------------------------------------------------------------------------- /apps/web/.well-known/vercel/flags/route.ts: -------------------------------------------------------------------------------- 1 | import { getFlags } from '@repo/feature-flags/access'; 2 | 3 | export const GET = getFlags; 4 | -------------------------------------------------------------------------------- /apps/web/public/home/watercolor-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/web/public/home/watercolor-2.webp -------------------------------------------------------------------------------- /packages/backend/migrations/0012_flaky_micromacro.sql: -------------------------------------------------------------------------------- 1 | CREATE TYPE "public"."premium_tier" AS ENUM('PRO_MONTHLY', 'PRO_ANNUALLY', 'LIFETIME'); -------------------------------------------------------------------------------- /.github/screenshots/ostubethumbnail.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/.github/screenshots/ostubethumbnail.webp -------------------------------------------------------------------------------- /apps/api/app/health/route.ts: -------------------------------------------------------------------------------- 1 | export const runtime = 'edge'; 2 | 3 | export const GET = (): Response => new Response('OK', { status: 200 }); 4 | -------------------------------------------------------------------------------- /apps/app/modules/tube/comments/ui/components/comment-list.tsx: -------------------------------------------------------------------------------- 1 | export const CommentList = () => { 2 | return
CommentList
; 3 | }; 4 | -------------------------------------------------------------------------------- /apps/app/public/icons/deepseek-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/apps/app/public/icons/deepseek-color.png -------------------------------------------------------------------------------- /packages/backend/migrations/0011_brown_iron_fist.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "preferences" ALTER COLUMN "default_assistants" SET DEFAULT '["chathub"]'::json; -------------------------------------------------------------------------------- /.github/screenshots/oschathubthumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuluruvineeth/openstudio-beta/HEAD/.github/screenshots/oschathubthumbnail.png -------------------------------------------------------------------------------- /packages/webhooks/index.ts: -------------------------------------------------------------------------------- 1 | import { getAppPortal, send } from './lib/svix'; 2 | 3 | export const webhooks = { 4 | send, 5 | getAppPortal, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/api/instrumentation.ts: -------------------------------------------------------------------------------- 1 | import { initializeSentry } from '@repo/observability/instrumentation'; 2 | 3 | export const register = initializeSentry(); 4 | -------------------------------------------------------------------------------- /apps/app/instrumentation.ts: -------------------------------------------------------------------------------- 1 | import { initializeSentry } from '@repo/observability/instrumentation'; 2 | 3 | export const register = initializeSentry(); 4 | -------------------------------------------------------------------------------- /apps/web/instrumentation.ts: -------------------------------------------------------------------------------- 1 | import { initializeSentry } from '@repo/observability/instrumentation'; 2 | 3 | export const register = initializeSentry(); 4 | -------------------------------------------------------------------------------- /packages/feature-flags/index.ts: -------------------------------------------------------------------------------- 1 | import { createFlag } from './lib/create-flag'; 2 | 3 | export const showBetaFeature = createFlag('showBetaFeature'); 4 | -------------------------------------------------------------------------------- /packages/email/index.ts: -------------------------------------------------------------------------------- 1 | import { Resend } from 'resend'; 2 | import { keys } from './keys'; 3 | 4 | export const resend = new Resend(keys().RESEND_TOKEN); 5 | -------------------------------------------------------------------------------- /apps/email/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "include": ["**/*.ts", "**/*.tsx"], 4 | "exclude": ["node_modules"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/observability/log.ts: -------------------------------------------------------------------------------- 1 | import { log as logtail } from '@logtail/next'; 2 | 3 | export const log = process.env.NODE_ENV === 'production' ? logtail : console; 4 | -------------------------------------------------------------------------------- /packages/backend/migrations/0015_light_jackpot.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "public"."provider" ADD VALUE 'meta';--> statement-breakpoint 2 | ALTER TYPE "public"."provider" ADD VALUE 'xai'; -------------------------------------------------------------------------------- /apps/app/types/export.ts: -------------------------------------------------------------------------------- 1 | import type { dataValidator } from '@/helper/validator'; 2 | import type { z } from 'zod'; 3 | export type ExportData = z.infer; 4 | -------------------------------------------------------------------------------- /apps/app/config/constants.ts: -------------------------------------------------------------------------------- 1 | export const constants = { 2 | avatarColors: ['#063940', '#195e63', '#3e838c', '#8ebdb6', '#ece1c3'], 3 | }; 4 | 5 | export const DEFAULT_LIMIT = 10; 6 | -------------------------------------------------------------------------------- /apps/storybook/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from 'next'; 2 | 3 | const nextConfig: NextConfig = { 4 | reactStrictMode: true, 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /packages/tailwind-config/index.ts: -------------------------------------------------------------------------------- 1 | import resolveConfig from 'tailwindcss/resolveConfig'; 2 | import { config } from './config'; 3 | 4 | export const tailwind = resolveConfig(config); 5 | -------------------------------------------------------------------------------- /packages/tinybird/pipes/cost_per_user_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE cost_per_user_node 2 | SQL > 3 | SELECT userId, sum(cost) AS cost FROM aiCall 4 | GROUP BY userId 5 | ORDER BY cost DESC -------------------------------------------------------------------------------- /apps/app/lib/mux.ts: -------------------------------------------------------------------------------- 1 | import Mux from '@mux/mux-node'; 2 | 3 | export const mux = new Mux({ 4 | tokenId: process.env.MUX_TOKEN_ID, 5 | tokenSecret: process.env.MUX_TOKEN_SECRET, 6 | }); 7 | -------------------------------------------------------------------------------- /apps/app/lib/validations/subscribe.ts: -------------------------------------------------------------------------------- 1 | import * as z from 'zod'; 2 | 3 | export const subscribeSchema = z.object({ 4 | name: z.string().min(1).max(48), 5 | email: z.string().email(), 6 | }); 7 | -------------------------------------------------------------------------------- /packages/backend/migrations/0022_massive_violations.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_messages" DROP COLUMN "ai_responses";--> statement-breakpoint 2 | ALTER TABLE "preferences" DROP COLUMN "default_assistants"; -------------------------------------------------------------------------------- /apps/storybook/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /packages/backend/auth/index.ts: -------------------------------------------------------------------------------- 1 | export type { User } from '@supabase/supabase-js'; 2 | 3 | export enum OpenStudioRole { 4 | Admin = 'admin', 5 | Editor = 'editor', 6 | Member = 'member', 7 | } 8 | -------------------------------------------------------------------------------- /packages/lib/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | 'postcss-import': {}, 4 | 'tailwindcss/nesting': {}, 5 | tailwindcss: {}, 6 | autoprefixer: {}, 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /packages/backend/migrations/0002_tense_darkstar.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" SET DATA TYPE text;--> statement-breakpoint 2 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" DROP DEFAULT; -------------------------------------------------------------------------------- /apps/app/lib/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const StorageFolders = [ 2 | 'avatars', 3 | 'og-images', 4 | 'editor-uploads', 5 | ] as const; 6 | 7 | export const THUMBNAIL_FALLBACK = '/icons/placeholder.svg'; 8 | -------------------------------------------------------------------------------- /packages/backend/migrations/0006_eager_robbie_robertson.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" SET DATA TYPE text;--> statement-breakpoint 2 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" DROP DEFAULT; -------------------------------------------------------------------------------- /packages/backend/migrations/0007_slippery_jasper_sitwell.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_messages" ALTER COLUMN "id" SET DATA TYPE text;--> statement-breakpoint 2 | ALTER TABLE "chat_messages" ALTER COLUMN "id" DROP DEFAULT; -------------------------------------------------------------------------------- /apps/web/mdx-components.tsx: -------------------------------------------------------------------------------- 1 | import type { MDXComponents } from 'mdx/types'; 2 | 3 | export function useMDXComponents(components: MDXComponents): MDXComponents { 4 | return { 5 | ...components, 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/backend/auth/session.ts: -------------------------------------------------------------------------------- 1 | import { createClient } from './server'; 2 | 3 | export async function getSession() { 4 | const client = await createClient(); 5 | 6 | return client.auth.getSession(); 7 | } 8 | -------------------------------------------------------------------------------- /packages/tinybird/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["src"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/minime/page.tsx: -------------------------------------------------------------------------------- 1 | export const dynamic = 'force-dynamic'; 2 | 3 | export default function MinimePage() { 4 | return
Minime - WIP (a lot of bugs and unfinished features)
; 5 | } 6 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/tube/studio/[videoId]/edit/page.tsx: -------------------------------------------------------------------------------- 1 | import Editor from '@/modules/tube/studio/ui/components/editor/editor'; 2 | 3 | export default function EditVideoPage() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /packages/ai/index.ts: -------------------------------------------------------------------------------- 1 | export * from 'ai'; 2 | export * from 'ai/rsc'; 3 | export * from '@ai-sdk/openai'; 4 | export * from '@ai-sdk/google'; 5 | export * from '@ai-sdk/anthropic'; 6 | export * from '@ai-sdk/fireworks'; 7 | -------------------------------------------------------------------------------- /packages/backend/migrations/0014_next_marvel_boy.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "premium" ALTER COLUMN "userId" SET DATA TYPE varchar;--> statement-breakpoint 2 | ALTER TABLE "premium" ALTER COLUMN "organizationId" SET DATA TYPE varchar; -------------------------------------------------------------------------------- /apps/app/context/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/context/chat'; 2 | export * from '@/context/preferences'; 3 | export * from '@/context/prompts'; 4 | export * from '@/context/react-query'; 5 | export * from '@/context/sessions'; 6 | -------------------------------------------------------------------------------- /packages/ai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/feature-flags/components/toolbar.tsx: -------------------------------------------------------------------------------- 1 | import { VercelToolbar } from '@vercel/toolbar/next'; 2 | import { keys } from '../keys'; 3 | 4 | export const Toolbar = () => (keys().FLAGS_SECRET ? : null); 5 | -------------------------------------------------------------------------------- /packages/tinybird/pipes/count_per_day_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE count_per_day_node 2 | SQL > 3 | SELECT toStartOfDay(fromUnixTimestamp64Milli(timestamp)) AS "day", count(*) AS count FROM aiCall 4 | GROUP BY day 5 | ORDER BY day -------------------------------------------------------------------------------- /packages/cms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/email/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["./*.ts", "./*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/lib/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/mux/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/storage/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["./src/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/youtube/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/analytics/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 4 | 5 | const AspectRatio = AspectRatioPrimitive.Root 6 | 7 | export { AspectRatio } 8 | -------------------------------------------------------------------------------- /packages/payments/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/security/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/seo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/tinybird/pipes/cost_per_model_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE cost_per_model_node 2 | SQL > 3 | SELECT model, sum(cost) AS cost FROM aiCall 4 | GROUP BY model 5 | ORDER BY cost DESC 6 | 7 | /* 8 | i want to get the cost per model -------------------------------------------------------------------------------- /packages/tinybird/pipes/count_per_hour_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE count_per_hour_node 2 | SQL > 3 | SELECT toStartOfHour(fromUnixTimestamp64Milli(timestamp)) AS "hour", count(*) AS count FROM aiCall 4 | GROUP BY hour 5 | ORDER BY hour -------------------------------------------------------------------------------- /packages/webhooks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/collaboration/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/feature-flags/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/observability/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/typescript-config/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | autoprefixer: {}, 6 | }, 7 | }; 8 | 9 | export default config; 10 | -------------------------------------------------------------------------------- /packages/jobs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tasks/videos/generate-description'; 2 | export * from './tasks/videos/generate-title'; 3 | export * from './tasks/videos/generate-chapters'; 4 | export * from './tasks/videos/generate-video-metadata'; 5 | -------------------------------------------------------------------------------- /packages/lib/src/fuse.ts: -------------------------------------------------------------------------------- 1 | import Fuse from 'fuse.js'; 2 | 3 | export const createFuse = (data: readonly T[], keys: string[]): Fuse => 4 | new Fuse(data, { 5 | keys, 6 | minMatchCharLength: 1, 7 | threshold: 0.3, 8 | }); 9 | -------------------------------------------------------------------------------- /packages/next-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/tailwind-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["**/*.ts", "**/*.tsx"], 7 | "exclude": ["node_modules"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/api/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "crons": [ 3 | { 4 | "path": "/cron/keep-alive", 5 | "schedule": "0 1 * * *" 6 | } 7 | ], 8 | "git": { 9 | "deploymentEnabled": { 10 | "main": true 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/settings/data/page.tsx: -------------------------------------------------------------------------------- 1 | import DataClientWrapper from './data-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function DataPage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/assistants/page.tsx: -------------------------------------------------------------------------------- 1 | import AssistantClientWrapper from './client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function AssistantPage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/settings/voice/page.tsx: -------------------------------------------------------------------------------- 1 | import VoiceClientWrapper from './voice-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function VoicePage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/components/codeblock.module.css: -------------------------------------------------------------------------------- 1 | @import "highlight.js/styles/github-dark.css"; 2 | 3 | .hljs-wrapper { 4 | @apply rounded-lg border bg-zinc-950; 5 | } 6 | 7 | .hljs-pre { 8 | @apply overflow-x-auto p-4; 9 | } 10 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/settings/common/page.tsx: -------------------------------------------------------------------------------- 1 | import CommonClientWrapper from './common-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function CommonPage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/settings/memory/page.tsx: -------------------------------------------------------------------------------- 1 | import MemoryClientWrapper from './memory-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function MemoryPage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/modules/tube/automation/ui/components/test-custom-comment-form.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useState } from 'react'; 4 | 5 | export const TestCustomCommentForm = () => { 6 | const [testResult, setTestResult] = useState(''); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/settings/plugins/page.tsx: -------------------------------------------------------------------------------- 1 | import PluginsClientWrapper from './plugin-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | export default function PluginsPage() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/tube/test.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { trpc } from '@/trpc/client'; 4 | 5 | export default function Test() { 6 | const [data] = trpc.categories.getMany.useSuspenseQuery(); 7 | return
{JSON.stringify(data)}
; 8 | } 9 | -------------------------------------------------------------------------------- /apps/app/modules/tube/comments/types.ts: -------------------------------------------------------------------------------- 1 | import type { inferRouterOutputs } from '@trpc/server'; 2 | 3 | import type { AppRouter } from '@/trpc/routers/_app'; 4 | 5 | export type CommentsGetManyOutput = 6 | inferRouterOutputs['comments']['getMany']; 7 | -------------------------------------------------------------------------------- /apps/app/public/icons/microsoft.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/app/types/documents.ts: -------------------------------------------------------------------------------- 1 | export type TDocument = { 2 | id: string; 3 | content: File | string; 4 | isIndexing: boolean; 5 | isFailed: boolean; 6 | isIndexed: boolean; 7 | meta: any; 8 | createdAt: Date; 9 | updatedAt: Date; 10 | }; 11 | -------------------------------------------------------------------------------- /apps/docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "private": true, 4 | "scripts": { 5 | "dev": "mintlify dev --port 3004", 6 | "lint": "mintlify broken-links" 7 | }, 8 | "devDependencies": { 9 | "typescript": "^5.7.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/feature-flags/lib/toolbar.ts: -------------------------------------------------------------------------------- 1 | import { withVercelToolbar } from '@vercel/toolbar/plugins/next'; 2 | import { keys } from '../keys'; 3 | 4 | export const withToolbar = (config: object) => 5 | keys().FLAGS_SECRET ? withVercelToolbar()(config) : config; 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "biomejs.biome", 4 | "bradlc.vscode-tailwindcss", 5 | "Prisma.prisma", 6 | "unifiedjs.vscode-mdx", 7 | "mikestead.dotenv", 8 | "christian-kohler.npm-intellisense" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/page.tsx: -------------------------------------------------------------------------------- 1 | import ChatClientWrapper from './chat-client-wrapper'; 2 | 3 | export const dynamic = 'force-dynamic'; 4 | 5 | const ChatSessionPage = () => { 6 | return ; 7 | }; 8 | export default ChatSessionPage; 9 | -------------------------------------------------------------------------------- /apps/app/types/prompts.ts: -------------------------------------------------------------------------------- 1 | export type TConstructPrompt = { 2 | context?: string; 3 | image?: string; 4 | memories: string[]; 5 | hasMessages: boolean; 6 | systemPrompt: string; 7 | formatInstructions?: boolean; 8 | userPrompt?: string; 9 | }; 10 | -------------------------------------------------------------------------------- /packages/cms/next-config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from 'next'; 2 | 3 | // This file is a stub for modifying the Next.js configuration. 4 | // It's handy for supplementing the default CMS configuration. 5 | export const withCMS = (config: NextConfig) => config; 6 | -------------------------------------------------------------------------------- /packages/tinybird/pipes/count_per_user_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE count_per_user_node 2 | SQL > 3 | % 4 | SELECT count(*) AS count FROM aiCall 5 | WHERE "userEmail" = {{String(userEmail)}} 6 | AND toStartOfMonth(fromUnixTimestamp64Milli(timestamp)) = toStartOfMonth(now()) -------------------------------------------------------------------------------- /apps/app/modules/tube/comments/ui/components/plan-badge.tsx: -------------------------------------------------------------------------------- 1 | export const PlanBadge = () => { 2 | return ( 3 |
4 | Plan 5 |
6 | ); 7 | }; 8 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/beta-tag.tsx: -------------------------------------------------------------------------------- 1 | export const BetaTag = () => { 2 | return ( 3 |
4 | Beta 5 |
6 | ); 7 | }; -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/components/welcome-message/custom-assistant-copy.tsx: -------------------------------------------------------------------------------- 1 | export const CustomAssistantCopy = () => { 2 | return ( 3 | <> 4 | Design your perfect AI companion with tailored expertise and personalized 5 | knowledge. 6 | 7 | ); 8 | }; 9 | -------------------------------------------------------------------------------- /packages/feature-flags/lib/create-flag.ts: -------------------------------------------------------------------------------- 1 | import { unstable_flag as flag } from '@vercel/flags/next'; 2 | 3 | export const createFlag = (key: string) => 4 | flag({ 5 | key, 6 | defaultValue: false, 7 | async decide() { 8 | return true; 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/or-divider.tsx: -------------------------------------------------------------------------------- 1 | export const OrDivider = () => ( 2 |
3 |
4 |

OR

5 |
6 |
7 | ); 8 | -------------------------------------------------------------------------------- /apps/app/app/api/prompts/route.ts: -------------------------------------------------------------------------------- 1 | // import { prompts } from '@/helper/prompts'; 2 | import { type NextRequest, NextResponse } from 'next/server'; 3 | 4 | export async function GET(req: NextRequest) { 5 | //TODO: Get prompts from the database 6 | return NextResponse.json({ prompts: [] }); 7 | } 8 | -------------------------------------------------------------------------------- /turbo/generators/templates/package.json.hbs: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/{{ name }}", 3 | "private": true, 4 | "version": "0.0.0", 5 | "scripts": { 6 | "clean": "git clean -xdf .cache .turbo dist node_modules", 7 | "typecheck": "tsc --noEmit --emitDeclarationOnly false" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | @hugeicons-pro:registry=https://npm.hugeicons.com/ 2 | //npm.hugeicons.com/:_authToken=81385302-85F6A0C5-EC7F15D1-C4FFF15A 3 | @tiptap-pro:registry=https://registry.tiptap.dev/ 4 | //registry.tiptap.dev/:_authToken=tPmWWOUOKVEUCUbCo8htHUPwKoq4+4xBXKghPxBzEVfhBsQuKlTgpAtkLnCTB4oAdTM5i/FNW1JNzsmTjKJEAg== -------------------------------------------------------------------------------- /packages/typescript-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/typescript-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "clean": "git clean -xdf .cache .turbo dist node_modules", 7 | "typecheck": "tsc --noEmit --emitDeclarationOnly false" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/app/.npmrc: -------------------------------------------------------------------------------- 1 | @hugeicons-pro:registry=https://npm.hugeicons.com/ 2 | //npm.hugeicons.com/:_authToken=81385302-85F6A0C5-EC7F15D1-C4FFF15A 3 | @tiptap-pro:registry=https://registry.tiptap.dev/ 4 | //registry.tiptap.dev/:_authToken=tPmWWOUOKVEUCUbCo8htHUPwKoq4+4xBXKghPxBzEVfhBsQuKlTgpAtkLnCTB4oAdTM5i/FNW1JNzsmTjKJEAg== -------------------------------------------------------------------------------- /apps/app/artifacts/actions.ts: -------------------------------------------------------------------------------- 1 | 'use server'; 2 | 3 | import { getSuggestionsByDocumentId } from '@/lib/queries'; 4 | 5 | export async function getSuggestions({ documentId }: { documentId: string }) { 6 | const suggestions = await getSuggestionsByDocumentId({ documentId }); 7 | return suggestions ?? []; 8 | } 9 | -------------------------------------------------------------------------------- /apps/storybook/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": [ 7 | "next-env.d.ts", 8 | "next.config.ts", 9 | "**/*.ts", 10 | "**/*.tsx", 11 | ".next/types/**/*.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/backend/migrations/0027_jittery_purifiers.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "videos" ADD COLUMN "category_id" uuid;--> statement-breakpoint 2 | ALTER TABLE "videos" ADD CONSTRAINT "videos_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."categories"("id") ON DELETE set null ON UPDATE no action; -------------------------------------------------------------------------------- /apps/app/actions/job/schema.ts: -------------------------------------------------------------------------------- 1 | export interface JobListingParams { 2 | page: number; 3 | pageSize: number; 4 | filters?: { 5 | workLocation?: 'remote' | 'in_person' | 'hybrid'; 6 | employmentType?: 'full_time' | 'part_time' | 'co_op' | 'internship'; 7 | keywords?: string[]; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/backend/auth/client.ts: -------------------------------------------------------------------------------- 1 | import { createBrowserClient } from '@supabase/ssr'; 2 | import { keys } from '../keys'; 3 | 4 | const env = keys(); 5 | 6 | export const createClient = () => 7 | createBrowserClient( 8 | env.NEXT_PUBLIC_SUPABASE_URL, 9 | env.NEXT_PUBLIC_SUPABASE_ANON_KEY 10 | ); 11 | -------------------------------------------------------------------------------- /packages/backend/migrations/0005_mature_night_thrasher.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" SET DATA TYPE uuid;--> statement-breakpoint 2 | ALTER TABLE "chat_sessions" ALTER COLUMN "id" SET DEFAULT gen_random_uuid();--> statement-breakpoint 3 | ALTER TABLE "chat_sessions" ADD COLUMN "custom_assistant" json; -------------------------------------------------------------------------------- /apps/app/actions/categories/validation.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const createCategoryBody = z.object({ 4 | id: z.string().uuid().nullish(), 5 | name: z.string().max(30), 6 | description: z.string().max(300).nullish(), 7 | }); 8 | export type CreateCategoryBody = z.infer; 9 | -------------------------------------------------------------------------------- /apps/app/tools/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/tools/reader'; 2 | export * from '@/tools/memory'; 3 | export * from '@/tools/dalle'; 4 | export * from '@/tools/google'; 5 | export * from '@/tools/duckduckgo'; 6 | export * from '@/tools/pie-chart'; 7 | export * from '@/tools/bar-chart'; 8 | export * from '@/tools/line-chart'; 9 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/voice/layout.tsx: -------------------------------------------------------------------------------- 1 | import { WorkInProgress } from '@repo/design-system/components/ui/work-in-progress'; 2 | 3 | //TODO: Remove this one once feature is completed 4 | export default function VoiceLayout({ 5 | children, 6 | }: { children: React.ReactNode }) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/.npmrc: -------------------------------------------------------------------------------- 1 | @hugeicons-pro:registry=https://npm.hugeicons.com/ 2 | //npm.hugeicons.com/:_authToken=81385302-85F6A0C5-EC7F15D1-C4FFF15A 3 | @tiptap-pro:registry=https://registry.tiptap.dev/ 4 | //registry.tiptap.dev/:_authToken=tPmWWOUOKVEUCUbCo8htHUPwKoq4+4xBXKghPxBzEVfhBsQuKlTgpAtkLnCTB4oAdTM5i/FNW1JNzsmTjKJEAg== -------------------------------------------------------------------------------- /apps/app/app/(organization)/test/Test.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { trpc } from '@/trpc/client'; 4 | 5 | export default function Test() { 6 | const videos = trpc.youtube.getVideos.useQuery(); 7 | 8 | return ( 9 |
10 |
{JSON.stringify(videos, null, 2)}
11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/docs/snippets/snippet-intro.mdx: -------------------------------------------------------------------------------- 1 | One of the core principles of software development is DRY (Don't Repeat 2 | Yourself). This is a principle that apply to documentation as 3 | well. If you find yourself repeating the same content in multiple places, you 4 | should consider creating a custom snippet to keep your content in sync. 5 | -------------------------------------------------------------------------------- /packages/tinybird/src/client.ts: -------------------------------------------------------------------------------- 1 | import { Tinybird } from '@chronark/zod-bird'; 2 | 3 | if (!process.env.TINYBIRD_API_KEY) { 4 | throw new Error('TINYBIRD_API_KEY is not set'); 5 | } 6 | 7 | export const tb = new Tinybird({ 8 | token: process.env.TINYBIRD_API_KEY, 9 | baseUrl: process.env.TINYBIRD_API_URL, 10 | }); 11 | -------------------------------------------------------------------------------- /packages/design-system/lib/fonts.ts: -------------------------------------------------------------------------------- 1 | import { cn } from '@repo/design-system/lib/utils'; 2 | import { GeistMono } from 'geist/font/mono'; 3 | import { GeistSans } from 'geist/font/sans'; 4 | 5 | export const fonts = cn( 6 | GeistSans.variable, 7 | GeistMono.variable, 8 | 'touch-manipulation font-sans antialiased' 9 | ); 10 | -------------------------------------------------------------------------------- /apps/api/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | 3 | type RootLayoutProperties = { 4 | readonly children: ReactNode; 5 | }; 6 | 7 | const RootLayout = ({ children }: RootLayoutProperties) => ( 8 | 9 | {children} 10 | 11 | ); 12 | 13 | export default RootLayout; 14 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/test/page.tsx: -------------------------------------------------------------------------------- 1 | import { trpc } from '@/trpc/server'; 2 | import Test from './Test'; 3 | 4 | export const dynamic = 'force-dynamic'; 5 | 6 | export default async function TestPage() { 7 | void trpc.youtube.getVideos.prefetch(); 8 | return ( 9 |
10 | 11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/privacy/content.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { LegalPage } from '@/app/components/LegalPage'; 4 | import Content from './content.mdx'; 5 | 6 | export default function PrivacyContent() { 7 | return ( 8 | } /> 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/feature-flags/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | FLAGS_SECRET: z.string().min(1).optional(), 8 | }, 9 | runtimeEnv: { 10 | FLAGS_SECRET: process.env.FLAGS_SECRET, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/email/emails/contact.tsx: -------------------------------------------------------------------------------- 1 | import { ContactTemplate } from '@repo/email/templates/contact'; 2 | 3 | const ExampleContactEmail = () => ( 4 | 9 | ); 10 | 11 | export default ExampleContactEmail; 12 | -------------------------------------------------------------------------------- /packages/cms/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | BASEHUB_TOKEN: z.string().min(1).startsWith('bshb_pk_'), 8 | }, 9 | runtimeEnv: { 10 | BASEHUB_TOKEN: process.env.BASEHUB_TOKEN, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/design-system/lib/handle-error.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | //TODO: add this later 3 | // import { parseError } from '@repo/lib/parse-error'; 4 | import { toast } from './toast'; 5 | 6 | export const handleError = (error: unknown): void => { 7 | // const message = parseError(error); 8 | 9 | toast.error('An error occurred'); 10 | }; 11 | -------------------------------------------------------------------------------- /packages/design-system/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "paths": { 6 | "@repo/*": ["../*"], 7 | "@repo/design-system/*": ["./*"] 8 | } 9 | }, 10 | "include": ["**/*.ts", "**/*.tsx"], 11 | "exclude": ["node_modules"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/security/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | ARCJET_KEY: z.string().min(1).startsWith('ajkey_').optional(), 8 | }, 9 | runtimeEnv: { 10 | ARCJET_KEY: process.env.ARCJET_KEY, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/web/app/components/header/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/jobs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "declaration": false, 6 | "declarationMap": false, 7 | "emitDeclarationOnly": false, 8 | "noEmit": true 9 | }, 10 | "include": ["**/*.ts", "**/*.tsx"], 11 | "exclude": ["node_modules"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/tinybird/pipes/count_per_model_pipe.pipe: -------------------------------------------------------------------------------- 1 | NODE count_per_model_node 2 | SQL > 3 | % 4 | SELECT model, count(*) AS count FROM aiCall 5 | WHERE "userEmail" = {{String(userEmail)}} AND "model" = {{String(model)}} 6 | AND toStartOfMonth(fromUnixTimestamp64Milli(timestamp)) = toStartOfMonth(now()) 7 | GROUP BY model 8 | ORDER BY count DESC -------------------------------------------------------------------------------- /turbo/generators/templates/tsconfig.json.hbs: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "paths": { 6 | "@/*": ["./*"], 7 | "@repo/*": ["../../packages/*"] 8 | } 9 | }, 10 | "include": ["**/*.ts", "**/*.tsx"], 11 | "exclude": ["node_modules"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/app/app/api/uploadthing/route.ts: -------------------------------------------------------------------------------- 1 | import { createRouteHandler } from 'uploadthing/next'; 2 | 3 | import { ourFileRouter } from './core'; 4 | 5 | // Export routes for Next App Router 6 | export const { GET, POST } = createRouteHandler({ 7 | router: ourFileRouter, 8 | 9 | // Apply an (optional) custom config: 10 | // config: { ... }, 11 | }); 12 | -------------------------------------------------------------------------------- /apps/app/lib/editor/react-renderer.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from 'react-dom/client'; 2 | 3 | export class ReactRenderer { 4 | static render(component: React.ReactElement, dom: HTMLElement) { 5 | const root = createRoot(dom); 6 | root.render(component); 7 | 8 | return { 9 | destroy: () => root.unmount(), 10 | }; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/backend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "declaration": false, 6 | "declarationMap": false, 7 | "emitDeclarationOnly": false, 8 | "noEmit": true 9 | }, 10 | "include": ["**/*.ts", "**/*.tsx"], 11 | "exclude": ["node_modules"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/app/lib/uploadthing.ts: -------------------------------------------------------------------------------- 1 | import { 2 | generateUploadButton, 3 | generateUploadDropzone, 4 | } from '@uploadthing/react'; 5 | 6 | import type { OurFileRouter } from '@/app/api/uploadthing/core'; 7 | 8 | export const UploadButton: any = generateUploadButton(); 9 | export const UploadDropzone: any = generateUploadDropzone(); 10 | -------------------------------------------------------------------------------- /packages/storage/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | BLOB_READ_WRITE_TOKEN: z.string().min(1).optional(), 8 | }, 9 | runtimeEnv: { 10 | BLOB_READ_WRITE_TOKEN: process.env.BLOB_READ_WRITE_TOKEN, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/collaboration/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | LIVEBLOCKS_SECRET: z.string().min(1).startsWith('sk_').optional(), 8 | }, 9 | runtimeEnv: { 10 | LIVEBLOCKS_SECRET: process.env.LIVEBLOCKS_SECRET, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/app/app/api/changelogs/route.ts: -------------------------------------------------------------------------------- 1 | import { database } from '@repo/backend/database'; 2 | import { schema } from '@repo/backend/schema'; 3 | import { type NextRequest, NextResponse } from 'next/server'; 4 | 5 | export async function GET(req: NextRequest) { 6 | const changelogs = await database.select().from(schema.changelogs); 7 | return NextResponse.json({ changelogs }); 8 | } 9 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/terms/content.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { LegalPage } from '@/app/components/LegalPage'; 4 | import Content from './content.mdx'; 5 | 6 | export default function TermsContent() { 7 | return ( 8 | } 12 | /> 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/coming-soon.tsx: -------------------------------------------------------------------------------- 1 | import { Badge } from "@repo/design-system/components/ui/badge"; 2 | 3 | export const ComingSoon = () => { 4 | return ( 5 | 9 | Coming soon 10 | 11 | ); 12 | }; -------------------------------------------------------------------------------- /apps/app/app/api/assistants/route.ts: -------------------------------------------------------------------------------- 1 | import { database } from '@repo/backend/database'; 2 | import { schema } from '@repo/backend/schema'; 3 | import { type NextRequest, NextResponse } from 'next/server'; 4 | 5 | export async function GET(req: NextRequest) { 6 | const data = await database.select().from(schema.customAssistants); 7 | return NextResponse.json({ assistants: data || [] }); 8 | } 9 | -------------------------------------------------------------------------------- /apps/app/public/icons/xai.svg: -------------------------------------------------------------------------------- 1 | Grok -------------------------------------------------------------------------------- /apps/app/public/user-placeholder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /apps/web/lib/features.ts: -------------------------------------------------------------------------------- 1 | import type { ClockIcon } from 'lucide-react'; 2 | 3 | export type Feature = { 4 | icon: typeof ClockIcon; 5 | name: string; 6 | href: string; 7 | description: string; 8 | formerly: string; 9 | short: string; 10 | }; 11 | 12 | export const features: Record = {}; 13 | 14 | // export const integrations: Feature = { 15 | 16 | // }; 17 | -------------------------------------------------------------------------------- /packages/payments/index.ts: -------------------------------------------------------------------------------- 1 | import 'server-only'; 2 | import { lemonSqueezySetup } from '@lemonsqueezy/lemonsqueezy.js'; 3 | import { keys } from './keys'; 4 | 5 | lemonSqueezySetup({ 6 | apiKey: keys().LEMON_SQUEEZY_API_KEY, 7 | onError: (error) => { 8 | console.error('Lemon Squeezy error:', error); 9 | }, 10 | }); 11 | 12 | export * from '@lemonsqueezy/lemonsqueezy.js'; 13 | -------------------------------------------------------------------------------- /apps/app/hooks/use-modal.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function useModal() { 4 | const [isModalOpen, setIsModalOpen] = React.useState(false); 5 | const openModal = React.useCallback(() => setIsModalOpen(true), []); 6 | const closeModal = React.useCallback(() => setIsModalOpen(false), []); 7 | 8 | return { isModalOpen, openModal, closeModal, setIsModalOpen }; 9 | } 10 | -------------------------------------------------------------------------------- /apps/app/modules/tube/videos/types.ts: -------------------------------------------------------------------------------- 1 | import type { inferRouterOutputs } from '@trpc/server'; 2 | 3 | import type { AppRouter } from '@/trpc/routers/_app'; 4 | 5 | export type VideoGetOneOutput = 6 | inferRouterOutputs['videos']['getOne']; 7 | 8 | // TODO: Change to videos getMany 9 | export type VideoGetManyOutput = 10 | inferRouterOutputs['suggestions']['getMany']; 11 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@repo/design-system/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /apps/app/lib/utils/hotjar.ts: -------------------------------------------------------------------------------- 1 | import Hotjar from '@hotjar/browser'; 2 | 3 | const siteId = process.env.NEXT_PUBLIC_HOTJAR_SITE_ID; 4 | const hotjarVersion = process.env.NEXT_PUBLIC_HOTJAR_VERSION; 5 | 6 | const initHotjar = () => { 7 | if (siteId && hotjarVersion) { 8 | Hotjar.init(Number.parseInt(siteId), Number.parseInt(hotjarVersion)); 9 | } 10 | }; 11 | 12 | export default initHotjar; 13 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/acceptable-use/content.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { LegalPage } from '@/app/components/LegalPage'; 4 | import Content from './content.mdx'; 5 | 6 | export default function AcceptableUseContent() { 7 | return ( 8 | } 12 | /> 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/components/minime/client-only.tsx: -------------------------------------------------------------------------------- 1 | import { type ReactNode, useEffect, useState } from 'react'; 2 | 3 | export default function ClientOnly({ children }: { children: ReactNode }) { 4 | const [clientReady, setClientReady] = useState(false); 5 | 6 | useEffect(() => { 7 | setClientReady(true); 8 | }, []); 9 | 10 | return clientReady ? children : null; 11 | } 12 | -------------------------------------------------------------------------------- /packages/design-system/components/prose.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from 'react'; 2 | import { cn } from '../lib/utils'; 3 | 4 | type ProseProperties = ComponentProps<'div'>; 5 | 6 | export const Prose = ({ className, ...properties }: ProseProperties) => ( 7 |
11 | ); 12 | -------------------------------------------------------------------------------- /apps/app/components/client-only.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { type ReactNode, useEffect, useState } from 'react'; 4 | 5 | export const ClientOnly = ({ children }: { children: ReactNode }) => { 6 | const [clientReady, setClientReady] = useState(false); 7 | 8 | useEffect(() => { 9 | setClientReady(true); 10 | }, []); 11 | 12 | return clientReady ? <>{children} : null; 13 | }; 14 | -------------------------------------------------------------------------------- /apps/app/hooks/use-token-counter.tsx: -------------------------------------------------------------------------------- 1 | import { encodingForModel } from 'js-tiktoken'; 2 | 3 | export const useTokenCounter = () => { 4 | const getTokenCount = (message: string) => { 5 | const enc = encodingForModel('gpt-4o'); 6 | if (message) { 7 | return enc.encode(message).length; 8 | } 9 | return undefined; 10 | }; 11 | 12 | return { 13 | getTokenCount, 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /packages/analytics/posthog/server.ts: -------------------------------------------------------------------------------- 1 | import 'server-only'; 2 | import { PostHog } from 'posthog-node'; 3 | import { keys } from '../keys'; 4 | 5 | export const analytics = new PostHog(keys().NEXT_PUBLIC_POSTHOG_KEY, { 6 | host: keys().NEXT_PUBLIC_POSTHOG_HOST, 7 | 8 | // Don't batch events and flush immediately - we're running in a serverless environment 9 | flushAt: 1, 10 | flushInterval: 0, 11 | }); 12 | -------------------------------------------------------------------------------- /packages/observability/instrumentation.ts: -------------------------------------------------------------------------------- 1 | import { init } from '@sentry/nextjs'; 2 | import { keys } from './keys'; 3 | 4 | const opts = { 5 | dsn: keys().NEXT_PUBLIC_SENTRY_DSN, 6 | }; 7 | 8 | export const initializeSentry = () => { 9 | if (process.env.NEXT_RUNTIME === 'nodejs') { 10 | init(opts); 11 | } 12 | 13 | if (process.env.NEXT_RUNTIME === 'edge') { 14 | init(opts); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /apps/app/public/icons/handdrawn_love.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/design-system/components/container.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from 'react'; 2 | import { cn } from '../lib/utils'; 3 | 4 | type ContainerProperties = ComponentProps<'div'>; 5 | 6 | export const Container = ({ 7 | className, 8 | ...properties 9 | }: ContainerProperties) => ( 10 |
14 | ); 15 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 4 | 5 | const Collapsible = CollapsiblePrimitive.Root 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 12 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/resume/jobs/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next'; 2 | import { JobListingsCard } from '../components/jobs/job-listings-card'; 3 | 4 | export const dynamic = 'force-dynamic'; 5 | 6 | export const metadata: Metadata = { 7 | title: 'Open Studio | Jobs', 8 | description: 'Open Studio | Jobs', 9 | }; 10 | 11 | export default function JobsPage() { 12 | return ; 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/modules/tube/automation/ui/views/automation-view.tsx: -------------------------------------------------------------------------------- 1 | import { AutomationTabsSection } from '@/modules/tube/automation/ui/sections/tabs-section'; 2 | 3 | export const AutomationView = () => { 4 | return ( 5 |
6 |
7 | 8 |
9 |
10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /packages/mux/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | MUX_TOKEN_ID: z.string().min(1), 8 | MUX_TOKEN_SECRET: z.string().min(1), 9 | }, 10 | runtimeEnv: { 11 | MUX_TOKEN_ID: process.env.MUX_TOKEN_ID, 12 | MUX_TOKEN_SECRET: process.env.MUX_TOKEN_SECRET, 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /apps/app/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/hooks/use-clipboard'; 2 | export * from '@/hooks/use-assistant-utils'; 3 | export * from '@/hooks/use-image-attachment'; 4 | export * from '@/hooks/use-llm-test'; 5 | export * from '@/hooks/use-record-voice'; 6 | export * from '@/hooks/use-scroll-to-bottom'; 7 | export * from '@/hooks/use-text-selection'; 8 | export * from '@/hooks/use-tools'; 9 | export * from '@/hooks/use-attachment'; 10 | -------------------------------------------------------------------------------- /packages/design-system/components/ui/placeholder-icon.tsx: -------------------------------------------------------------------------------- 1 | export type TPlaceholderIconProps = { 2 | size?: number; 3 | color?: string; 4 | className?: string; 5 | strokeWidth?: any; 6 | variant?: any; 7 | }; 8 | 9 | export const PlaceholderIcon = ({ 10 | size, 11 | color, 12 | className, 13 | strokeWidth, 14 | }: TPlaceholderIconProps) => { 15 | return
; 16 | }; -------------------------------------------------------------------------------- /apps/app/app/(unsubscribe)/unsubscribe/action.ts: -------------------------------------------------------------------------------- 1 | 'use server'; 2 | 3 | import { deleteSubscriber } from '@/actions/subscribers'; 4 | 5 | export async function unsubscribe(subId: string, userId: string) { 6 | try { 7 | await deleteSubscriber(subId, userId); 8 | return { 9 | success: 'Unsubscribed', 10 | }; 11 | } catch (err) { 12 | return { 13 | error: 'Something went wrong', 14 | }; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/email/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | RESEND_FROM: z.string().min(1).email(), 8 | RESEND_TOKEN: z.string().min(1).startsWith('re_'), 9 | }, 10 | runtimeEnv: { 11 | RESEND_FROM: process.env.RESEND_FROM, 12 | RESEND_TOKEN: process.env.RESEND_TOKEN, 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | # Maintain dependencies for GitHub Actions 5 | - package-ecosystem: "github-actions" 6 | directory: "/" 7 | open-pull-requests-limit: 10 8 | schedule: 9 | interval: "monthly" 10 | 11 | # Maintain dependencies for npm 12 | - package-ecosystem: "npm" 13 | directory: "/" 14 | open-pull-requests-limit: 10 15 | schedule: 16 | interval: "monthly" 17 | -------------------------------------------------------------------------------- /apps/app/app/(user)/user/[domain]/components/nothing-placeholder.tsx: -------------------------------------------------------------------------------- 1 | export function NothingPlaceholder({ name }: { name?: string }) { 2 | return ( 3 |
4 |

Nothing here yet

5 |

6 | It looks like {name} is still working on it. 7 |

8 |
9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /apps/app/modules/tube/home/categories/server/procedures.ts: -------------------------------------------------------------------------------- 1 | import { baseProcedure, createTRPCRouter } from '@/trpc/init'; 2 | import { database } from '@repo/backend/database'; 3 | import { categories } from '@repo/backend/schema'; 4 | 5 | export const categoriesRouter = createTRPCRouter({ 6 | getMany: baseProcedure.query(async () => { 7 | const data = await database.select().from(categories); 8 | return data; 9 | }), 10 | }); 11 | -------------------------------------------------------------------------------- /packages/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/testing", 3 | "version": "0.0.0", 4 | "private": true, 5 | "main": "./index.js", 6 | "type": "commonjs", 7 | "scripts": { 8 | "clean": "git clean -xdf .cache .turbo dist node_modules", 9 | "typecheck": "tsc --noEmit --emitDeclarationOnly false" 10 | }, 11 | "devDependencies": { 12 | "@vitejs/plugin-react": "^4.3.4", 13 | "vitest": "^2.1.8" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/app/app/api/trpc/[trpc]/route.ts: -------------------------------------------------------------------------------- 1 | import { createTRPCContext } from '@/trpc/init'; 2 | import { appRouter } from '@/trpc/routers/_app'; 3 | import { fetchRequestHandler } from '@trpc/server/adapters/fetch'; 4 | const handler = (req: Request) => 5 | fetchRequestHandler({ 6 | endpoint: '/api/trpc', 7 | req, 8 | router: appRouter, 9 | createContext: createTRPCContext, 10 | }); 11 | export { handler as GET, handler as POST }; 12 | -------------------------------------------------------------------------------- /apps/web/app/components/feature-hero/index.tsx: -------------------------------------------------------------------------------- 1 | import type { features } from '@/lib/features'; 2 | import { FeatureHeroInner } from './feature-hero-inner'; 3 | 4 | type FeatureHeroProperties = (typeof features)[keyof typeof features]; 5 | 6 | export const FeatureHero = ({ 7 | icon: Icon, 8 | ...properties 9 | }: FeatureHeroProperties) => ( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/components/feedback/use-feedback.tsx: -------------------------------------------------------------------------------- 1 | import { FeedbackModal } from '@/app/(organization)/chat/components/feedback/feedback-modal'; 2 | import { useState } from 'react'; 3 | 4 | export const useFeedback = () => { 5 | const [open, setOpen] = useState(false); 6 | const renderModal = () => { 7 | return ; 8 | }; 9 | return { open, setOpen, renderModal }; 10 | }; 11 | -------------------------------------------------------------------------------- /apps/app/hooks/use-navigation.tsx: -------------------------------------------------------------------------------- 1 | import { create } from 'zustand'; 2 | 3 | interface NavigationState { 4 | isOpen: boolean; 5 | toggle: () => void; 6 | setOpen: (value: boolean) => void; 7 | } 8 | const useNavigation = create((set) => ({ 9 | isOpen: false, 10 | toggle: () => set((state) => ({ isOpen: !state.isOpen })), 11 | setOpen: (value) => set(() => ({ isOpen: value })), 12 | })); 13 | 14 | export default useNavigation; 15 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/terms/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next'; 2 | import TermsContent from './content'; 3 | 4 | export const dynamic = 'force-dynamic'; 5 | 6 | const title = 'Terms of Service - Open Studio'; 7 | const description = 'Terms of Service - Open Studio'; 8 | 9 | export const metadata: Metadata = { 10 | title, 11 | description, 12 | }; 13 | 14 | export default function Page() { 15 | return ; 16 | } 17 | -------------------------------------------------------------------------------- /packages/backend/migrations/0025_simple_cammi.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "categories" ( 2 | "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, 3 | "name" text NOT NULL, 4 | "description" text, 5 | "created_at" timestamp DEFAULT now() NOT NULL, 6 | "updated_at" timestamp DEFAULT now() NOT NULL, 7 | CONSTRAINT "categories_name_unique" UNIQUE("name") 8 | ); 9 | --> statement-breakpoint 10 | CREATE UNIQUE INDEX "name_idx" ON "categories" USING btree ("name"); -------------------------------------------------------------------------------- /packages/tinybird/datasources/youtube_comment_reply_latest_oldest.datasource: -------------------------------------------------------------------------------- 1 | SCHEMA > 2 | `organization_id` String, 3 | `newest_comment_id` AggregateFunction(argMax, String, DateTime), 4 | `newest_comment_time` AggregateFunction(max, DateTime), 5 | `oldest_comment_id` AggregateFunction(argMin, String, DateTime), 6 | `oldest_comment_time` AggregateFunction(min, DateTime) 7 | 8 | ENGINE "AggregatingMergeTree" 9 | ENGINE_SORTING_KEY "organization_id" -------------------------------------------------------------------------------- /packages/tinybird/datasources/youtube_comment_thread_latest_oldest.datasource: -------------------------------------------------------------------------------- 1 | SCHEMA > 2 | `organization_id` String, 3 | `newest_comment_id` AggregateFunction(argMax, String, DateTime), 4 | `newest_comment_time` AggregateFunction(max, DateTime), 5 | `oldest_comment_id` AggregateFunction(argMin, String, DateTime), 6 | `oldest_comment_time` AggregateFunction(min, DateTime) 7 | 8 | ENGINE "AggregatingMergeTree" 9 | ENGINE_SORTING_KEY "organization_id" -------------------------------------------------------------------------------- /apps/app/app/(organization)/minime/components/layout/app-shell.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@repo/design-system/lib/utils'; 2 | import type React from 'react'; 3 | 4 | interface Props extends React.HTMLAttributes {} 5 | 6 | export default function AppShell({ children, className, ...props }: Props) { 7 | return ( 8 |
9 | {children} 10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /apps/app/hooks/use-app-command.tsx: -------------------------------------------------------------------------------- 1 | import { create } from 'zustand'; 2 | 3 | interface AppCommandState { 4 | isOpen: boolean; 5 | toggle: () => void; 6 | setOpen: (value: boolean) => void; 7 | } 8 | const useAppCommand = create((set) => ({ 9 | isOpen: false, 10 | toggle: () => set((state) => ({ isOpen: !state.isOpen })), 11 | setOpen: (value) => set(() => ({ isOpen: value })), 12 | })); 13 | 14 | export default useAppCommand; 15 | -------------------------------------------------------------------------------- /apps/app/modules/tube/studio/ui/views/video-view.tsx: -------------------------------------------------------------------------------- 1 | import { FormSection } from '../sections/form-section'; 2 | 3 | interface PageProps { 4 | videoId: string; 5 | } 6 | 7 | export const VideoView = ({ videoId }: PageProps) => { 8 | return ( 9 |
10 |
11 | 12 |
13 |
14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/privacy/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next'; 2 | import PrivacyContent from './content'; 3 | 4 | export const dynamic = 'force-dynamic'; 5 | 6 | const title = 'Privacy Policy - Open Studio'; 7 | const description = 'Privacy Policy - Open Studio'; 8 | 9 | export const metadata: Metadata = { 10 | title, 11 | description, 12 | }; 13 | 14 | export default function Page() { 15 | return ; 16 | } 17 | -------------------------------------------------------------------------------- /apps/app/app/api/history/route.ts: -------------------------------------------------------------------------------- 1 | import { getChatsByUserId } from '@/lib/queries'; 2 | import { currentUser } from '@repo/backend/auth/utils'; 3 | import { NextResponse } from 'next/server'; 4 | 5 | export async function GET() { 6 | const user = await currentUser(); 7 | 8 | if (!user) return new Response('Unauthorized', { status: 401 }); 9 | 10 | const chats = await getChatsByUserId({ id: user.id }); 11 | 12 | return NextResponse.json(chats); 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/components/billing/check-and-redirect-for-upgrade.tsx: -------------------------------------------------------------------------------- 1 | import { env } from '@/env'; 2 | import { redirect } from 'next/navigation'; 3 | 4 | export async function checkAndRedirectForUpgrade() { 5 | if (!env.NEXT_PUBLIC_WELCOME_UPGRADE_ENABLED) return; 6 | 7 | // const [data] = await trpc.user.getPremium. 8 | // const {premium} = data; 9 | 10 | // if(premium.lemon_squeezy_renews_at !== null) return; 11 | 12 | redirect('/welcome-upgrade'); 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/lib/sharp.ts: -------------------------------------------------------------------------------- 1 | import sharp from 'sharp'; 2 | 3 | export async function getBlurDataURL(src?: string, url?: string) { 4 | const res = await fetch(url ?? `${process.env.NEXT_PUBLIC_URL}${src}`); 5 | const buffer = await res.arrayBuffer(); 6 | const { data } = await sharp(buffer) 7 | .resize(10) 8 | .png({ quality: 30 }) 9 | .toBuffer({ resolveWithObject: true }); 10 | 11 | return `data:image/png;base64,${data.toString('base64')}`; 12 | } 13 | -------------------------------------------------------------------------------- /apps/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@repo/typescript-config/nextjs.json", 4 | // "@repo/cms/typescript-config.json" 5 | ], 6 | "compilerOptions": { 7 | "baseUrl": ".", 8 | "paths": { 9 | "@/*": ["./*"], 10 | "@repo/*": ["../../packages/*"] 11 | } 12 | }, 13 | "include": [ 14 | "next-env.d.ts", 15 | "next.config.ts", 16 | "**/*.ts", 17 | "**/*.tsx", 18 | ".next/types/**/*.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /apps/api/next.config.ts: -------------------------------------------------------------------------------- 1 | import { config } from '@repo/next-config'; 2 | import { withLogtail } from '@repo/observability/next-config'; 3 | import type { NextConfig } from 'next'; 4 | 5 | const nextConfig: NextConfig = withLogtail({ ...config }); 6 | 7 | // if (env.VERCEL) { 8 | // nextConfig = withSentry(nextConfig); 9 | // } 10 | 11 | // if (env.ANALYZE === 'true') { 12 | // nextConfig = withAnalyzer(nextConfig); 13 | // } 14 | 15 | export default nextConfig; 16 | -------------------------------------------------------------------------------- /packages/webhooks/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | SVIX_TOKEN: z 8 | .union([ 9 | z.string().min(1).startsWith('sk_'), 10 | z.string().min(1).startsWith('testsk_'), 11 | ]) 12 | .optional(), 13 | }, 14 | runtimeEnv: { 15 | SVIX_TOKEN: process.env.SVIX_TOKEN, 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /packages/backend/drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'drizzle-kit'; 2 | import { keys } from './keys'; 3 | 4 | export default defineConfig({ 5 | schema: './schema.ts', 6 | out: './migrations', 7 | dialect: 'postgresql', 8 | dbCredentials: { 9 | database: 'postgres', 10 | port: 5432, 11 | host: keys().POSTGRES_DATABASE_HOST, 12 | user: keys().POSTGRES_DATABASE_USER, 13 | password: keys().POSTGRES_DATABASE_PASSWORD, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /packages/design-system/components/precomposed/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps } from 'react'; 2 | import { cn } from '../../lib/utils'; 3 | import { Skeleton as ShadcnSkeleton } from '../ui/skeleton'; 4 | 5 | type SkeletonProps = ComponentProps; 6 | 7 | export const Skeleton = ({ className, ...props }: SkeletonProps) => { 8 | return ( 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/components/settings/models/api-key-info.tsx: -------------------------------------------------------------------------------- 1 | import { Flex } from '@repo/design-system/components/ui/flex'; 2 | import { Type } from '@repo/design-system/components/ui/text'; 3 | 4 | export const ApiKeyInfo = () => { 5 | return ( 6 | 7 | 8 | 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /packages/tinybird/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/tinybird", 3 | "version": "0.0.1", 4 | "description": "", 5 | "main": "src/index.ts", 6 | "keywords": [], 7 | "author": "kuluruvineeth", 8 | "license": "ISC", 9 | "dependencies": { 10 | "@chronark/zod-bird": "^0.3.9", 11 | "zod": "^3.23.8" 12 | }, 13 | "devDependencies": { 14 | "@repo/typescript-config": "workspace:*", 15 | "@types/node": "^20", 16 | "typescript": "^5.4.5" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/app/lib/utils/error.ts: -------------------------------------------------------------------------------- 1 | export type ActionError> = { 2 | error: string; 3 | } & E; 4 | export type ServerActionResponse< 5 | T, 6 | E extends object = Record, 7 | > = ActionError | T; 8 | 9 | // biome-ignore lint/suspicious/noExplicitAny: 10 | export function isActionError(error: any): error is ActionError { 11 | return error && typeof error === 'object' && 'error' in error && error.error; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ai/components/thread.tsx: -------------------------------------------------------------------------------- 1 | import type { HTMLAttributes } from 'react'; 2 | import { twMerge } from 'tailwind-merge'; 3 | 4 | type ThreadProps = HTMLAttributes; 5 | 6 | export const Thread = ({ children, className, ...props }: ThreadProps) => ( 7 |
14 | {children} 15 |
16 | ); 17 | -------------------------------------------------------------------------------- /apps/app/app/(organization)/chat/components/settings/setting-card.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@repo/design-system/lib/utils'; 2 | import type { ReactNode } from 'react'; 3 | 4 | export type TSettingCard = { 5 | children: ReactNode; 6 | className?: string; 7 | }; 8 | 9 | export const SettingCard = ({ children, className }: TSettingCard) => { 10 | return ( 11 |
12 | {children} 13 |
14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /apps/web/app/legal/(documents)/acceptable-use/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next'; 2 | import AcceptableUseContent from './content'; 3 | 4 | export const dynamic = 'force-dynamic'; 5 | 6 | const title = 'Acceptable Use Policy - Open Studio'; 7 | const description = 'Acceptable Use Policy - Open Studio'; 8 | 9 | export const metadata: Metadata = { 10 | title, 11 | description, 12 | }; 13 | 14 | export default function Page() { 15 | return ; 16 | } 17 | -------------------------------------------------------------------------------- /packages/payments/keys.ts: -------------------------------------------------------------------------------- 1 | import { createEnv } from '@t3-oss/env-nextjs'; 2 | import { z } from 'zod'; 3 | 4 | export const keys = () => 5 | createEnv({ 6 | server: { 7 | LEMON_SQUEEZY_API_KEY: z.string().min(1), 8 | LEMON_SQUEEZY_SIGNING_SECRET: z.string().min(1), 9 | }, 10 | runtimeEnv: { 11 | LEMON_SQUEEZY_API_KEY: process.env.LEMON_SQUEEZY_API_KEY, 12 | LEMON_SQUEEZY_SIGNING_SECRET: process.env.LEMON_SQUEEZY_SIGNING_SECRET, 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /apps/app/helper/preset-prompt-values.ts: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | 3 | const presetValues = { 4 | '{{local_date}}': moment().format('YYYY-MM-DD'), 5 | '{{local_time}}': moment().format('HH:mm:ss'), 6 | '{{local_datetime}}': moment().format('YYYY-MM-DD HH:mm:ss'), 7 | }; 8 | 9 | export const injectPresetValues = (prompt: string) => { 10 | return prompt.replace( 11 | /{{.*?}}/g, 12 | (match) => presetValues?.[match as keyof typeof presetValues] || match 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /packages/testing/index.js: -------------------------------------------------------------------------------- 1 | const path = require('node:path'); 2 | const react = require('@vitejs/plugin-react'); 3 | const { defineConfig } = require('vitest/config'); 4 | 5 | const config = defineConfig({ 6 | plugins: [react()], 7 | test: { 8 | environment: 'jsdom', 9 | }, 10 | resolve: { 11 | alias: { 12 | '@': path.resolve(__dirname, './'), 13 | '@repo': path.resolve(__dirname, '../../packages'), 14 | }, 15 | }, 16 | }); 17 | 18 | module.exports = config; 19 | -------------------------------------------------------------------------------- /apps/app/modules/tube/comments/ui/views/comment-view.tsx: -------------------------------------------------------------------------------- 1 | import { CommentSection } from '@/modules/tube/comments/ui/sections/comment-section'; 2 | 3 | export const CommentView = ({ 4 | organizationId, 5 | }: { 6 | organizationId: string; 7 | }) => { 8 | return ( 9 |
10 |
11 | 12 |
13 |
14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", 3 | "extends": ["ultracite"], 4 | "javascript": { 5 | "globals": ["Liveblocks"] 6 | }, 7 | "files": { 8 | "ignore": [ 9 | "packages/design-system/components/ui/**", 10 | "packages/design-system/lib/**", 11 | "packages/design-system/hooks/**", 12 | "packages/collaboration/config.ts", 13 | "apps/docs/**/*.json", 14 | "apps/email/.react-email/**" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/design-system/providers/theme.tsx: -------------------------------------------------------------------------------- 1 | import type { ThemeProviderProps } from 'next-themes'; 2 | import { ThemeProvider as NextThemeProvider } from 'next-themes'; 3 | 4 | export const ThemeProvider = ({ 5 | children, 6 | ...properties 7 | }: ThemeProviderProps) => ( 8 | 15 | {children} 16 | 17 | ); 18 | -------------------------------------------------------------------------------- /packages/payments/ai.ts: -------------------------------------------------------------------------------- 1 | import { StripeAgentToolkit } from '@stripe/agent-toolkit/ai-sdk'; 2 | import { keys } from './keys'; 3 | 4 | export const paymentsAgentToolkit = new StripeAgentToolkit({ 5 | secretKey: keys().STRIPE_SECRET_KEY, 6 | configuration: { 7 | actions: { 8 | paymentLinks: { 9 | create: true, 10 | }, 11 | products: { 12 | create: true, 13 | }, 14 | prices: { 15 | create: true, 16 | }, 17 | }, 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /packages/seo/json-ld.tsx: -------------------------------------------------------------------------------- 1 | import type { Thing, WithContext } from 'schema-dts'; 2 | 3 | type JsonLdProps = { 4 | code: WithContext; 5 | }; 6 | 7 | export const JsonLd = ({ code }: JsonLdProps) => ( 8 |