- Introduction
- Project Overview
- Architecture Overview
- ADR Reference
- Implementation Guidelines
- Code Quality
- Contribution Guidelines
- Getting Started
Welcome to the development guide for the Android Jetpack Compose Library of DB UX Design System. This document outlines the development concepts and practices for this framework, helping new developers get up to speed and contribute efficiently.
This SwiftUI-based UX Design System Framework aims to:
- Define design elements such as colors, typography, and spacing as tokens.
- Provide pre-built UI components like buttons, alerts, and chips.
The framework is designed to be user-friendly, leveraging Jetpack Compose for a modern and maintainable codebase. The project is offered as a Compose Library for easy integration.
The architecture of this library follows the principles of modularity and separation of concerns. The key components include:
- Foundation: Central definition of design elements including colors, typography and spacing.
- Components: Essential UI components built with Jetpack Compose, such as buttons, alerts and chips.
Significant architectural decisions are documented in Architecture Decision Records (ADRs). These records ensure transparency and consistency throughout the project. Developers are encouraged to document new decisions as ADRs to maintain project integrity.
- All ADRs are located in the
docs/adr
directory of the repository. - Refer to ADR Documentation
To ensure high standards of code quality and consistency, adhere to the following guidelines:
- Code Structure:
- Organize files by feature or module.
- Follow the Android API Design Guidelines and Kotlin coding conventions.
- Components:
- Build UI components using Jetpack Compose.
- Ensure components are reusable and customizable via modifiers.
- Design Tokens Usage:
- Consistently apply design tokens (such as colors, typography, and spacing) across all components.
- Documentation:
- Document all public APIs thoroughly.
- Include inline comments for complex logic.
Maintaining high code quality is crucial. Follow these best practices:
- Code Reviews: All code changes must undergo a rigorous review process.
- Unit Tests: Write unit tests for all critical functionalities.
- Linting: Use Android Lint to enforce a consistent code style.
- CI Pipeline: Implement automated testing and linting for every pull request.
We welcome contributions from the community! For details on how to contribute to
this project, refer to the CONTRIBUTING.md
file. It includes information on
how to report issues, submit pull requests, and follow coding standards.
-
Prerequisites:
- Java Development Kit (JDK) 17 or newer
- Android Studio (latest stable version)
-
Clone the Repository:
git clone https://github.com/your-repo/compose-library.git
-
Open the Project in Android Studio:
- Open Android Studio.
- Select
File > Open...
. - Navigate to the cloned repository and click
Open
.
-
Sync Project with Gradle Files:
- Android Studio should automatically sync and resolve dependencies. If not,
go to
File > Sync Project with Gradle Files
.
- Android Studio should automatically sync and resolve dependencies. If not,
go to
-
Build the Project:
./gradlew assembleDebug
-
Run Tests:
-
Unit Tests:
./gradlew testDebugUnitTest
-
UI Tests:
./gradlew connectedAndroidTest
-
Thank you for contributing to our project! Together, we can develop a robust and versatile DB UX Design System using Jetpack Compose.