Android - peer-network/peer_backend GitHub Wiki
๐ค 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
, andui
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 inSharedPreferences
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
- ๐ป Clients
- ๐ iOS
- ๐ WebApp
- ๐ Home
- ๐ฌ GraphQL Schema Overview