70 lines
1.6 KiB
Markdown
70 lines
1.6 KiB
Markdown
# Light Chat
|
|
|
|
A lightweight Android chat application built with React and Capacitor for connecting to locally or remotely hosted LLMs.
|
|
|
|
## Features
|
|
|
|
- **LLM API Integration**: Connect to any OpenAI-compatible API endpoint
|
|
- **Session Management**: Multiple chat sessions with add/remove functionality
|
|
- **Dark Theme**: Sleek black/dark UI design
|
|
- **Conversation Export**: Save chats as text, log, or markdown files
|
|
- **Custom System Prompts**: Inject your own system prompts for personalized interactions
|
|
- **Offline Ready**: Capacitor wrapper for native Android APK generation
|
|
|
|
## Tech Stack
|
|
|
|
- **Frontend**: React (Web)
|
|
- **Mobile Wrapper**: Capacitor
|
|
- **Build Tool**: Vite (recommended) or Create React App
|
|
- **Testing**: Jest / React Testing Library
|
|
- **Android Studio**: For final APK generation
|
|
|
|
## Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- Node.js (v18+)
|
|
- npm or yarn
|
|
- Android Studio (for APK building)
|
|
- Capacitor CLI
|
|
|
|
### Installation
|
|
|
|
```bash
|
|
# Install dependencies
|
|
npm install
|
|
|
|
# Start development server
|
|
npm run dev
|
|
```
|
|
|
|
### Build for Android
|
|
|
|
```bash
|
|
# Build the web app
|
|
npm run build
|
|
|
|
# Sync with Capacitor
|
|
npx cap sync
|
|
|
|
# Open in Android Studio
|
|
npx cap open android
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
The codebase follows these principles:
|
|
|
|
- **Simple**: Keep things straightforward
|
|
- **Modular**: Separate concerns into distinct modules
|
|
- **Reusable**: Abstract common functionality
|
|
- **Tested**: Unit tests for all components
|
|
|
|
## Contributing
|
|
|
|
When adding features:
|
|
1. Look for existing similar functions to abstract
|
|
2. Write unit tests
|
|
3. Keep components small and focused
|
|
4. Follow the modular architecture
|