mirror of
https://github.com/nanogpt-community/nanochat-android.git
synced 2026-09-21 12:04:12 -04:00
No description
- Kotlin 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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> |
||
| app | ||
| gradle/wrapper | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| keystore.properties.example | ||
| nanochat-icon.png | ||
| README.md | ||
| SECURITY.md | ||
| settings.gradle.kts | ||
NanoChat for Android
Native Android companion app for nanochat
A modern, full-featured Android client for the self-hostable nanochat AI chat platform.
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:
- Deploy the nanochat backend to your server
- Provide your NanoGPT API keys in the backend configuration
- Connect the Android app by entering your backend URL during setup
- 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:
- Enter your backend URL - The URL where your nanochat backend is hosted
- Sign in - Use email/password or passkey authentication
- Start chatting! - Create new conversations or load existing ones
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- nanochat - The self-hostable backend this app connects to
- NanoGPT - AI platform powering the chat
- Jetpack Compose - Modern Android UI toolkit
- Material 3 - Design system used throughout the app
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.