├── app/ # Next.js App Router
│ ├── (auth)/ # Auth routes (login, register)
│ ├── (chat)/ # Main chat interface
│ ├── api/ # API routes (chat, auth, trpc)
│ └── actions/ # Server Actions
│
├── components/
│ ├── ai-elements/ # AI Elements registry components
│ ├── chat/ # Chat UI components
│ ├── part/ # Tool part renderers
│ ├── settings/ # Settings pages
│ └── ui/ # shadcn/ui components
│
├── lib/
│ ├── ai/ # AI SDK integration, tools, prompts
│ ├── db/ # Database schema, queries, and data access
│ ├── models/ # Model types and utilities
│ └── stores/ # Zustand stores
│
├── trpc/ # tRPC routers and procedures
├── hooks/ # React hooks
├── providers/ # React context providers
├── evals/ # AI evaluation tests
└── scripts/ # Build and dev scripts