Skip to Content
Next.jsGetting Started

AI App Starter Kit

A feature-rich AI chat application with conversation management, project organization, file handling, and memory-augmented responses.

Tech Stack

Features

  • AI chat interface with real-time streaming and multiple models (Anuma, GPT 5.2, Claude Opus 4.5, Grok 4.1)
  • Memory system with semantic retrieval from past conversations
  • Conversation management with persistent storage
  • Projects to organize conversations with custom icons and themes
  • File management with encrypted storage
  • App builder for creating applications via AI prompts
  • Thinking mode with extended reasoning and token visibility
  • Voice input with on-device transcription
  • Server-side and client-side tool integration
  • Cloud backups to Google Drive and Dropbox
  • Light/dark themes with customizable accent colors

Architecture

The starter kit uses a hook-based architecture where each capability is encapsulated in its own hook. The hooks handle persistence to WatermelonDB, authentication via Privy, and communication with AI services through the SDK.

All data is stored locally, enabling offline operation. The memory system extracts facts from conversations and stores them with embeddings for semantic search, making relevant context available to future conversations.

Prerequisites

Getting Started

Clone the repository

git clone https://github.com/zeta-chain/ai-examples.git cd ai-examples

Install dependencies

pnpm install

Configure environment variables

Create a .env.local file in the root directory:

# Required NEXT_PUBLIC_API_URL=https://portal.anuma-dev.ai NEXT_PUBLIC_PRIVY_APP_ID=cmjkga3y002g0ju0clwca9wwp # Optional - for Google Drive/Calendar integration NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id # Optional - for Dropbox backups NEXT_PUBLIC_DROPBOX_APP_KEY=your-dropbox-app-key

To obtain optional credentials:

Run the development server

pnpm dev

Open http://localhost:3000  in your browser.

Data Storage

All data is stored locally in the browser:

  • WatermelonDB (with LokiJS adapter) for conversations, messages, projects, and settings
  • IndexedDB for database persistence
  • OPFS (Origin Private File System) for encrypted file storage when wallet is connected
  • localStorage for user preferences and theme settings

No data is sent to external servers except for AI chat requests to the Portal API.

Running E2E Tests

Configure test credentials in .env.local:

NEXT_PUBLIC_PRIVY_TEST_MODE=true TEST_USER_EMAIL=test@example.com TEST_USER_OTP=your-test-otp

Run the tests:

# Run all tests pnpm test:e2e # Run with interactive UI pnpm test:e2e:ui # Run in headed mode (visible browser) pnpm test:e2e:headed

External Services

The app connects to the following external services:

ServicePurposeRequired
Portal APIAI chat completions and toolsYes
PrivyAuthentication and walletYes
Google DriveBackup/export conversationsNo
Google CalendarCalendar integrationNo
DropboxAlternative backup destinationNo

Resources

Last updated on