A multi-screen cupcake ordering app exploring navigation in Android
An Android application that simulates a cupcake ordering flow with multiple screens. Built as part of the Android Basics with Compose curriculum to learn app navigation and state management across screens.
Cupcake is a learning project that demonstrates how to build a multi-screen Android app with proper navigation flow. Users can select cupcake quantities, choose flavors, pick pickup dates, and review their order before sharing — all while maintaining state across different screens.
This project is part of the #AndroidBasics learning path.
This project taught me:
- Navigation Component: Managing multi-screen flows in Android
- ViewModel: Sharing data across multiple screens
- State Management: Maintaining order state throughout the app
- Jetpack Compose Navigation: Building navigation graphs declaratively
- Back Stack Management: Handling the back button properly
- Data Flow: Passing information between composables
- Language: Kotlin
- UI Framework: Jetpack Compose
- Architecture: ViewModel
- Navigation: Jetpack Compose Navigation
- Build System: Gradle (Kotlin DSL)
- Android Studio (latest stable version)
- JDK 8 or higher
- Android SDK
- Clone the repository:
git clone https://github.com/SamratVsn/Cupcake.git-
Open in Android Studio:
- Launch Android Studio
- Select "Open an Existing Project"
- Navigate to the cloned directory
-
Run the app:
- Connect an Android device or start an emulator
- Click the "Run" button (
▶️ )
- Start Screen: Choose quantity of cupcakes (1, 6, or 12)
- Flavor Screen: Select your favorite flavor
- Pickup Screen: Choose a pickup date
- Summary Screen: Review order details and total price
- Share: Send order details to another app
- Creating a navigation graph to define app routes
- Using NavController to navigate between screens
- Sharing a ViewModel across multiple composables
- Implementing back navigation with custom behavior
- Calculating and displaying order totals based on selections
- Using Intent to share data with other apps
This app demonstrates:
- Multi-screen navigation flow
- Centralized state management with ViewModel
- Proper data passing between screens
- Clean UI with Jetpack Compose
- Real-world app structure and patterns
Built following Google's Android Basics with Compose course, specifically the Navigation codelab.
This project is open source and available for educational purposes.
"One screen at a time, building the full picture."