Frontend client for the Book Publishing platform. Native Android application which consumes the book-publishing-backend RESTful API to manage books, authors, and collections.
- 📌 About the Project
- 🔐 Authentication & Authorization
- 📱 Screens
- 🌍 Internationalization
- 🎨 Theme & Appearance
- 🔧 Build Configuration
- 🧪 Testing Strategy
- ⚙️ CI/CD Workflow
- Code Quality
- 🔌 API Integration
- License
| Technology | Purpose |
|---|---|
| Kotlin 2.0 | Programming language |
| Jetpack Compose | Modern declarative UI toolkit |
| Material Design 3 | Design system with brand theming |
| Retrofit + OkHttp | HTTP client for API communication |
| Kotlin Coroutines | Asynchronous operations in ViewModels |
| Jetpack Navigation | Navigation between screens |
| ViewModel + StateFlow | UI state management |
| Gradle + Spotless | Build system and code formatting |
This project follows Clean Architecture with MVVM pattern:
- Presentation Layer: Composables, ViewModels, UI state management
- Domain Layer: Use cases, business logic, repository interfaces
- Data Layer: API services, repositories, data sources
app/src/main/java/org/cescfe/book_publishing_app/
├── ui/
│ ├── theme/ # Design system & theming
│ ├── navigation/ # Navigation graphs
│ ├── shared/ # Shared components
│ ├── auth/ # Authentication flow
│ ├── authors/ # Author management
│ ├── books/ # Book management
│ └── collections/ # Collection management
├── domain/
│ ├── repository/ # Repository interfaces
│ ├── model/ # Domain models
│ └── usecase/ # Business use cases
└── data/
├── remote/ # API services & DTOs
└── repository/ # Repository implementations
Authentication is handled via JWT tokens and the app implements role-based authentication with the following user roles:
- Full Access: Read, write, and delete permissions
- Can perform all CRUD operations on books and authors
- Limited Access: Read-only permissions
- Can only view books (list and detail), authors (list and detail), and collections (list)
- Cannot create, update, or delete any resources
|
|
| Admin View | Read-Only View |
|
|
| English Dark | Catalan Light |
|
|
| Admin View | Read-Only View |
|
|
| English Dark | Catalan Light |
The app is developed natively in English. In addition, the app dynamically adapts to the device language, supporting Catalan and Spanish.
The app supports dynamic theme switching based on the device's system configuration:
- Light Mode: Automatically applied when the device is set to light theme
- Dark Mode: Automatically applied when the device is set to dark theme
- Brand Colors: Custom Editorial Denes color scheme with blue and green accents
- Material Design 3: Uses Material 3 color schemes for consistent theming
- Material Symbol & Icons: Applies
Google FontsSymbol & Icons to adopt android standards - Enabled actions based on user roles: The app automatically checks user permissions and adjusts the UI accordingly, enabling only the actions that the user have permission to perform.
The project supports two build types with different configurations:
- Configuration File:
app/dev.properties - Purpose: Development environment
- Base URL: Configured in
dev.propertiesfile - Features: Full logging, debugging enabled
- Configuration File:
app/pro.properties - Purpose: Production environment
- Base URL: Configured in
pro.propertiesfile - Features: ProGuard rules configured (minification disabled by default)
Setup Instructions:
- Create
app/dev.propertieswithbase.urlproperty for debug builds - Create
app/pro.propertieswithbase.urlproperty for release builds - These files are excluded from version control (see
.gitignore)
./gradlew assembleDebug
./gradlew assembleRelease
- Unit Tests: ViewModels, DTOs, Repository logic
- Instrumented Tests: UI components with Compose Testing
# Run unit tests
./gradlew test
# Run instrumented tests (requires emulator/device)
./gradlew connectedAndroidTestEvery push to main and every pull request in ready for review automatically runs:
- ✅ Spotless Check — Code formatting validation
- ✅ Android Lint — Static code analysis
- ✅ Unit Tests — ViewModel and repository tests
- ✅ Build — Full project compilation
- Go to Actions → Create Release Tag
- Run manually with the desired version (e.g.,
v1.0) - This creates a Git tag
- Go to Tags → Click on Release
# Check all formatting
./gradlew spotlessCheck
# Apply formatting
./gradlew spotlessApply
# Run all quality checks
./gradlew checkThe app consumes the book-publishing-backend RESTful API.
| Endpoint | Method | Description |
|---|---|---|
POST /api/v1/auth/login |
POST | User authentication |
| Endpoint | Method | Description |
|---|---|---|
GET /api/v1/authors |
GET | List all authors |
GET /api/v1/authors/{id} |
GET | Get author by ID |
POST /api/v1/authors |
POST | Create new author |
PUT /api/v1/authors/{id} |
PUT | Update author |
DELETE /api/v1/authors/{id} |
DELETE | Delete author |
| Endpoint | Method | Description |
|---|---|---|
GET /api/v1/books |
GET | List all books |
GET /api/v1/books/{id} |
GET | Get book by ID |
POST /api/v1/books |
POST | Create new book |
PUT /api/v1/books/{id} |
PUT | Update book |
DELETE /api/v1/books/{id} |
DELETE | Delete book |
| Endpoint | Method | Description |
|---|---|---|
GET /api/v1/collections |
GET | List all collections |
This project is licensed under the MIT License (see the LICENSE file for details).









