No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jason Crabtree a22abc8183 Release v1.1.0: Add follow-up questions, copy button, and UI improvements
Features:
- Add follow-up questions generation after assistant responses
  - Respects followUpQuestionsEnabled setting
  - Only generates for text models (not image/video models)
  - Displays as clickable chips that send question as new message
- Add copy button to code blocks in chat messages
  - Positioned in bottom-right corner with visual feedback
  - Shows checkmark icon for 2 seconds after copying
  - Extra padding to prevent overlap with code content
- Display assistant name in top bar alongside model name
- Make web search sources section collapsible with expand/collapse
- Fixed message ID issue in follow-up questions generation
  - fetchAndSaveMessages now returns domain models directly
  - Ensures fresh message data is used for follow-up API calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 17:01:00 -05:00
app Release v1.1.0: Add follow-up questions, copy button, and UI improvements 2026-01-21 17:01:00 -05:00
gradle/wrapper Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00
.gitignore chore: Ignore markdown files from version control 2026-01-12 14:23:17 -05:00
build.gradle.kts Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00
gradle.properties Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00
gradlew Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00
keystore.properties.example security: Remove hardcoded signing credentials from build config 2026-01-11 15:06:02 -05:00
nanochat-icon.png Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00
README.md Update README.md 2026-01-11 12:44:24 -05:00
SECURITY.md docs: Add comprehensive security policy documentation 2026-01-11 15:19:44 -05:00
settings.gradle.kts Initial commit: nanochat-android 2026-01-09 16:20:45 -05:00

NanoChat for Android

Native Android companion app for nanochat

A modern, full-featured Android client for the self-hostable nanochat AI chat platform.

License

Features

Core Chat Functionality

  • Real-time streaming responses with Server-Sent Events (SSE)
  • Markdown rendering with support for code blocks, tables, and formatting
  • Message history with persistent local storage (Room database)
  • Search conversations quickly with integrated search
  • Delete conversations with a long press

AI Model Integration

  • Multiple model support with easy model selector
  • Web search integration with multiple providers (Linkup, Tavily, Exa, Kagi)
  • Model benchmarks display token usage and costs

Settings & Customization

  • Account settings with privacy controls
  • Context memory for compressing long conversations
  • Content processing options (YouTube transcripts, web scraping, follow-up questions)
  • Model preferences for chat titles and follow-up questions

User Interface

  • Material 3 design with modern aesthetics
  • Navigation drawer with conversation list and quick actions
  • Rounded search input with real-time filtering
  • Dark/Light theme support

Technical Features

  • Offline access to cached conversations
  • Secure storage with EncryptedSharedPreferences
  • Better Auth integration for session management
  • API key management through self-hosted backend
  • HTTP streaming with OkHttp
  • Dependency injection with Hilt
  • MVVM architecture with clean separation of concerns

Backend Integration

This Android app is designed to work with your self-hosted nanochat backend.

To get started:

  1. Deploy the nanochat backend to your server
  2. Provide your NanoGPT API keys in the backend configuration
  3. Connect the Android app by entering your backend URL during setup
  4. Sign in with your credentials or use passkey authentication

Important: This app does not store API keys locally. All API keys are managed server-side by your nanochat backend instance.

Architecture

The app follows modern Android architecture patterns:

┌─────────────────────────────────────┐
│         UI Layer (Compose)          │
│  - Screens (Chat, Settings, etc.)   │
│  - ViewModels (State Management)    │
│  - Navigation Component             │
├─────────────────────────────────────┤
│         Domain Layer                │
│  - Use Cases                        │
│  - Repository Interfaces            │
├─────────────────────────────────────┤
│          Data Layer                 │
│  - Repository Implementations       │
│  - Local Cache (Room Database)      │
│  - API Services (Retrofit)          │
└─────────────────────────────────────┘

Technology Stack

  • UI: Jetpack Compose BOM 2024.06+
  • Navigation: Navigation Compose 2.7+
  • DI: Hilt 2.51
  • Networking: Retrofit 2.11 + OkHttp 4.12
  • Streaming: OkHttp SSE
  • Database: Room 2.6+
  • Serialization: Kotlinx Serialization 1.7+
  • Coroutines: Kotlinx Coroutines 1.8+
  • Image Loading: Coil 2.7+
  • Markdown: Compose Markdown Renderer
  • Auth: Better Auth integration
  • Min SDK: 26 (Android 8.0)
  • Target SDK: 35 (Android 15)

Installation

From Source

# Clone the repository
git clone https://github.com/jcrabapple/nanochat-android.git
cd nanochat-android

# Build the app
./gradlew assembleDebug

# Install on connected device
adb install app/build/outputs/apk/debug/app-debug.apk

Requirements

  • Android Studio 2024.1.1 or later
  • JDK 17 or later
  • Android SDK 35

Configuration

On first launch, you'll need to:

  1. Enter your backend URL - The URL where your nanochat backend is hosted
  2. Sign in - Use email/password or passkey authentication
  3. Start chatting! - Create new conversations or load existing ones

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments


Built with ❤️ using Jetpack Compose and Material 3

Note: This is a companion app. You need to run your own instance of the nanochat backend to use this application.