Skip to content

A cupcake App implimenting ViewModel & App Navigation #AndroidBasics

Notifications You must be signed in to change notification settings

SamratVsn/Cupcake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cupcake

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.


🧁 About

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.


🎯 Learning Objectives

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

🛠️ Tech Stack

  • Language: Kotlin
  • UI Framework: Jetpack Compose
  • Architecture: ViewModel
  • Navigation: Jetpack Compose Navigation
  • Build System: Gradle (Kotlin DSL)

🚀 Getting Started

Prerequisites

  • Android Studio (latest stable version)
  • JDK 8 or higher
  • Android SDK

Installation

  1. Clone the repository:
   git clone https://github.com/SamratVsn/Cupcake.git
  1. Open in Android Studio:

    • Launch Android Studio
    • Select "Open an Existing Project"
    • Navigate to the cloned directory
  2. Run the app:

    • Connect an Android device or start an emulator
    • Click the "Run" button (▶️)

📱 App Flow

  1. Start Screen: Choose quantity of cupcakes (1, 6, or 12)
  2. Flavor Screen: Select your favorite flavor
  3. Pickup Screen: Choose a pickup date
  4. Summary Screen: Review order details and total price
  5. Share: Send order details to another app

📚 Key Concepts Learned

  • 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

🧠 What I Built

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

🤝 Acknowledgments

Built following Google's Android Basics with Compose course, specifically the Navigation codelab.


📄 License

This project is open source and available for educational purposes.


"One screen at a time, building the full picture."

About

A cupcake App implimenting ViewModel & App Navigation #AndroidBasics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages