├── .npmrc ├── .eslintrc.json ├── llm ├── components │ ├── forecasts │ │ ├── index.ts │ │ ├── documents.mdx │ │ └── documents.tsx │ ├── events │ │ ├── index.ts │ │ ├── events-skeleton.tsx │ │ ├── events.mdx │ │ └── events.tsx │ ├── simple-message.tsx │ ├── FormattedText.tsx │ ├── stocks │ │ ├── index.ts │ │ ├── stocks-skeleton.tsx │ │ ├── stock-purchase-status.tsx │ │ ├── conditional-purchase.mdx │ │ ├── stock-skeleton.tsx │ │ ├── positions.tsx │ │ └── stocks.tsx │ ├── not-available-read-only.tsx │ ├── serialization.tsx │ ├── warning-wrapper.tsx │ └── prompt-user-container.tsx ├── actions │ ├── history.tsx │ ├── conditional-purchases.ts │ ├── langchain-helpers.ts │ ├── newsletter.ts │ └── calendar-events.ts ├── tools │ ├── README.md │ ├── newsletter │ │ ├── check-subscription.tsx │ │ └── set-subscription.tsx │ ├── profile │ │ ├── set-profile-attributes.tsx │ │ ├── set-employeer.tsx │ │ └── get-profile.tsx │ ├── trading │ │ ├── show-current-positions.tsx │ │ ├── list-stocks.tsx │ │ └── show-stock-price.tsx │ └── events │ │ └── get-events.tsx ├── ai-params.ts ├── types.ts ├── utils.ts ├── system-prompt.ts └── ai-helpers.ts ├── app ├── favicon.ico ├── api │ ├── auth │ │ ├── user │ │ │ └── accounts │ │ │ │ ├── route.ts │ │ │ │ └── [provider] │ │ │ │ └── [user_id] │ │ │ │ └── route.ts │ │ └── [auth0] │ │ │ └── route.ts │ └── hooks │ │ └── route.ts ├── profile │ ├── components │ │ └── profile-page.tsx │ ├── layout.tsx │ └── page.tsx ├── report │ └── [id] │ │ ├── layout.tsx │ │ └── page.tsx ├── new │ └── page.tsx ├── chat │ └── [id] │ │ ├── page.tsx │ │ └── layout.tsx ├── page.tsx ├── manifest.ts ├── global-error.tsx ├── layout.tsx ├── docs │ └── [id] │ │ └── page.tsx ├── globals.css ├── read │ └── [id] │ │ └── layout.tsx └── actions.tsx ├── .fossa.yml ├── database └── market0 │ ├── V015__add_title_to_conv.sql │ ├── V010__remove_link_from_docs.sql │ ├── V014__remove_reminders.sql │ ├── V011__replace_real_names.sql │ ├── V017__add_is_public_to_conv.sql │ ├── V003__add_tx_owner.sql │ ├── V008__create_tokens_usage_table.sql │ ├── V004__add_chat_history.sql │ ├── V002__create_transaction_table.sql │ ├── V005__add_reminders_table.sql │ ├── V013__add_chat_users.sql │ ├── V016__refactor_chats.sql │ ├── V006__add_conditional_purchases_table.sql │ └── V001__initial.sql ├── postcss.config.mjs ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── sdk ├── components │ ├── loader.tsx │ ├── connect-google-account.tsx │ └── ensure-api-access.tsx ├── auth0 │ ├── 3rd-party-apis │ │ ├── providers │ │ │ ├── box.ts │ │ │ └── google.ts │ │ └── index.tsx │ └── mgmt.ts └── fga │ ├── next │ └── with-check-permission.tsx │ ├── index.ts │ └── langchain │ └── rag.ts ├── lib ├── db │ ├── index.ts │ ├── sql.ts │ ├── transactions.ts │ ├── documents.ts │ ├── userUsage.ts │ ├── conditional-purchases.ts │ └── chat-users.ts ├── constants.ts ├── utils.ts ├── market │ └── stocks.ts ├── documents.ts └── examples.tsx ├── components ├── loader.tsx ├── theme-provider.tsx ├── ui │ ├── label.tsx │ ├── input.tsx │ ├── separator.tsx │ ├── toaster.tsx │ ├── tooltip.tsx │ ├── badge.tsx │ ├── popover.tsx │ ├── avatar.tsx │ ├── scroll-area.tsx │ ├── button.tsx │ ├── card.tsx │ └── drawer.tsx ├── explanation │ └── observable.tsx ├── chat │ ├── header.tsx │ ├── context.tsx │ └── share │ │ ├── users-permissions-list.tsx │ │ └── user-permission-actions.tsx ├── auth0 │ ├── basic-info-form.tsx │ └── user-button.tsx ├── welcome │ └── Welcome.tsx ├── with-toolbar.tsx └── fga │ └── error.tsx ├── instrumentation.ts ├── components.json ├── middleware.ts ├── .github └── workflows │ └── db.yml ├── .gitignore ├── sentry.server.config.ts ├── sentry.client.config.ts ├── sentry.edge.config.ts ├── tsconfig.json ├── .env-example ├── hooks ├── chat │ ├── use-copy-to-clipboard.tsx │ └── use-scroll-to-bottom.tsx └── auth0 │ ├── helpers │ └── rate-limit.ts │ └── use-connected-accounts.ts ├── docker-compose.yml ├── scripts ├── fga │ └── syncDocs.ts └── llm │ ├── insert-forecasts.ts │ └── insert-earnings.ts ├── README.md ├── next.config.mjs ├── mdx-components.tsx ├── routers └── user-accounts.ts ├── CONTRIBUTING.md ├── package.json └── tailwind.config.ts /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /llm/components/forecasts/index.ts: -------------------------------------------------------------------------------- 1 | export { Documents } from "./documents"; 2 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auth0-lab/market0/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /.fossa.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | paths: 4 | exclude: 5 | - ./.next 6 | - ./.vercel 7 | -------------------------------------------------------------------------------- /database/market0/V015__add_title_to_conv.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE chat_histories 2 | ADD COLUMN title TEXT; 3 | 4 | -------------------------------------------------------------------------------- /database/market0/V010__remove_link_from_docs.sql: -------------------------------------------------------------------------------- 1 | UPDATE 2 | documents 3 | SET 4 | metadata = metadata - 'link'; 5 | 6 | -------------------------------------------------------------------------------- /llm/components/events/index.ts: -------------------------------------------------------------------------------- 1 | export { Events } from "./events"; 2 | export { EventsSkeleton } from "./events-skeleton"; 3 | -------------------------------------------------------------------------------- /database/market0/V014__remove_reminders.sql: -------------------------------------------------------------------------------- 1 | DROP FUNCTION "update_reminders_updated_at"; 2 | 3 | DROP TABLE "reminders"; 4 | 5 | -------------------------------------------------------------------------------- /database/market0/V011__replace_real_names.sql: -------------------------------------------------------------------------------- 1 | UPDATE 2 | documents 3 | SET 4 | content = REPLACE(content, 'NASDAQ', 'NMS'); 5 | 6 | -------------------------------------------------------------------------------- /llm/components/simple-message.tsx: -------------------------------------------------------------------------------- 1 | export const SimpleMessage = ({text} : {text: string}) => { 2 | return
{message}
25 |{children}
, 39 | code: ({ children }) =>13 | Market0 is a demo application by{" "} 14 | 15 | auth0.ai 16 | 17 | , designed to showcase how Gen AI can drive advanced authentication and authorization flows. 18 |
19 | 20 |21 | Please log in to access the demo and explore real-world use cases. 22 |
23 |