https://github.com/negarprh/petify
Petify πΎ Android e-commerce app for pet supplies built with Java, XML, and Firebase (Authentication + Firestore). Includes Admin and User panels connected through a shared database.
https://github.com/negarprh/petify
android-app ecommerce firebase firestore java mvvm-architecture
Last synced: 2 months ago
JSON representation
Petify πΎ Android e-commerce app for pet supplies built with Java, XML, and Firebase (Authentication + Firestore). Includes Admin and User panels connected through a shared database.
- Host: GitHub
- URL: https://github.com/negarprh/petify
- Owner: negarprh
- Created: 2025-11-08T17:05:10.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-11-25T03:53:52.000Z (8 months ago)
- Last Synced: 2025-11-28T13:16:07.511Z (7 months ago)
- Topics: android-app, ecommerce, firebase, firestore, java, mvvm-architecture
- Language: Java
- Homepage:
- Size: 601 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΎ **Petify, Android E-Commerce App for Pet Supplies**







**Petify** is a complete **Android e-commerce app** built with
**Java + XML + Firebase Auth + Cloud Firestore + Firebase Storage**, featuring real-time synchronization and two fully separated panels: **User** and **Admin**.
It includes **Stripe API integration** for real online payment processing.
---
# πΈ Screenshots
### π Home Screen

### π Shopping Cart

### πΆ Product Detail

### π€ User Profile

### π Admin Dashboard

---
# π§ Project Overview
Petify includes **two synchronized environments** powered by Firestore:
| Panel | Capabilities |
| --------------------- | -------------------------------------------------------------------------------------------- |
| π€ **User Panel** | Browse products, search, add to cart, manage favorites, view product details, manage profile |
| π§βπΌ **Admin Panel** | Add/edit/delete products, upload product images, view user orders, manage payments |
Both panels communicate with:
* **Cloud Firestore** for real-time database
* **Firebase Storage** for hosting images
* **Firebase Authentication** for secure login
* **Stripe API** for payments
---
# βοΈ Tech Stack
### **Languages & Tools**
* Java
* XML UI
* Android Studio
* Gradle
### **Firebase Services**
| Service | Usage |
| ---------------------- | ---------------------------------------- |
| **Authentication** | Role-based login (User/Admin) |
| **Firestore NoSQL DB** | Products, users, orders, cart, favorites |
| **Firestore Indexes** | Optimized search & queries |
| **Firebase Storage** | Product images + Profile images |
| **Firestore Rules** | Secure per-user access control |
### **External APIs**
| API | Purpose |
| ------------------------ | --------------------------------------------------------------------------------------- |
| **Stripe API** | Secure online payment processing (credit cards and debit cards payment intents) |
Stripe will handle:
* Payment intents
* Payment confirmation
* Server-side verification
* Firestore update on payment success
---
# π§© Key Features
## π Authentication
* Email/Password login via Firebase
* Admin/User role mapping
* Auto redirect based on role
---
## π€ User Features
### π Home Page
* Firestore-powered product list
* Search + instant filter
* Real-time image loading via URL & Storage
### β€οΈ Favorites System
* Toggle heart icon
* Stored in `users/{uid}/favorites`
* Favorites screen includes:
* Product title, category, price
* Add to Cart button
* Remove favorite
### π Shopping Cart
* Add/remove products
* Modify quantity
* Real-time syncing to Firestore
### π§Ύ Product Details
* Large image
* Description
* Favorite toggle
* Add to Cart
### π€ Profile Section
* Edit profile
* Change password
* Logout
* View order history
---
## π§βπΌ Admin Features
### π¦ Product Management
* Create new products
* Edit product details
* Delete products
* Upload product images β Firebase Storage
### π Order & Payment Overview
* See all user orders
* Inspect payment details
* Verify completed payments
* Support for **Stripe API**
---
# π₯ Firebase Architecture (Technical Deep Dive)
## **Firestore Structure**
```
users/
uid/
name: "John"
email: "john@gmail.com"
role: "user"
products/
productId/
title: "Dog Toy"
category: "Toys"
price: 12.99
description: "..."
imageUrl: "..."
createdAt: timestamp
users/{uid}/favorites/
productId/
productId: "..."
title: "..."
imageUrl: "..."
price: 12.99
createdAt: timestamp
users/{uid}/cartItems/
productId/
title: "..."
quantity: 2
price: 12.99
imageUrl: "..."
orders/
orderId/
userId: "uid"
items: [...]
totalPrice: ...
status: "pending" | "paid"
```
---
## **Firebase Storage Structure**
```
product_images/
productId.jpg
profile_images/
uid.jpg
```
Used by:
* Admin product creation
* User profile updates
---
# π³ Stripe API Integration
Stripe integration will introduce:
### **Client-Side (Android)**
* Initiate payment intents
* Display Stripeβs payment sheet
* Secure tokenization of card details
### **Server-Side**
* Cloud Function or backend service will:
* Create payment intents
* Verify success
* Update Firestore:
```
orders/orderId/status: "paid"
```
### **Benefits**
* PCI-compliant card handling
* Strong authentication
* Support for credit/debit
* Automatic fraud detection
---
# π§± Architecture
* **Models** β represent Firestore documents
* **Adapters** β efficient RecyclerView bindings
* **FirebaseUtils** β shared Firestore/Auth instances
* **Activities** β UI + user interactions, no business logic inside
* **Subcollections** β for favorites, cart, payments
---
# ποΈ Folder Structure
```
Petify/
βββ app/
β βββ java/com/example/petify/
β β βββ User/
β β βββ Admin/
β β βββ Adapters/
β β βββ Models/
β β βββ FirebaseUtils.java
β βββ res/layout/
β βββ res/drawable/
β βββ res/values/
β βββ AndroidManifest.xml
βββ google-services.json
βββ build.gradle
βββ README.md
βββ .gitignore
```
---
# π Running the Project
1. Clone:
```bash
git clone https://github.com/negarprh/Petify.git
```
2. Open in Android Studio
3. Add your `google-services.json` under `/app`
4. Connect Firebase
5. Sync + Run
---
# π©βπ» Authors
**Negar Pirasteh** ,
**Betty Dang**