feat: Add sync routes for data synchronization between client and server feat: Create web routes for serving UI and data visualization chore: Configure TypeScript for the server project docs: Update README with project overview, features, and setup instructions docs: Add server setup implementation details for first-run configuration docs: Summarize updates and changes in the project, including new features and enhancements
3.3 KiB
3.3 KiB
CollabTable Android App
A collaborative list management Android application built with Jetpack Compose and Material 3.
Features
- Create and manage multiple lists
- Add custom fields to lists (name, link, price, category, etc.)
- Add items with values for each field
- Beautiful Material 3 design with dynamic colors
- Local Room database for offline support
- Automatic synchronization with server
- Soft delete support (items can be recovered on server)
Architecture
- UI Layer: Jetpack Compose with Material 3
- Business Logic: ViewModels with Kotlin Coroutines
- Data Layer: Room database + Retrofit for API calls
- Navigation: Jetpack Navigation Compose
Prerequisites
- Android Studio Hedgehog or later
- Android SDK 26 (Android 8.0) or higher
- JDK 17
Building the Project
- Clone the repository
- Open the
CollabTableAndroidfolder in Android Studio - Wait for Gradle sync to complete
- Run the app on an emulator or physical device
Server Configuration
The app includes a Settings screen where you can configure the server URL:
- Tap the Settings icon (⚙️) in the top bar of the Lists screen
- Enter your server URL
- Tap "Save"
Default URLs:
- Android Emulator:
http://10.0.2.2:3000/api/ - Physical Device:
http://YOUR_COMPUTER_IP:3000/api/(replace YOUR_COMPUTER_IP with your actual IP address)
Note: Make sure to include /api/ at the end of the URL.
Project Structure
app/src/main/java/com/collabtable/app/
├── data/
│ ├── api/ # Retrofit API interfaces and client
│ ├── dao/ # Room DAOs
│ ├── database/ # Room database
│ ├── model/ # Data models
│ └── repository/ # Repository pattern for data access
├── ui/
│ ├── navigation/ # Navigation setup
│ ├── screens/ # UI screens and ViewModels
│ └── theme/ # Material 3 theme
├── CollabTableApplication.kt
└── MainActivity.kt
Key Technologies
- Jetpack Compose: Modern declarative UI toolkit
- Material 3: Latest Material Design guidelines
- Room: Local SQLite database
- Retrofit: REST API client
- Kotlin Coroutines: Asynchronous programming
- Flow: Reactive data streams
Usage
Creating a List
- Tap the + button on the main screen
- Enter a list name
- Tap "Save"
Adding Fields
- Open a list
- Tap the + icon in the top bar
- Enter a field name (e.g., "Name", "Price", "Category")
- Tap "Add"
Adding Items
- After adding fields, tap the floating + button
- Fill in values for each field
- Values are saved automatically as you type
Deleting
- Tap the delete icon next to any list, field, or item
- Confirm the deletion
Synchronization
The app includes sync functionality that:
- Sends local changes to the server
- Receives changes from other clients
- Resolves conflicts using timestamps (latest wins)
To trigger sync, you can call the SyncRepository.performSync() method from your code.
Building for Release
- Update the version in
app/build.gradle - Create a keystore for signing
- Build the release APK:
./gradlew assembleRelease
License
MIT