Skip to content

Android

Abdulla Muradov edited this page May 16, 2025 · 4 revisions

πŸ€– Android App β€” Peer Network

This page documents the Android client for Peer Network, built in Kotlin with a modern modular architecture.


πŸ“± Project Overview

  • Built using Jetpack Compose (no XML)
  • Clean modular structure with data, domain, remote, and ui layers
  • Uses Kotlin Coroutines and Flow for reactive state management
  • Connects to the backend GraphQL API (Apollo)
  • Handles authentication, posting, wallet, profile β€” with more features in development

🧱 Tech Stack

Layer Tech / Tool
Language Kotlin
UI Framework Jetpack Compose
State Management Kotlin Flow + ViewModel
Networking Apollo GraphQL
Token Storage SharedPreferences
Build System Gradle (modular setup)
Architecture Clean Architecture (Modular)

βœ… Implemented Features

  • User authentication (register, login, logout)
  • Profile editing (username, bio, image)
  • Content feed: create, read, comment on posts
  • Follow/block users
  • Wallet screen with balance and activity

🚫 Not Yet Implemented

  • ❌ Real-time messaging (chat system not integrated)
  • ❌ Push notifications
  • ❌ Token transfer from wallet
  • ❌ Referral logic on registration

βš™οΈ Backend Integration

  • All operations use GraphQL via Apollo client
  • Token (JWT) is stored securely in SharedPreferences
  • referralUuid is passed when available during registration
  • GraphQL schema code is generated automatically for type safety

πŸ§ͺ Testing

  • Manual testing is currently used for most flows
  • CI test integration with backend is planned
  • Some modules are structured for future unit testing (domain and data layers)

πŸ“ Project Structure

peer_android_frontend/

β”œβ”€β”€ app/                    # Main application module (entry point)

β”œβ”€β”€ blog/                   # Feature module: blog
β”‚   β”œβ”€β”€ data/               # Repositories, data sources
β”‚   β”œβ”€β”€ domain/             # Use cases, domain models
β”‚   β”œβ”€β”€ remote/             # Remote API handling (Apollo)
β”‚   └── ui/                 # UI layer (Composables, ViewModels)

β”œβ”€β”€ core/                   # Shared code across all modules
β”‚   β”œβ”€β”€ common/             # Common utilities, base classes
β”‚   β”œβ”€β”€ remote/             # Shared network code
β”‚   └── ui/                 # Shared UI components, themes, styles

β”œβ”€β”€ media/                  # Media handling (images/videos)
β”‚   β”œβ”€β”€ core/
β”‚   └── ui/

β”œβ”€β”€ persistence/            # Local storage & persistence logic
β”‚   β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ domain/
β”‚   β”œβ”€β”€ local/              # SharedPreferences, etc.

β”œβ”€β”€ social/                 # Friends, chat, follow system
β”‚   β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ domain/
β”‚   β”œβ”€β”€ remote/
β”‚   └── ui/

β”œβ”€β”€ user/                   # Auth, profile, user info
β”‚   β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ domain/
β”‚   β”œβ”€β”€ remote/
β”‚   └── ui/

β”œβ”€β”€ wallet/                 # Token display & wallet interaction
β”‚   β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ domain/
β”‚   β”œβ”€β”€ remote/
β”‚   └── ui/

πŸ““ Related Pages

πŸ“š Peer Network Documentation

πŸ““ Changelogs

πŸ’» Clients

Clone this wiki locally