Skip to content

brentmzey/lovebside

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

B-Side: Kotlin Multiplatform Messaging App

B-Side Banner

Kotlin Compose Multiplatform Platform License Buy Me a Coffee GitHub Sponsors

B-Side is a production-ready messaging application built with Kotlin Multiplatform (KMP) and Compose Multiplatform. It demonstrates a "Supercharged" architecture sharing 100% of business logic and 99% of UI code across Android, iOS, Desktop, and Web.


πŸš€ Quick Start (The Golden Path)

Get up and running with a single command.

1. Prerequisites

  • JDK 17+ (Eclipse Temurin 21 recommended)
  • Docker & Docker Compose (for Backend services)
  • Just (Command runner) - Install Guide
    • Mac: brew install just
    • Windows: choco install just
  • Node.js 20+ (for Web target)

2. Clone & Run

# 1. Clone the repository
git clone https://github.com/your-org/bside.git
cd bside

# 2. Start everything (Backend + All Clients)
just start

# OR, if you use direnv/source .envrc, simply:
start

Note: This project uses a clean directory structure. Core commands are located in bin/ and are automatically added to your PATH if you source .envrc.

This intelligent script will:

  1. 🐳 Start PocketBase & Ktor Server (Docker)
  2. πŸ–₯️ Launch Desktop Client
  3. 🌐 Launch Web Client
  4. πŸ“± Launch Android/iOS apps (if emulators/simulators are active)

πŸ› οΈ Building & Running

We provide simplified just commands for daily development, and standard Gradle commands for distribution builds.

Platform Run (Dev) Build (Distributable) Output Location
Backend Stack just up ./gradlew :server:shadowJar server/build/libs/
Desktop just desktop ./gradlew :composeApp:createDistributable composeApp/build/compose/binaries/
Web just web ./gradlew :composeApp:jsBrowserProductionWebpack composeApp/build/dist/js/
Android just android ./gradlew :composeApp:assembleRelease composeApp/build/outputs/apk/
iOS just ios ./gradlew :composeApp:linkReleaseFrameworkIosArm64 composeApp/build/bin/iosArm64/

Detailed Platform Instructions

πŸ€– Android
  1. Open android/ in Android Studio.
  2. Select a run configuration and device.
  3. Click Run.
  • Or use CLI: ./scripts/run-android.sh
🍎 iOS (macOS only)
  1. Ensure Xcode 15+ is installed.
  2. Run just ios to open the Xcode workspace.
  3. Select a Simulator or Device and click Run.
  • Or use CLI: ./scripts/run-ios.sh
πŸ–₯️ Desktop (JVM)
  • Hot Reload: just desktop-hot (Experimental)
  • Standard: just desktop
  • Native Installers:
    • Mac (DMG): ./gradlew :composeApp:packageDmg
    • Windows (MSI): ./gradlew :composeApp:packageMsi
    • Linux (DEB): ./gradlew :composeApp:packageDeb
🌐 Web (JS/Wasm)
  • Dev Server: just web (starts at http://localhost:8080)
  • Production Build: The output in composeApp/build/dist/js/productionExecutable/ can be served by any static host (Nginx, Netlify, Vercel).

🚒 Deployment

Detailed deployment guides are available for each component.

1. Database (PocketBase)

We use PocketHost for production database hosting or a self-hosted Docker container.

2. Backend API (Ktor)

The Ktor server acts as the API Gateway and Auth/Validation layer.

  • Containerize: docker build -t bside-server .
  • Deploy: Supports AWS ECS, Google Cloud Run, or any Docker-compatible host.
  • πŸ‘‰ View AWS Setup Guide

3. Frontend Distribution

  • Android: Distribute .apk or .aab via Google Play Console.
  • iOS: Archive via Xcode for TestFlight/App Store.
  • Web: Deploy the build/dist/js/productionExecutable folder to Netlify/Vercel.
  • Desktop: Distribute platform-specific installers (.dmg, .msi, .deb).
  • πŸ‘‰ View Distribution Guide

✨ Key Messaging Features

B-Side features a robust, real-time communication engine powered by Server-Sent Events (SSE) and a state-driven Representative UI architecture.

  • πŸš€ Instant Delivery: Zero-latency message syncing across all platforms.
  • πŸ’¬ Real-time Typing: Live "typing..." indicators for active conversations.
  • βœ… Read Receipts: Visual status tracking for message delivery and viewing (βœ“/βœ“βœ“).
  • 🧡 Threaded Replies: Contextual message threading for organized discussions.
  • 🎭 Expressive Reactions: Tap-to-react emoji support on every message.

Messaging Demo


πŸ—οΈ Architecture Overview

B-Side uses a centralized architecture where Shared Code drives specific UI implementations.

graph TD
    subgraph "Shared (Kotlin Multiplatform)"
        Logic[Business Logic & ViewModels]
        Repo[Repositories]
        Net[API Client]
    end

    subgraph "UI Layer (Compose Multiplatform)"
        Android[Android UI]
        iOS[iOS UI]
        Desktop[Desktop UI]
        Web[Web UI]
    end

    subgraph "Backend"
        Ktor[Ktor Server]
        PB[(PocketBase DB)]
    end

    Android & iOS & Desktop & Web --> Logic
    Logic --> Repo
    Repo --> Net
    Net --> Ktor
    Ktor --> PB
Loading

Key Technologies

  • UI: Jetpack Compose Multiplatform
  • Navigation: Voyager
  • Dependency Injection: Koin
  • Async: Kotlin Coroutines & Flow
  • Network: Ktor Client
  • Database: PocketBase (Real-time)

πŸ“‚ Project Structure

Directory Description
composeApp Main UI application (Compose Multiplatform). Contains commonMain, androidMain, iosMain, jvmMain, webMain.
shared Core business logic, repositories, and ViewModels. Shared across all platforms.
server Ktor backend service acting as the API gateway.
pocketbase Database schema, migrations, and types.
scripts Automation scripts for building, running, and testing.
docs Comprehensive documentation library.

🧩 Project Management

We track project progress, stories, and tasks using a hybrid approach:

  • Code-First Tracking: High-level epics, stories, and architectural decisions are documented directly in the codebase under the .code_hq directory. This ensures that documentation lives alongside the code.
  • Task Execution: Detailed task tracking and sprint planning are managed via Notion / JIRA.
  • Agent Handoff: We use .code_hq/CONTEXT.md and .code_hq/STORIES.md to maintain context for AI agents and human developers alike.

Check .code_hq/PROJECT_MANAGEMENT.md for a comprehensive overview of the project status.


πŸ“š Documentation & Resources

πŸš€ Getting Started

πŸ”§ Development

πŸ“– Reference

πŸš€ Deployment


πŸ’– Support the Project

If you find B-Side helpful and want to support its development, consider sponsoring or buying me a coffee! Your support helps maintain the project and add new features.


Built with ❀️ by the B-Side Team.

About

Multiplatform app and backend to build centralized, core models, services, clients, and data repositories to build backend business engine app enrichment as well as multiplatform client connector(s).

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors