0% found this document useful (0 votes)
14 views20 pages

Mad Report

The document is a project report for an Android application called 'Cake Shop' that facilitates online ordering of cakes and pastries. It outlines the project's introduction, hardware and software requirements, key features, functional and non-functional requirements, sample code, and architecture. The app includes functionalities like user registration, cake catalog browsing, order tracking, and secure payment integration, making it user-friendly for customers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views20 pages

Mad Report

The document is a project report for an Android application called 'Cake Shop' that facilitates online ordering of cakes and pastries. It outlines the project's introduction, hardware and software requirements, key features, functional and non-functional requirements, sample code, and architecture. The app includes functionalities like user registration, cake catalog browsing, order tracking, and secure payment integration, making it user-friendly for customers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

A

PROJECT
REPORT
ON
MICRO PROJECT ON

<< “ Cake Shop ”>>


(Introduction To Machine
Learning(4350702))
SUBMITTED BY
Hadiyal Manshi P. (226090307034)
Mandaliya Aayushi
(226090307034)

To
COMPUTER ENGINEERING DEPARTMENT
C U SHAH (GOVT.) POLYTECHNIC – SURENDRANAGAR

GUJARAT TECHNOLOGICAL UNIVERSITY –


AHMEDABAD OCTOBER – 2024
Index

Sr. No. Topic Name

1 Introduction to the Project.


2 Hardware and Software requirements (If any)
3 Sample Code/ Architecture (If any)
4 Screenshots of System and Output (If any)
5 Application of your Project
6 Advantages and Disadvantages of Project
7 Summary of Project
8 References
Introduction to Project

An Android app for an online cake shop gives customers a simple way to look through,
order, and pay for cakes and pastries right from their phones. It makes picking out
cakes, personalizing orders, and scheduling deliveries super easy, so it's perfect for
those special moments or when you just want to treat yourself.

Key Features:
o User Registration and Login: Lets users make accounts, log in, and keep track
of their profiles. Offers log in choices through email, social media, or
phone number.

o Cake Catalog: Shows a bunch of different cakes with pictures, descriptions,


prices, and sizes. Groups cakes into categories like birthday cakes, wedding
cakes, cupcakes, and custom cakes. Includes filters for flavors, themes,
price ranges, and ratings.

o Customization Options: Gives users the chance to personalize cakes by size,


flavor, and even adding a message. Users can also upload a pic for photo cakes.

o Shopping Cart and Checkout: Users can toss multiple items into their cart.
Displays an order summary and breaks down the price. Offers secure
payment methods like credit/debit cards, UPI, and wallets.

o Order Tracking: Lets users keep an eye on their order status in real-
time, whether it's confirmed, baking, dispatched, or delivered.
Sends notifications for updates on orders.

o Delivery Scheduling: Lets users pick their desired delivery dates and time slots.
Also offers same-day delivery or the option to order ahead.

o User Reviews and Ratings: Customers can rate cakes and write reviews. Helps
new buyers make smarter choices.
Requirements of Project
1. Software Requirements:
Operating System:
o we’ll need either Windows, macOS, or Linux to develop.

Development Tools:
o Android Studio: This is the main IDE for making Android apps.
o JDK (Java Development Kit): We must have this to run Android Studio (you can
use either Java or Kotlin for coding).
Backend Development:
o Server-Side Languages: You can use Node.js, Java, Python, or PHP for backend
work.
Database:
o Firebase Realtime Database (NoSQL).

Payment Gateway Integration:


o You’ll need integration libraries, like Stripe, Razorpay, or PayPal SDKs.

Emulators and Testing Tools:


o Android Emulator for app testing.

2. Hardware Requirements:
Development Machine:
o Minimum: 8 GB RAM, Intel i5 processor, 256 GB SSD.

o Recommended: 16 GB RAM, Intel i7 or higher processor, 512 GB SSD for better


performance.

Mobile Device (Optional):


o An Android phone (Android 7.0 or above) for real device testing.

3. Functional Requirements:
o User Management: User registration, login, profile management.
o Cake Catalog Management: Display, filter, and categorize cakes.
o Shopping Cart: Adding, updating, and removing items.
o Checkout and Payment: Secure payment integration.
o Order Tracking: Real-time tracking of order status.
o Admin Panel: Manage products, orders, and customer accounts.

4. Non-Functional Requirements:
o Performance: The app should load content within 2-3 seconds.
o Scalability: The backend should support increasing users and orders.
o Security: Protect user data, secure payment processing, and use encrypted
communications.
o Usability: User-friendly interface, easy navigation, and accessible design.
o Reliability: Ensure 99.9% uptime for the server.

Architecture/Code of Project

MainActivity
package com.example.coffeeshop;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

// Timer duration in milliseconds (e.g., 3000 = 3 seconds)


private static final int TIMER_DURATION = 1500;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);

// Adjust the window insets to handle system bars


ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});

// // Initialize the "Get Started" button and set up click listener


// Button getStartedButton = findViewById(R.id.getStartedButton);
// getStartedButton.setOnClickListener(v -> {
// redirectToRegisterActivity(); // Redirect when button is clicked
// });

// Set a timer to automatically redirect after TIMER_DURATION


new Handler().postDelayed(this::redirectToRegisterActivity, TIMER_DURATION);
}

// Method to handle the redirection to RegisterActivity


private void redirectToRegisterActivity() {
Intent intent = new Intent(MainActivity.this, RegisterActivity.class);
startActivity(intent);
finish(); // Close the MainActivity so that it's not in the back stack
}
}
HomeActivity
package com.example.coffeeshop;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;

import java.util.ArrayList;
import java.util.List;

public class HomeActivity extends AppCompatActivity {

private FirebaseFirestore db;


private CoffeeAdapter coffeeAdapter;
private List<Coffee> coffeeList;
private EditText searchBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);

// Initialize Firebase Firestore instance


db = FirebaseFirestore.getInstance();

// Set up ListView for displaying coffee items


@SuppressLint({"MissingInflatedId", "LocalSuppress"})
ListView coffeeListView = findViewById(R.id.coffeeListView);
coffeeList = new ArrayList<>();
coffeeAdapter = new CoffeeAdapter(this, coffeeList);
coffeeListView.setAdapter(coffeeAdapter);

// Set up Search Bar


searchBar = findViewById(R.id.searchBar);
searchBar.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
// Perform search based on user input
searchItems(charSequence.toString().toLowerCase());
}
@Override
public void afterTextChanged(Editable editable) {}
});

// Fetch initial coffee data (all items)


fetchCoffeeData();

// Set up the back button to navigate to MainActivity


ImageButton backButton = findViewById(R.id.backButton);
backButton.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish(); // Close the current activity
});

// Set up navigation button for Profile


ImageButton navProfile = findViewById(R.id.navProfile);
navProfile.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, ProfileActivity.class);
startActivity(intent);
});

// Set up navigation for Cakes category


TextView navCakes = findViewById(R.id.navCakes);
navCakes.setOnClickListener(v -> {
// Navigate to CakeActivity when "Cakes" is clicked
Intent intent = new Intent(HomeActivity.this, CakeActivity.class);
startActivity(intent);
});

// Set up navigation for Brownies category


TextView navBrownies = findViewById(R.id.navBrownies);
navBrownies.setOnClickListener(v -> {
// Navigate to BrownieActivity when "Brownies" is clicked
Intent intent = new Intent(HomeActivity.this, BrownieActivity.class);
startActivity(intent);
});

// Set up navigation for Shakes category


TextView navShakes = findViewById(R.id.navShakes); // Ensure you have the correct ID for
the Shakes TextView
navShakes.setOnClickListener(v -> {
// Navigate to ShakesActivity when "Shakes" is clicked
Intent intent = new Intent(HomeActivity.this, ShakesActivity.class);
startActivity(intent);
});

// Set up navigation for CartActivity


ImageButton navCart = findViewById(R.id.navCart);
navCart.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, CartActivity.class);
startActivity(intent);
});
// Set up navigation for OrderSummaryActivity
ImageButton navOrder = findViewById(R.id.navOrder);
navOrder.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, OrderSummaryActivity.class);
startActivity(intent);
});
}

// Fetch coffee data from Firestore collection 'coffees'


private void fetchCoffeeData() {
db.collection("coffees").get().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
coffeeList.clear();
for (QueryDocumentSnapshot document : task.getResult()) {
String name = document.getString("name");
String price = document.getString("price");
String description = document.getString("description");
String imageUrl = document.getString("imageUrl");
coffeeList.add(new Coffee(name, price, description, imageUrl));
}
coffeeAdapter.notifyDataSetChanged();
} else {
// Handle the error (you can add a log or user message here)
}
});
}

// Search Firestore for matching items in 'coffees' and 'cakes'


private void searchItems(String query) {
coffeeList.clear(); // Clear the list before starting a new search

// Fetch all coffee data


db.collection("coffees").get().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
for (QueryDocumentSnapshot document : task.getResult()) {
Coffee coffee = document.toObject(Coffee.class);
// Check if the coffee name matches the query (case insensitive)
if (coffee.getName().toLowerCase().contains(query)) {
coffeeList.add(coffee);
}
}
coffeeAdapter.notifyDataSetChanged();
// If no matches in coffees, search in cakes
if (coffeeList.isEmpty()) {
searchInCakes(query);
}
}
});
}

// Search in 'cakes' collection if no match in 'coffees'


private void searchInCakes(String query) {
db.collection("cakes").get().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
for (QueryDocumentSnapshot document : task.getResult()) {
Coffee coffee = document.toObject(Coffee.class); // Assuming cakes have the same
structure
// Check if the cake name matches the query (case insensitive)
if (coffee.getName().toLowerCase().contains(query)) {
coffeeList.add(coffee);
}
}
coffeeAdapter.notifyDataSetChanged();
// Handle no results found if necessary
}
});
}

// Search in 'brownies' collection if no match in 'coffees' or 'cakes'


private void searchInBrownies(String query) {
db.collection("brownies").get().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
for (QueryDocumentSnapshot document : task.getResult()) {
Coffee coffee = document.toObject(Coffee.class); // Assuming brownies have the same
structure
// Check if the brownie name matches the query (case insensitive)
if (coffee.getName().toLowerCase().contains(query)) {
coffeeList.add(coffee);
}
}
coffeeAdapter.notifyDataSetChanged();
// Handle no results found if necessary
}
});
}

// Search in 'shakes' collection if no match in 'coffees' or 'cakes'


private void searchInShakes(String query) {
db.collection("shakes").get().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
for (QueryDocumentSnapshot document : task.getResult()) {
Coffee coffee = document.toObject(Coffee.class); // Assuming shakes have the same
structure
// Check if the shake name matches the query (case insensitive)
if (coffee.getName().toLowerCase().contains(query)) {
coffeeList.add(coffee);
}
}
coffeeAdapter.notifyDataSetChanged();
// Handle no results found if necessary
}
});
}
}
LoginActivity
package com.example.coffeeshop;

import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;

public class LoginActivity extends AppCompatActivity {

private EditText loginEmail, loginPassword;


private Button loginButton;
private TextView registerRedirect;
private FirebaseAuth mAuth;
private SharedPreferences sharedPreferences;
private ProgressDialog progressDialog;
private static final String PREFS_NAME = "LoginPrefs";
private static final String IS_LOGGED_IN_KEY = "isLoggedIn";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Check if the user is already logged in


sharedPreferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
boolean isLoggedIn = sharedPreferences.getBoolean(IS_LOGGED_IN_KEY, false);

if (isLoggedIn) {
// If logged in, redirect to the home screen directly
startActivity(new Intent(LoginActivity.this, HomeActivity.class));
finish();
return;
}

setContentView(R.layout.activity_login);

mAuth = FirebaseAuth.getInstance();

loginEmail = findViewById(R.id.loginEmail);
loginPassword = findViewById(R.id.loginPassword);
loginButton = findViewById(R.id.loginButton);
registerRedirect = findViewById(R.id.registerRedirect);

// Initialize progress dialog


progressDialog = new ProgressDialog(this);
progressDialog.setMessage("Logging in...");
progressDialog.setCancelable(false); // Disable dismiss by clicking outside

loginButton.setOnClickListener(v -> loginUser());


registerRedirect.setOnClickListener(v -> startActivity(new Intent(LoginActivity.this,
RegisterActivity.class)));
}

private void loginUser() {


String email = loginEmail.getText().toString();
String password = loginPassword.getText().toString();

if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
Toast.makeText(LoginActivity.this, "Please fill all fields", Toast.LENGTH_SHORT).show();
} else {
// Show progress dialog while logging in
progressDialog.show();

// Firebase login
mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(task -> {
progressDialog.dismiss(); // Hide progress dialog after the task completes

if (task.isSuccessful()) {
FirebaseUser user = mAuth.getCurrentUser();
Toast.makeText(LoginActivity.this, "Login Successful!",
Toast.LENGTH_SHORT).show();

// Save login state in SharedPreferences


SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(IS_LOGGED_IN_KEY, true);
editor.apply();

// Redirect to the home screen


Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
startActivity(intent);
finish(); // Close the login activity
} else {
Toast.makeText(LoginActivity.this, "Login Failed! Please check your credentials.",
Toast.LENGTH_SHORT).show();
}
});
}
}
}
Screenshots of working project/Output
Application of your system

1. Order Placement: Customers can easily browse through available cake options,
customize their orders (flavors, sizes, decorations), and place orders directly
through the app, enhancing convenience and speed.

2. Order Confirmation and Tracking: Once an order is placed, customers receive


instant confirmation via the app. They can also track the status of their order,
ensuring they are informed of its progress until delivery.

3. Delivery Timing Notifications: The app provides estimated delivery times,


keeping customers informed about when to expect their cakes. Notifications can
be sent when the order is out for delivery and when it has been delivered.

4. Order History Access: Customers can view their past orders in the app, making it
easy to reorder their favorite cakes or reference previous purchases for special
occasions.

5. Repeat Orders: The order history feature allows customers to quickly repeat
previous orders with minimal effort, improving customer satisfaction and
loyalty.

6. Event Reminders: The app can use order history to remind customers of
important dates (like birthdays or anniversaries) when they have previously
ordered cakes, encouraging them to place orders for those occasions.

7. Customer Feedback and Ratings: After delivery, customers can provide feedback
on their orders, which can be used to improve service quality and product
offerings.

8. Promotional Offers Based on Order History: The app can analyze order history to
offer personalized discounts or promotions based on a customer’s preferences,
encouraging repeat business.

9. Inventory Planning: The order history data can help shop owners forecast
demand and manage inventory more efficiently, ensuring that popular cakes are
always available.

10. Special Requests Handling: Customers can add special requests or notes when
placing orders, ensuring that any specific needs or preferences are met.

These applications make your cake shop app not only a tool for placing orders but also a
comprehensive platform that enhances the overall customer experience through
features like order tracking, history, and personalized communication.
Advantages and Disadvantages of your system

Advantages of a Cake Shop Application:


1. Convenience for Customers:
o Customers can browse, customize, and order cakes from the comfort of
their homes, eliminating the need to visit the physical shop.
o Allows customers to place orders 24/7, even outside regular business
hours.
2. Increased Reach and Sales:
o Expands the customer base beyond the local area, potentially reaching a
larger audience through online channels.
3. Enhanced Customer Experience:
o Users can easily customize cakes, schedule deliveries, and choose from
various payment options.
4. Efficient Order Management:
o Automates the order-taking process, reducing manual errors and
improving efficiency.
o Centralized management of orders, inventory, and customer information
through an admin panel.
5. Data Analytics and Insights:
o Allows bakery owners to collect data on customer preferences, sales
trends, and popular products.
6. Cost-Effective Marketing:
o Online platforms make it easy to promote special offers, seasonal cakes,
and new arrivals through social media integration.
7. Customization and Personalization:
o Users can personalize their cakes (e.g., flavour, size, decorations), making
the app suitable for different occasions.
8. Reduced Queuing and Waiting Times:
o Eliminates the need for customers to wait in line at the shop.

Disadvantages of a Cake Shop Application:


1. Initial Development and Maintenance Costs:
o Developing a high-quality app with all necessary features can be
expensive, especially for small bakeries.
o Requires ongoing maintenance, updates, and potential bug fixes to ensure
smooth operation.
2. Technical Challenges:
o Potential issues with app performance, server downtime, or bugs can
disrupt the user experience.
3. Dependency on Internet Access:
o Users need a stable internet connection to access the app, place orders,
and track deliveries.
4. Competition and Market Saturation:
o Many bakeries may have their own apps, making it challenging to stand
out in a crowded market.
5. Security and Privacy Concerns:
o Online transactions and customer data must be securely handled to
prevent data breaches.
o Compliance with payment gateway security standards (e.g., PCI DSS) is
essential but can be complicated.
Summary
Our Cake Shop (Bake and Crumble) aims to create a vibrant and user-friendly online
platform for [Your Cake Shop Name], specializing in custom cake design and sales. The
project encompasses both the development of a physical storefront and an interactive
website that allows customers to explore our offerings, place orders, and engage with
our brand.
References
https://youtu.be/9nWcPPHBzMk?si=OELeuingM_o0U9il

https://youtu.be/5Sf51Pl8mS0?si=L8K1TbV40LT9gdoe

https://youtu.be/1lwNmmgf-Y0?si=86Wrqv23kTkf186b

You might also like