Skip to content

Repository files navigation

Peer Android Frontend

The official Android client for Peer Network, built with modern Android development standards.

📱 Get it on Google Play
https://play.google.com/store/apps/details?id=eu.peernetwork.app

Contributing

🏗 Technology Stack

📐 Architecture Overview

The project is highly modularized to ensure separation of concerns and scalability. Each high-level feature (e.g., Social, User, Wallet) is split into four distinct sub-modules:

Layer Breakdown

  1. :domain

    • Responsibility: Business logic, pure Kotlin.
    • Contents: Use Cases, Repository Interfaces, Domain Models.
    • Dependencies: None (or pure Java/Kotlin libraries).
  2. :data

    • Responsibility: Data retrieval and management.
    • Contents: Repository Implementations, API definitions, Data Sources.
    • Dependencies: :domain, Networking libraries.
  3. :ui

    • Responsibility: Rendering UI and handling user interaction.
    • Contents: Jetpack Compose Screens, ViewModels, DI Components (UiComponentProvider).
    • Dependencies: :domain, :core:ui.
  4. :remote

    • Responsibility: Network communication specifics (DTOs, Services).

Core Modules

  • :core:common: Shared utilities, extensions, and base classes (e.g., Result types).
  • :core:ui: Design System (Luna), shared Composables, and Theme definitions.

📂 Project Structure

peer_android_frontend/
├── app/                          # Application module (DI root, manifest)
│
├── core/
│   ├── common/                   # Utils, extensions, logging
│   └── ui/                       # Design system, base components, theme
│
├── feature/
│   ├── social/                   # Feed, connections, interactions
│   │   ├── domain/
│   │   ├── data/
│   │   └── ui/
│   │
│   ├── user/                     # Auth, profile, account
│   │   ├── domain/
│   │   ├── data/
│   │   └── ui/
│   │
│   ├── wallet/                   # Tokens, balance, transactions
│   │   ├── domain/
│   │   ├── data/
│   │   └── ui/
│   │
│   ├── messaging/                # Chats, threads, messages
│   │   ├── domain/
│   │   ├── data/
│   │   └── ui/
│
└── ...

🛠 Usage & patterns

UI Component Hierarchy

The UI acts as a composition of three distinct layers:

  1. Stateful Components (Screens): Composition roots (e.g., LoginScreen) responsible for Dependency Injection, ViewModel creation, and state collection.
  2. Stateless Components: Complex UI compositions (e.g., LoginPage) that define the layout and behavioral contracts. They are pure functions receiving state and event callbacks.
  3. View Components: Reusable, atomic building blocks (e.g., DesignTextField, DesignButton) shared across the application.

🚀 Build & Setup

  1. Prerequisites:

    • Android Studio Iguana or later.
    • JDK 17.
  2. Build:

    ./gradlew assembleDebug
  3. Run Tests:

    ./gradlew test

About

This is the repository for the Android (kotlin) frontend code.

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages